[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 12 commits: core-spec: Modify file paths according to new module hierarchy

Marge Bot gitlab at gitlab.haskell.org
Wed May 27 22:32:37 UTC 2020



 Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
ede24126 by Takenobu Tani at 2020-05-27T00:13:55-04:00
core-spec: Modify file paths according to new module hierarchy

This patch updates file paths according to new module hierarchy [1]:

  * GHC/Core.hs                <= coreSyn/CoreSyn.hs
  * GHC/Core/Coercion.hs       <= types/Coercion.hs
  * GHC/Core/Coercion/Axiom.hs <= types/CoAxiom.hs
  * GHC/Core/Coercion/Opt.hs   <= types/OptCoercion.hs
  * GHC/Core/DataCon.hs        <= basicTypes/DataCon.hs
  * GHC/Core/FamInstEnv.hs     <= types/FamInstEnv.hs
  * GHC/Core/Lint.hs           <= coreSyn/CoreLint.hs
  * GHC/Core/Subst.hs          <= coreSyn/CoreSubst.hs
  * GHC/Core/TyCo/Rep.hs       <= types/TyCoRep.hs
  * GHC/Core/TyCon.hs          <= types/TyCon.hs
  * GHC/Core/Type.hs           <= types/Type.hs
  * GHC/Core/Unify.hs          <= types/Unify.hs
  * GHC/Types/Literal.hs       <= basicTypes/Literal.hs
  * GHC/Types/Var.hs           <= basicTypes/Var.hs

[1]: https://gitlab.haskell.org/ghc/ghc/-/wikis/Make-GHC-codebase-more-modular

[skip ci]

- - - - -
04750304 by Ben Gamari at 2020-05-27T00:14:33-04:00
eventlog: Fix racy flushing

Previously no attempt was made to avoid multiple threads writing their
capability-local eventlog buffers to the eventlog writer simultaneously.
This could result in multiple eventlog streams being interleaved. Fix
this by documenting that the EventLogWriter's write() and flush()
functions may be called reentrantly and fix the default writer to
protect its FILE* by a mutex.

Fixes #18210.

- - - - -
d6203f24 by Joshua Price at 2020-05-27T00:15:17-04:00
Make `identifier` parse unparenthesized `->` (#18060)

- - - - -
f7338dd8 by Ben Gamari at 2020-05-27T18:32:19-04:00
GHC.Core.Unfold: Refactor traceInline

This reduces duplication as well as fixes a bug wherein -dinlining-check
would override -ddump-inlinings. Moreover, the new variant

- - - - -
2c422a8b by Ben Gamari at 2020-05-27T18:32:19-04:00
Avoid unnecessary allocations due to tracing utilities

While ticky-profiling the typechecker I noticed that hundreds of
millions of SDocs are being allocated just in case -ddump-*-trace is
enabled. This is awful.

We avoid this by ensuring that the dump flag check is inlined into the
call site, ensuring that the tracing document needn't be allocated
unless it's actually needed.

See Note [INLINE conditional tracing utilities] for details.

Fixes #18168.

Metric Decrease:
  T9961
  haddock.Cabal
  haddock.base
  haddock.compiler

- - - - -
836bd057 by Vladislav Zavialov at 2020-05-27T18:32:19-04:00
Add Semigroup/Monoid for Q (#18123)

- - - - -
3f5b09a1 by Xavier Denis at 2020-05-27T18:32:26-04:00
Fix #18071

Run the core linter on candidate instances to ensure they are
well-kinded.

Better handle quantified constraints by using a CtWanted to avoid
having unsolved constraints thrown away at the end by the solver.

- - - - -
87a87ad9 by Sebastian Graf at 2020-05-27T18:32:27-04:00
FloatOut: Only eta-expand dead-end RHS if arity will increase (#18231)

Otherwise we risk turning trivial RHS into non-trivial RHS, introducing
unnecessary bindings in the next Simplifier run, resulting in more
churn.

Fixes #18231.

- - - - -
993c66a6 by Sebastian Graf at 2020-05-27T18:32:27-04:00
DmdAnal: Recognise precise exceptions from case alternatives (#18086)

Consider

```hs
m :: IO ()
m = do
  putStrLn "foo"
  error "bar"
```

`m` (from #18086) always throws a (precise or imprecise) exception or
diverges. Yet demand analysis infers `<L,A>` as demand signature instead
of `<L,A>x` for it.

That's because the demand analyser sees `putStrLn` occuring in a case
scrutinee and decides that it has to `deferAfterPreciseException`,
because `putStrLn` throws a precise exception on some control flow
paths. This will mask the `botDiv` `Divergence`of the single case alt
containing `error` to `topDiv`. Since `putStrLn` has `topDiv` itself,
the final `Divergence` is `topDiv`.

This is easily fixed: `deferAfterPreciseException` works by `lub`ing
with the demand type of a virtual case branch denoting the precise
exceptional control flow. We used `nopDmdType` before, but we can be
more precise and use `exnDmdType`, which is `nopDmdType` with `exnDiv`.

Now the `Divergence` from the case alt will degrade `botDiv` to `exnDiv`
instead of `topDiv`, which combines with the result from the scrutinee
to `exnDiv`, and all is well.

Fixes #18086.

- - - - -
b6c76ea9 by Ben Gamari at 2020-05-27T18:32:27-04:00
Ticky-ticky: Record DataCon name in ticker name

This makes it significantly easier to spot the nature of
allocations regressions and comes at a reasonably low cost.

- - - - -
752f9d02 by Ben Gamari at 2020-05-27T18:32:28-04:00
hadrian: Don't track GHC's verbosity argument

Teach hadrian to ignore GHC's -v argument in its recompilation check,
thus fixing #18131.

- - - - -
de24f092 by Ben Gamari at 2020-05-27T18:32:29-04:00
Rip out CmmStackInfo(updfr_space)

As noted in #18232, this field is currently completely unused and
moreover doesn't have a clear meaning.

- - - - -


30 changed files:

- compiler/GHC/Cmm.hs
- compiler/GHC/Cmm/LayoutStack.hs
- compiler/GHC/Cmm/Ppr.hs
- compiler/GHC/Cmm/ProcPoint.hs
- compiler/GHC/Core/Opt/FloatOut.hs
- compiler/GHC/Core/Opt/SetLevels.hs
- compiler/GHC/Core/Opt/Simplify/Monad.hs
- compiler/GHC/Core/Unfold.hs
- compiler/GHC/HsToCore/PmCheck/Oracle.hs
- compiler/GHC/Parser.y
- compiler/GHC/Runtime/Eval.hs
- compiler/GHC/StgToCmm/Bind.hs
- compiler/GHC/StgToCmm/Monad.hs
- compiler/GHC/StgToCmm/Ticky.hs
- compiler/GHC/Tc/Solver/Flatten.hs
- compiler/GHC/Tc/Solver/Monad.hs
- compiler/GHC/Tc/Utils/Monad.hs
- compiler/GHC/Types/Demand.hs
- compiler/GHC/Utils/Error.hs
- docs/core-spec/CoreLint.ott
- docs/core-spec/CoreSyn.ott
- docs/core-spec/README
- docs/core-spec/core-spec.mng
- docs/core-spec/core-spec.pdf
- docs/users_guide/runtime_control.rst
- hadrian/src/Target.hs
- includes/rts/EventLogWriter.h
- libraries/template-haskell/Language/Haskell/TH/Syntax.hs
- libraries/template-haskell/changelog.md
- rts/eventlog/EventLogWriter.c


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1ecba71ee3ca880032d87e6e5dc89eb4a60d6ecc...de24f09226e05e5d8fbfea12bc7edd7513b368e6

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1ecba71ee3ca880032d87e6e5dc89eb4a60d6ecc...de24f09226e05e5d8fbfea12bc7edd7513b368e6
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200527/0945962c/attachment.html>


More information about the ghc-commits mailing list