[Git][ghc/ghc][wip/21611-move-corem] 51 commits: typo
Dominik Peteler (@mmhat)
gitlab at gitlab.haskell.org
Thu Aug 18 14:51:02 UTC 2022
Dominik Peteler pushed to branch wip/21611-move-corem at Glasgow Haskell Compiler / GHC
Commits:
ffc9116e by Eric Lindblad at 2022-08-16T09:01:26-04:00
typo
- - - - -
cd6f5bfd by Ben Gamari at 2022-08-16T09:02:02-04:00
CmmToLlvm: Don't aliasify builtin LLVM variables
Our aliasification logic would previously turn builtin LLVM variables
into aliases, which apparently confuses LLVM. This manifested in
initializers failing to be emitted, resulting in many profiling failures
with the LLVM backend.
Fixes #22019.
- - - - -
dc7da356 by Bryan Richter at 2022-08-16T09:02:38-04:00
run_ci: remove monoidal-containers
Fixes #21492
MonoidalMap is inlined and used to implement Variables, as before.
The top-level value "jobs" is reimplemented as a regular Map, since it
doesn't use the monoidal union anyway.
- - - - -
64110544 by Cheng Shao at 2022-08-16T09:03:15-04:00
CmmToAsm/AArch64: correct a typo
- - - - -
f6a5524a by Andreas Klebinger at 2022-08-16T14:34:11-04:00
Fix #21979 - compact-share failing with -O
I don't have good reason to believe the optimization level should affect
if sharing works or not here. So limit the test to the normal way.
- - - - -
68154a9d by Ben Gamari at 2022-08-16T14:34:47-04:00
users-guide: Fix reference to dead llvm-version substitution
Fixes #22052.
- - - - -
28c60d26 by Ben Gamari at 2022-08-16T14:34:47-04:00
users-guide: Fix incorrect reference to `:extension: role
- - - - -
71102c8f by Ben Gamari at 2022-08-16T14:34:47-04:00
users-guide: Add :ghc-flag: reference
- - - - -
385f420b by Ben Gamari at 2022-08-16T14:34:47-04:00
hadrian: Place manpage in docroot
This relocates it from docs/ to doc/
- - - - -
84598f2e by Ben Gamari at 2022-08-16T14:34:47-04:00
Bump haddock submodule
Includes merge of `main` into `ghc-head` as well as some Haddock users
guide fixes.
- - - - -
59ce787c by Ben Gamari at 2022-08-16T14:34:47-04:00
base: Add changelog entries from ghc-9.2
Closes #21922.
- - - - -
a14e6ae3 by Ben Gamari at 2022-08-16T14:34:47-04:00
relnotes: Add "included libraries" section
As noted in #21988, some users rely on this.
- - - - -
a4212edc by Ben Gamari at 2022-08-16T14:34:47-04:00
users-guide: Rephrase the rewrite rule documentation
Previously the wording was a tad unclear. Fix this.
Closes #21114.
- - - - -
3e493dfd by Peter Becich at 2022-08-17T08:43:21+01:00
Implement Response File support for HPC
This is an improvement to HPC authored by Richard Wallace
(https://github.com/purefn) and myself. I have received permission from
him to attempt to upstream it. This improvement was originally
implemented as a patch to HPC via input-output-hk/haskell.nix:
https://github.com/input-output-hk/haskell.nix/pull/1464
Paraphrasing Richard, HPC currently requires all inputs as command line arguments.
With large projects this can result in an argument list too long error.
I have only seen this error in Nix, but I assume it can occur is a plain Unix environment.
This MR adds the standard response file syntax support to HPC. For
example you can now pass a file to the command line which contains the
arguments.
```
hpc @response_file_1 @response_file_2 ...
The contents of a Response File must have this format:
COMMAND ...
example:
report my_library.tix --include=ModuleA --include=ModuleB
```
Updates hpc submodule
Co-authored-by: Richard Wallace <rwallace at thewallacepack.net>
Fixes #22050
- - - - -
436867d6 by Matthew Pickering at 2022-08-18T09:24:08-04:00
ghc-heap: Fix decoding of TSO closures
An extra field was added to the TSO structure in 6d1700b6 but the
decoding logic in ghc-heap was not updated for this new field.
Fixes #22046
- - - - -
a740a4c5 by Matthew Pickering at 2022-08-18T09:24:44-04:00
driver: Honour -x option
The -x option is used to manually specify which phase a file should be
started to be compiled from (even if it lacks the correct extension). I
just failed to implement this when refactoring the driver.
In particular Cabal calls GHC with `-E -cpp -x hs Foo.cpphs` to
preprocess source files using GHC.
I added a test to exercise this case.
Fixes #22044
- - - - -
e293029d by Simon Peyton Jones at 2022-08-18T09:25:19-04:00
Be more careful in chooseInferredQuantifiers
This fixes #22065. We were failing to retain a quantifier that
was mentioned in the kind of another retained quantifier.
Easy to fix.
- - - - -
27d2c180 by Dominik Peteler at 2022-08-18T16:50:14+02:00
Move CoreM to GHC.Plugins.Monad
Removes the uses of CoreM in the Specialise, SpecConstr and CallerCC
pass. Since CoreM is now only used by Core2core plugins within the Core
pipeline the monad got moved to an own module.
Additionally CoreToDo and related types got moved to an own module
GHC.Core.Opt.Pipeline.Types.
Moved the remaining code from GHC.Core.Opt.Monad to GHC.Core.Opt.Utils.
GHC.Core.Opt.{SpecConstr,CallerCC} got proper configs / the usual treatment.
Split out GHC.Core.Opt.CallerCC.Filter to avoid hs-boot.
Removed explicit PrintUnqualified argument from `endPassIO`
Removed `CoreToDo` from GHC.Core.Lint and GHC.CoreToStg.Prep
Fixes #21611.
- - - - -
6652eb0b by Dominik Peteler at 2022-08-18T16:50:15+02:00
Removed CoreM uses from GHC.Core.Lint
- - - - -
96e32496 by Dominik Peteler at 2022-08-18T16:50:16+02:00
Purified GHC.Core.LateCC.addLateCostCentres
* GHC.Driver.Config.Core.Lint:
* Removed: endPass
* Renamed: endPassHscEnvIO -> endPass
* Moved GHC.Core.Opt.Pipeline.initLintAnnotationsConfig to
GHC.Driver.Config.Core.Lint
- - - - -
78b64de1 by Dominik Peteler at 2022-08-18T16:50:17+02:00
Run the CoreToDo interpreter in an own monad `SimplCountM`
This monad is just `StateT SimplCount IO` wrapped in a newtype.
This way we get rid of some `Core.Opt.Pipeline` boilerplate.
It lives in GHC.Core.Opt.Counting and `Tick` and `SimplCount` got moved
there as well.
Also:
* GHC.Core.Opt.Pipeline.runCorePasses: Take logger service as an
argument
- - - - -
c191d2e0 by Dominik Peteler at 2022-08-18T16:50:19+02:00
Removed references to driver from Specialise pass
- - - - -
5d7dba18 by Dominik Peteler at 2022-08-18T16:50:20+02:00
Split `Core.EndPass` from `Core.Lint`
This better sepates concerns (linting is domain layer, end pass
diagnostics is application later), and `Core.Lint` is a huge module to
boot.
- - - - -
c1726582 by Dominik Peteler at 2022-08-18T16:50:21+02:00
Get rid of `CoreDesugar`, `CoreDesugarOpt`, `CoreTidy`, `CorePrep`
Those are not Core -> Core passes and so they don't belong in that sum type.
Also cleaned up a bit:
* Removed 'GHC.Driver.Config.Core.Lint.lintCoreBindings'
It was dead code.
* Removed 'GHC.Driver.Config.Core.Lint.lintPassResult'
It run the actual linting and therefore it didn't belong to the
GHC.Driver.Config namespace. As it was used only once the definition
got inlined.
* GHC.Core.Lint: Renamed lintPassResult' to lintPassResult.
Also renamed lintCoreBindings' to lintCoreBindings.
* GHC.Driver.Config.Core.Lint: Stick to the defaults when initializing
the config records.
* GHC.Driver.Config.Core.EndPass: Inlined `endPass`
* GHC.Driver.Config.Core.EndPass: Removed `endPassLintFlags` as it was never used
- - - - -
f1df7cf5 by Dominik Peteler at 2022-08-18T16:50:22+02:00
Simplified initSimplifyOpts
- - - - -
239651a9 by Dominik Peteler at 2022-08-18T16:50:24+02:00
Adjusted tests
- - - - -
044553f1 by Dominik Peteler at 2022-08-18T16:50:25+02:00
Removed RuleBase from getCoreToDo
- - - - -
0202a6c2 by Dominik Peteler at 2022-08-18T16:50:26+02:00
Purified initSpecialiseOpts
Also pass the rule bases and the visible orphan modules as arguments to
the Specialise pass.
- - - - -
09200e59 by Dominik Peteler at 2022-08-18T16:50:27+02:00
Simplified CoreToDo interpreter a bit
- - - - -
598a86f5 by Dominik Peteler at 2022-08-18T16:50:28+02:00
Config records of some Core passes are now provided by CoreToDo
* CoreAddCallerCcs
* CoreAddLateCcs
* CoreDoFloatInwards
* CoreLiberateCase
* CoreDoSpecConstr
- - - - -
80fe358b by Dominik Peteler at 2022-08-18T16:50:29+02:00
Move Core pipeline to the driver
* Moved `getCoreToDo` to an own module GHC.Driver.Config.Core.Opt
* Moved the remaining part of GHC.Core.Opt.Pipeline to a new module GHC.Driver.Core.Opt
* Renamed GHC.Core.Opt.Pipeline.Types to GHC.Core.Opt.Config
- - - - -
245d0645 by Dominik Peteler at 2022-08-18T16:50:31+02:00
Fixed tests
- - - - -
0fc79dee by Dominik Peteler at 2022-08-18T16:50:32+02:00
Fixed note
- - - - -
ccf8e7fc by John Ericson at 2022-08-18T16:50:33+02:00
Add some haddocks
- - - - -
aee3e2bb by John Ericson at 2022-08-18T16:50:34+02:00
Move `core2core` to `GHC.Driver.Main`
This "pushes up" the planning vs execution split, by not combining the
two until a further downstream module. That helps encourage this
separation we are very much fans of.
Also deduplicate some logic with `liftCoreMToSimplCountM`, which
abstracts over a number of details to eliminate a `CoreM` to a
`SimpleCountM`. It might be a bit too opinionated at the moment, in
which case we will think about how to shuffle some things around.
In addition, deduplicate `simplMask`, which is indeed sketchy thing to
export, but we can deal with that later.
- - - - -
ae282309 by John Ericson at 2022-08-18T16:50:35+02:00
Factor out `readRuleEnv` into its own module nad give haddocks
Might end up up recombining this but its good separation of concerns for
now.
- - - - -
84b43b36 by John Ericson at 2022-08-18T16:50:36+02:00
Quick and dirty chop up modules once again
I decided my earlier recommendation to mmhat was not quite write. It was
the one I implemented too. So through this together real quick and
dirty. We can make it nicer afterwords
Things that are not yet nice:
- `CoreOptEnv` is a grab bag of junk. Of course, it is merely reifying
how was were accessing `HscEnv` before --- also rather junky! So
maybe it cannot totally be improved. But it would be good to go over
bits and ask / make issues (like #21926) that would help us clean up
later.
- Logging tricks for annotations linting is broken from the planning vs
execution separation. We'll need to "delay that part of planning too.
Can hack it up with more higher order function tricks, might be also
a good oppertunity to rethink what should go in which config.
- Some of the per-pass config records require info that isn't available
at planning time. I hacked up up with functions in `CoreToDo` but we
could do better.
Conversely, per #21926, perhaps we *should* include the module name
in the config after all, since we know it from downsweep before
upsweep begins.
- `GHC.Driver.Core.Rules` could just go inside `GHC.Driver.Core.Opt`.
- - - - -
d80d5ad7 by John Ericson at 2022-08-18T16:50:37+02:00
Split `GHC.Core.Opt.Utils`
Half of it was domain layer (float out switches) but the other half was
infrastructure / driver (annotations).
- - - - -
b899c482 by Dominik Peteler at 2022-08-18T16:50:39+02:00
Fixed tests
- - - - -
f0a4641c by Dominik Peteler at 2022-08-18T16:50:40+02:00
Better configuration of Core lint debug options
- - - - -
0ef746da by Dominik Peteler at 2022-08-18T16:50:41+02:00
Configuration record for rule check pass
- - - - -
8202226b by Dominik Peteler at 2022-08-18T16:50:42+02:00
Renamed dmdAnal to demandAnalysis and moved it to GHC.Core.Opt.DmdAnal
- - - - -
19e48965 by Dominik Peteler at 2022-08-18T16:50:43+02:00
Fix tests
- - - - -
6334054a by Dominik Peteler at 2022-08-18T16:50:44+02:00
Added environment for worker/wrapper pass
- - - - -
11bd4d83 by Dominik Peteler at 2022-08-18T16:50:46+02:00
Refactored configuration of Specialise pass again
Also removed GHC.Core.Opt.Specialise.Config again. We may introduce separate
*.Config modules for the passes once we had a look at the module graph
and decide whether the addition of these modules is justified.
- - - - -
c01d5c86 by Dominik Peteler at 2022-08-18T16:50:47+02:00
Removed GHC.Driver.Core.Rules
- - - - -
5e0e18c4 by Dominik Peteler at 2022-08-18T16:50:48+02:00
Removed CoreDoNothing and CoreDoPasses
Rewrote the getCoreToDo function using a Writer monad. This makes these
data constructors superfluous.
- - - - -
b7709ff8 by Dominik Peteler at 2022-08-18T16:50:49+02:00
Renamed endPassIO to endPass
- - - - -
80b24e6e by Dominik Peteler at 2022-08-18T16:50:50+02:00
Renamed hscSimplify/hscSimplify' to optimizeCoreIO/optimizeCoreHsc
- - - - -
d941710f by Dominik Peteler at 2022-08-18T16:50:51+02:00
Run simplifyPgm in SimplCountM
- - - - -
ffaadeb9 by Dominik Peteler at 2022-08-18T16:50:53+02:00
Added note on the architecture of the Core optimizer
- - - - -
30 changed files:
- .gitlab/gen_ci.hs
- compiler/GHC.hs
- compiler/GHC/CmmToAsm/AArch64.hs
- compiler/GHC/CmmToLlvm/Base.hs
- + compiler/GHC/Core/EndPass.hs
- compiler/GHC/Core/LateCC.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Lint/Interactive.hs
- + compiler/GHC/Core/Opt.hs
- compiler/GHC/Core/Opt/CallerCC.hs
- − compiler/GHC/Core/Opt/CallerCC.hs-boot
- + compiler/GHC/Core/Opt/CallerCC/Filter.hs
- compiler/GHC/Core/Opt/Pipeline/Types.hs → compiler/GHC/Core/Opt/Config.hs
- compiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Core/Opt/FloatOut.hs
- + compiler/GHC/Core/Opt/FloatOutSwitches.hs
- − compiler/GHC/Core/Opt/Pipeline.hs
- + compiler/GHC/Core/Opt/RuleCheck.hs
- compiler/GHC/Core/Opt/SetLevels.hs
- compiler/GHC/Core/Opt/Simplify.hs
- compiler/GHC/Core/Opt/Simplify/Monad.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Opt/Stats.hs
- compiler/GHC/Core/Opt/WorkWrap.hs
- compiler/GHC/Core/Opt/WorkWrap/Utils.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/CoreToStg/Prep.hs
- + compiler/GHC/Driver/Config/Core/EndPass.hs
- compiler/GHC/Driver/Config/Core/Lint.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/dd0a2286a2a9abb93e4984e2441c31967f4e57a5...ffaadeb905fc6fca09ed0aed0b32629804290330
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/dd0a2286a2a9abb93e4984e2441c31967f4e57a5...ffaadeb905fc6fca09ed0aed0b32629804290330
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/20220818/bdae935d/attachment-0001.html>
More information about the ghc-commits
mailing list