summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* TEMPwip/simple-count-m-no-dflagsJohn Ericson2022-07-023-20/+36
|
* Some more cleanupDominik Peteler2022-07-036-129/+61
| | | | | | | | | | | | | | | | * 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.
* Removed references to driver from Specialise passDominik Peteler2022-07-012-56/+65
|
* Get rid of `CorePrep`Dominik Peteler2022-07-015-14/+31
|
* Get rid of `CoreTidy`Dominik Peteler2022-07-015-10/+40
|
* Get rid of `CoreDesugarOpt`Dominik Peteler2022-07-015-15/+37
|
* Get rid of `CoreDesugar`Dominik Peteler2022-07-015-22/+44
| | | | It is not a Core -> Core pass and so it doesn't belong in that sum type.
* Split `Core.EndPass` from `Core.Lint`Dominik Peteler2022-07-0110-148/+240
| | | | | | This better sepates concerns (linting is domain layer, end pass diagnostics is application later), and `Core.Lint` is a huge module to boot.
* Prep work before removing `InteractiveContext` from `HscEnv`John Ericson2022-07-0111-80/+123
| | | | | The `Core.Lint` and `Stg` refactors we've done so far really help with this.
* Run the CoreToDo interpreter in an own monad `SimplCountM`Dominik Peteler2022-07-0114-463/+516
| | | | | | | | | | | | | | 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: * Moved initSpecialiseOpts to new module GHC.Driver.Config.Core.Opt.Specialise * GHC.Core.Opt.Pipeline.runCorePasses: Take logger service as an argument
* Purified GHC.Core.LateCC.addLateCostCentresDominik Peteler2022-07-016-86/+77
| | | | | | | | * GHC.Driver.Config.Core.Lint: * Removed: endPass * Renamed: endPassHscEnvIO -> endPass * Moved GHC.Core.Opt.Pipeline.initLintAnnotationsConfig to GHC.Driver.Config.Core.Lint
* Removed CoreM uses from GHC.Core.LintDominik Peteler2022-07-013-26/+59
|
* Move CoreM to GHC.Plugins.MonadDominik Peteler2022-07-0133-722/+949
| | | | | | | | | | | | | | | | | | | | | 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.
* Factor fields of `CoreDoSimplify` into separate data typeJohn Ericson2022-07-013-21/+29
| | | | | This avoids some partiality. The work @mmhat is doing cleaning up and modularizing `Core.Opt` will build on this nicely.
* Remove `CoreOccurAnal` constructor of the `CoreToDo` typeDominik Peteler2022-06-293-4/+0
| | | | | It was dead code since the last occurence in an expression context got removed in 71916e1c018dded2e68d6769a2dbb8777da12664.
* Tiny tweak to `IOPort#` documentation Emily Bourke2022-06-291-1/+1
| | | | | The exclamation mark and bracket don’t seem to make sense here. I’ve looked through the history, and I don’t think they’re deliberate – possibly a copy-and-paste error.
* template-haskell: Bump version to 2.19.0.0Ben Gamari2022-06-286-4/+4
| | | | Bumps text and exceptions submodules due to bounds.
* Cleanup BuiltInSyntax vs UserSyntaxMatthew Pickering2022-06-2817-48/+45
| | | | | | | | | | | | There was some confusion about whether FUN/TYPE/One/Many should be BuiltInSyntax or UserSyntax. The answer is certainly UserSyntax as BuiltInSyntax is for things which are directly constructed by the parser rather than going through normal renaming channels. I fixed all the obviously wrong places I could find and added a test for the original bug which was caused by this (#21752) Fixes #21752 #20695 #18302
* Comments only, about join pointsSimon Peyton Jones2022-06-282-3/+38
| | | | | This MR just adds some documentation about why casts destroy join points, following #21716.
* ghc.mk: fix 'make install' (`mk/system-cxx-std-lib-1.0.conf.install` does ↵Sergei Trofimovich2022-06-281-1/+1
| | | | | | | | | | | | | | | | | | not exist) before the change `make install` was failing as: ``` "mv" "/<<NIX>>/ghc-9.3.20220406/lib/ghc-9.5.20220625/bin/ghc-stage2" "/<<NIX>>/ghc-9.3.20220406/lib/ghc-9.5.20220625/bin/ghc" make[1]: *** No rule to make target 'mk/system-cxx-std-lib-1.0.conf.install', needed by 'install_packages'. Stop. ``` I think it's a recent regression caused by 0ef249aa where `system-cxx-std-lib-1.0.conf` is created (somewhat manually), but not the .install varianlt of it. The fix is to consistently use `mk/system-cxx-std-lib-1.0.conf` everywhere. Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/21784
* integer-gmp: Fix cabal fileBen Gamari2022-06-281-4/+5
| | | | Evidently fields may not come after sections in a cabal file.
* testsuite: Add test for #20735Ben Gamari2022-06-284-0/+64
|
* CmmToAsm/AArch64: Sign-extend narrow C argumentsBen Gamari2022-06-281-2/+14
| | | | | | | | The AArch64/Darwin ABI requires that function arguments narrower than 32-bits must be sign-extended by the caller. We neglected to do this, resulting in #20735. Fixes #20735.
* CmmToAsm/AArch64: Re-format argument handling logicBen Gamari2022-06-281-5/+19
| | | | Previously there were very long, hard to parse lines. Fix this.
* -ddump-llvm shouldn't imply -fllvmBen Gamari2022-06-282-2/+3
| | | | | | | | Previously -ddump-llvm would change the backend used, which contrasts with all other dump flags. This is quite surprising and cost me quite a bit of time. Dump flags should not change compiler behavior. Fixes #21776.
* Mark AArch64/Darwin as requiring sign-extensionBen Gamari2022-06-281-0/+5
| | | | | | | Apple's AArch64 ABI requires that the caller sign-extend small integer arguments. Set platformCConvNeedsExtension to reflect this fact. Fixes #21773.
* `.hs-boot` make rules: add missing order-only dependency on target directorySergei Trofimovich2022-06-271-2/+2
| | | | | | | | | | | | | | | | | | | | Noticed missing target directory dependency as a build failure in `make --shuffle` mode (added in https://savannah.gnu.org/bugs/index.php?62100): "cp" libraries/base/./GHC/Stack/CCS.hs-boot libraries/base/dist-install/build/GHC/Stack/CCS.hs-boot cp: cannot create regular file 'libraries/base/dist-install/build/GHC/Stack/CCS.hs-boot': No such file or directory libraries/haskeline/ghc.mk:4: libraries/haskeline/dist-install/build/.depend-v-p-dyn.haskell: No such file or directory make[1]: *** [libraries/base/ghc.mk:4: libraries/base/dist-install/build/GHC/Stack/CCS.hs-boot] Error 1 shuffle=1656129254 make: *** [Makefile:128: all] Error 2 shuffle=1656129254 Note that `cp` complains about inability to create target file. The change adds order-only dependency on a target directory (similar to the rest of rules in that file). The bug is lurking there since 2009 commit 34cc75e1a (`GHC new build system megapatch`.) where upfront directory creation was never added to `.hs-boot` files.
* configure: Only probe for LD in FIND_LDBen Gamari2022-06-271-1/+2
| | | | | | | | | Since 6be2c5a7e9187fc14d51e1ec32ca235143bb0d8b we would probe for LD rather early in `configure`. However, it turns out that this breaks `configure`'s `ld`-override logic, which assumes that `LD` was set by the user and aborts. Fixes #21778.
* testsuite: Hide output from test compilations with verbosity==2Ben Gamari2022-06-271-1/+1
| | | | | | | | | Previously the output from test compilations used to determine whether, e.g., profiling libraries are available was shown with verbosity levels >= 2. However, the default level is 2, meaning that most users were often spammed with confusing errors. Fix this by bumping the verbosity threshold for this output to >=3. Fixes #21760.
* hadrian: Update main README pageMatthew Pickering2022-06-271-43/+39
| | | | | | This README had some quite out-of-date content about the build system so I did a complete pass deleting old material. I also made the section about flavours more prominent and mentioned flavour transformers.
* add tests for addrToAny# levityNaomi Liu2022-06-272-0/+45
|
* add levity polymorphism to addrToAny#Naomi Liu2022-06-271-1/+1
|
* Add Foldable1 and Bifoldable1 type classesBodigrim2022-06-274-1/+566
| | | | | | | | | | | | Approved by CLC in https://github.com/haskell/core-libraries-committee/issues/9 Instances roughly follow https://hackage.haskell.org/package/semigroupoids-5.3.7/docs/Data-Semigroup-Foldable-Class.html#t:Foldable1 but the API of `Foldable1` was expanded in comparison to `semigroupoids`. Compatibility shim is available from https://github.com/phadej/foldable1 (to be released). Closes #13573.
* Remove the traces of i386-*-openbsd, long live amd64Greg Steuck2022-06-273-4/+2
| | | | | | | | | | | OpenBSD will not ship any ghc packages on i386 starting with 7.2 release. This means there will not be a bootstrap compiler easily available. The last available binaries are ghc-8.10.6 which is already not supported as bootstrap for HEAD. See here for more information: https://marc.info/?l=openbsd-ports&m=165060700222580&w=2
* Add suggestions for unrecognised pragmas (#21589)Tony Zorman2022-06-2712-13/+71
| | | | | | | In case of a misspelled pragma, offer possible corrections as to what the user could have meant. Fixes: https://gitlab.haskell.org/ghc/ghc/-/issues/21589
* Don't mark lambda binders as OtherConAndreas Klebinger2022-06-2733-405/+717
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to put OtherCon unfoldings on lambda binders of workers and sometimes also join points/specializations with with the assumption that since the wrapper would force these arguments once we execute the RHS they would indeed be in WHNF. This was wrong for reasons detailed in #21472. So now we purge evaluated unfoldings from *all* lambda binders. This fixes #21472, but at the cost of sometimes not using as efficient a calling convention. It can also change inlining behaviour as some occurances will no longer look like value arguments when they did before. As consequence we also change how we compute CBV information for arguments slightly. We now *always* determine the CBV convention for arguments during tidy. Earlier in the pipeline we merely mark functions as candidates for having their arguments treated as CBV. As before the process is described in the relevant notes: Note [CBV Function Ids] Note [Attaching CBV Marks to ids] Note [Never put `OtherCon` unfoldigns on lambda binders] ------------------------- Metric Decrease: T12425 T13035 T18223 T18223 T18923 MultiLayerModulesTH_OneShot Metric Increase: WWRec -------------------------
* hadrian: Improve haddocks for ghcDebugAssertionsAndreas Klebinger2022-06-271-1/+1
|
* linters: Fix lint-submodule-refs when crashing trying to find plausible branchesMatthew Pickering2022-06-271-1/+1
|
* testsuite: Use normalise_version more consistentlyBen Gamari2022-06-278-16/+16
| | | | | Previously several tests' output were unnecessarily dependent on version numbers, particularly of `base`. Fix this.
* Bump ghc-prim and base versionsBen Gamari2022-06-2743-56/+57
| | | | | | | | | To 0.9.0 and 4.17.0 respectively. Bumps array, deepseq, directory, filepath, haskeline, hpc, parsec, stm, terminfo, text, unix, haddock, and hsc2hs submodules. (cherry picked from commit ba47b95122b7b336ce1cc00896a47b584ad24095)
* Bump nofib submodule.Andreas Klebinger2022-06-221-0/+0
| | | | | | Allows the shake runner to build with 9.2.3 among other things. Fixes #21772
* Use correct arch for the FreeBSD triple in gen-data-layout.shGleb Popov2022-06-221-1/+1
| | | | | Downstream bug for reference: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261798 Relevant upstream issue: #15718
* TagCheck.hs: Properly check if arguments are boxed types.Andreas Klebinger2022-06-222-7/+6
| | | | | | | | | | | For one by mistake I had been checking against the kind of runtime rep instead of the boxity. This uncovered another bug, namely that we tried to generate the checking code before we had associated the function arguments with a register, so this could never have worked to begin with. This fixes #21729 and both of the above issues.
* When specialising, look through floatable ticks.Gergo ERDI2022-06-221-5/+22
| | | | Fixes #21697.
* re-export GHC.Natural.minusNaturalMaybe from Numeric.NaturalArtem Pelenitsyn2022-06-222-0/+3
| | | | CLC proposal: https://github.com/haskell/core-libraries-committee/issues/45
* runhaskellEric Lindblad2022-06-221-1/+1
|
* eventlog: Don't leave dangling pointers hanging aroundBen Gamari2022-06-221-0/+2
| | | | | | | Previously we failed to reset pointers to various eventlog buffers to NULL after freeing them. In principle we shouldn't look at them after they are freed but nevertheless it is good practice to set them to a well-defined value.
* Transcribe discussion from #21483 into a NoteMatthew Pickering2022-06-221-0/+78
| | | | | | | | | In #21483 I had a discussion with Simon Marlow about the memory retention behaviour of -Fd. I have just transcribed that conversation here as it elucidates the potentially subtle assumptions which led to the design of the memory retention behaviours of -Fd. Fixes #21483
* Correct documentation of defaults of the `-V` RTS optionAlexander Esgen2022-06-221-6/+7
|
* Add laws for 'toInteger' and 'toRational'Michael Peyton Jones2022-06-223-0/+21
| | | | | CLC discussion here: https://github.com/haskell/core-libraries-committee/issues/58