summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gitlab-ci: Drop make build validation jobsBen Gamari2022-08-252-59/+0
| | | | In preparation for removal of the `make`-based build system
* validate: Drop --legacy flagBen Gamari2022-08-251-196/+101
| | | | In preparation for removal of the legacy `make`-based build system.
* hadrian: Fix whitespaceBen Gamari2022-08-251-33/+32
| | | | Previously this region of Settings.Packages was incorrectly indented.
* Scrub some partiality in `CommonBlockElim`.M Farkas-Dyck2022-08-251-10/+9
|
* upload_ghc_libs: Add means of passing Hackage credentialsBen Gamari2022-08-251-16/+23
|
* Fix arityType: -fpedantic-bottoms, join points, etcwip/T21694aSimon Peyton Jones2022-08-2526-492/+3359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This MR fixes #21694, #21755. It also makes sure that #21948 and fix to #21694. * For #21694 the underlying problem was that we were calling arityType on an expression that had free join points. This is a Bad Bad Idea. See Note [No free join points in arityType]. * To make "no free join points in arityType" work out I had to avoid trying to use eta-expansion for runRW#. This entailed a few changes in the Simplifier's treatment of runRW#. See GHC.Core.Opt.Simplify.Iteration Note [No eta-expansion in runRW#] * I also made andArityType work correctly with -fpedantic-bottoms; see Note [Combining case branches: andWithTail]. * Rewrote Note [Combining case branches: optimistic one-shot-ness] * arityType previously treated join points differently to other let-bindings. This patch makes them unform; arityType analyses the RHS of all bindings to get its ArityType, and extends am_sigs. I realised that, now we have am_sigs giving the ArityType for let-bound Ids, we don't need the (pre-dating) special code in arityType for join points. But instead we need to extend the env for Rec bindings, which weren't doing before. More uniform now. See Note [arityType for let-bindings]. This meant we could get rid of ae_joins, and in fact get rid of EtaExpandArity altogether. Simpler. * And finally, it was the strange treatment of join-point Ids in arityType (involving a fake ABot type) that led to a serious bug: #21755. Fixed by this refactoring, which treats them uniformly; but without breaking #18328. In fact, the arity for recursive join bindings is pretty tricky; see the long Note [Arity for recursive join bindings] in GHC.Core.Opt.Simplify.Utils. That led to more refactoring, including deciding that an Id could have an Arity that is bigger than its JoinArity; see Note [Invariants on join points], item 2(b) in GHC.Core * Make sure that the "demand threshold" for join points in DmdAnal is no bigger than the join-arity. In GHC.Core.Opt.DmdAnal see Note [Demand signatures are computed for a threshold arity based on idArity] * I moved GHC.Core.Utils.exprIsDeadEnd into GHC.Core.Opt.Arity, where it more properly belongs. * Remove an old, redundant hack in FloatOut. The old Note was Note [Bottoming floats: eta expansion] in GHC.Core.Opt.SetLevels. Compile time improves very slightly on average: Metrics: compile_time/bytes allocated --------------------------------------------------------------------------------------- T18223(normal) ghc/alloc 725,808,720 747,839,216 +3.0% BAD T6048(optasm) ghc/alloc 105,006,104 101,599,472 -3.2% GOOD geo. mean -0.2% minimum -3.2% maximum +3.0% For some reason Windows was better T10421(normal) ghc/alloc 125,888,360 124,129,168 -1.4% GOOD T18140(normal) ghc/alloc 85,974,520 83,884,224 -2.4% GOOD T18698b(normal) ghc/alloc 236,764,568 234,077,288 -1.1% GOOD T18923(normal) ghc/alloc 75,660,528 73,994,512 -2.2% GOOD T6048(optasm) ghc/alloc 112,232,512 108,182,520 -3.6% GOOD geo. mean -0.6% I had a quick look at T18223 but it is knee deep in coercions and the size of everything looks similar before and after. I decided to accept that 3% increase in exchange for goodness elsewhere. Metric Decrease: T10421 T18140 T18698b T18923 T6048 Metric Increase: T18223
* rts: Consistently use MiB in stats outputBen Gamari2022-08-241-1/+1
| | | | Previously we would say `MB` even where we meant `MiB`.
* driver: don't actually merge objects when ar -L worksCheng Shao2022-08-241-1/+1
|
* Unbreak Haddock comments in `GHC.Core.Opt.WorkWrap.Utils`.M Farkas-Dyck2022-08-241-13/+12
| | | | Closes #22092.
* hadrian: Don't duplicate binaries on installationBen Gamari2022-08-221-1/+5
| | | | | | | Previously we used `install` on symbolic links, which ended up copying the target file rather than installing a symbolic link. Fixes #22062.
* Updated the changelogMario Blažević2022-08-221-0/+5
|
* Test for issue #21942Mario Blažević2022-08-223-0/+10
|
* Fix and test for issue #21723Mario Blažević2022-08-224-12/+26
|
* Added pprType with precedence argument, as a prerequisite to fix issues ↵Mario Blažević2022-08-225-76/+80
| | | | | | | | | | | #21723 and #21942. * refines the precedence levels, adding `qualPrec` and `funPrec` to better control parenthesization * `pprParendType`, `pprFunArgType`, and `instance Ppr Type` all just call `pprType` with proper precedence * `ParensT` constructor is now always printed parenthesized * adds the precedence argument to `pprTyApp` as well, as it needs to keep track and pass it down * using `>=` instead of former `>` to match the Core type printing logic * some test outputs have changed, losing extraneous parentheses
* hadrian: Fix bootstrapping with ghc-9.4Matthew Pickering2022-08-211-0/+1
| | | | | | | | | | | The error was that we were trying to link together containers from boot package library (which depends template-haskell in boot package library) template-haskell from in-tree package database So the fix is to build containers in stage0 (and link against template-haskell built in stage0). Fixes #21981
* Recognize file-header pragmas in GHCi (#21507)MorrowM2022-08-215-0/+40
|
* 19217 Implicitly quantify type variables in :kind commandSasha Bogicevic2022-08-195-6/+24
|
* Print constraints in quotes (#21167)Swann Moreau2022-08-19191-641/+643
| | | | | | | This patch improves the uniformity of error message formatting by printing constraints in quotes, as we do for types. Fix #21167
* Fix #22048 where we failed to drop rules for -fomit-interface-pragmas.Andreas Klebinger2022-08-193-1/+14
| | | | Now we also filter the local rules (again) which fixes the issue.
* tc: warn about lazy annotations on unlifted arguments (fixes #21951)Zachary Wood2022-08-198-0/+57
|
* Revert "Refactor SpecConstr to use treat bindings uniformly"Matthew Pickering2022-08-191-260/+264
| | | | | | | | | | This reverts commit 415468fef8a3e9181b7eca86de0e05c0cce31729. This refactoring introduced quite a severe residency regression (900MB live from 650MB live when compiling mmark), see #21993 for a reproducer and more discussion. Ticket #21993
* haddock docs: Fix links from identifiers to dependent packagesMatthew Pickering2022-08-192-6/+5
| | | | | | | | | When implementing the base_url changes I made the pretty bad mistake of zipping together two lists which were in different orders. The simpler thing to do is just modify `haddockDependencies` to also return the package identifier so that everything stays in sync. Fixes #22001
* Force unfoldings when they are cleaned-up in Tidy and CorePrepMatthew Pickering2022-08-192-3/+7
| | | | | | | | If these thunks are not forced then the entire unfolding for the binding is live throughout the whole of CodeGen despite the fact it should have been discarded. Fixes #22071
* Force `getOccFS bndr` to avoid retaining reference to Bndr.Matthew Pickering2022-08-191-2/+5
| | | | This is another symptom of #19619
* Make ru_fn field strict to avoid retaining IdsMatthew Pickering2022-08-192-2/+3
| | | | | | It's better to perform this projection from Id to Name strictly so we don't retain an old Id (hence IdInfo, hence Unfolding, hence everything etc)
* compiler: Drop --build-id=none hackBen Gamari2022-08-1810-43/+1
| | | | | | | | | Since 2011 the object-joining implementation has had a hack to pass `--build-id=none` to `ld` when supported, seemingly to work around a linker bug. This hack is now unnecessary and may break downstream users who expect objects to have valid build-ids. Remove it. Closes #22060.
* testsuite: Add test for #21583Bryan Richter2022-08-183-0/+113
|
* Be more careful in chooseInferredQuantifiersSimon Peyton Jones2022-08-187-30/+146
| | | | | | | This fixes #22065. We were failing to retain a quantifier that was mentioned in the kind of another retained quantifier. Easy to fix.
* driver: Honour -x optionMatthew Pickering2022-08-185-40/+45
| | | | | | | | | | | | | 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
* ghc-heap: Fix decoding of TSO closuresMatthew Pickering2022-08-182-2/+7
| | | | | | | 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
* Implement Response File support for HPCPeter Becich2022-08-178-16/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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@thewallacepack.net> Fixes #22050
* users-guide: Rephrase the rewrite rule documentationBen Gamari2022-08-161-2/+2
| | | | | | Previously the wording was a tad unclear. Fix this. Closes #21114.
* relnotes: Add "included libraries" sectionBen Gamari2022-08-161-0/+47
| | | | As noted in #21988, some users rely on this.
* base: Add changelog entries from ghc-9.2Ben Gamari2022-08-161-6/+47
| | | | Closes #21922.
* Bump haddock submoduleBen Gamari2022-08-161-0/+0
| | | | | Includes merge of `main` into `ghc-head` as well as some Haddock users guide fixes.
* hadrian: Place manpage in docrootBen Gamari2022-08-161-1/+1
| | | | This relocates it from docs/ to doc/
* users-guide: Add :ghc-flag: referenceBen Gamari2022-08-161-1/+1
|
* users-guide: Fix incorrect reference to `:extension: roleBen Gamari2022-08-161-1/+1
|
* users-guide: Fix reference to dead llvm-version substitutionBen Gamari2022-08-161-2/+2
| | | | Fixes #22052.
* Fix #21979 - compact-share failing with -OAndreas Klebinger2022-08-161-2/+2
| | | | | 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.
* CmmToAsm/AArch64: correct a typoCheng Shao2022-08-161-1/+1
|
* run_ci: remove monoidal-containersBryan Richter2022-08-161-11/+26
| | | | | | | | | 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.
* CmmToLlvm: Don't aliasify builtin LLVM variablesBen Gamari2022-08-161-4/+16
| | | | | | | | | 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.
* typoEric Lindblad2022-08-161-2/+2
|
* Revert "gitlab-ci: Add release job for aarch64/debian 11"Matthew Pickering2022-08-112-178/+0
| | | | | | | | | This reverts commit 5765e13370634979eb6a0d9f67aa9afa797bee46. The job was not tested before being merged and fails CI (https://gitlab.haskell.org/ghc/ghc/-/jobs/1139392) Ticket #22005
* EPA: DotFieldOcc does not have exact print annotationsAlan Zimmerman2022-08-1136-77/+160
| | | | | | | | | | | | | | | | | For the code {-# LANGUAGE OverloadedRecordUpdate #-} operatorUpdate f = f{(+) = 1} There are no exact print annotations for the parens around the + symbol, nor does normal ppr print them. This MR fixes that. Closes #21805 Updates haddock submodule
* Document that threadDelay / timeout are susceptible to overflows on 32-bit ↵Bodigrim2022-08-108-1/+48
| | | | machines
* Note [Trimming auto-rules]: State that this improves compiler perf.Andreas Klebinger2022-08-101-0/+7
|
* ncg/aarch64: Don't use x18 register on AArch64/Darwinnormalcoder2022-08-101-0/+8
| | | | | | | | | Apple's ABI documentation [1] says: "The platforms reserve register x18. Don’t use this register." While this wasn't problematic in previous Darwin releases, macOS 13 appears to start zeroing this register periodically. See #21964. [1] https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms
* hadrian: Don't attempt to install documentation if doc/ doesn't existBen Gamari2022-08-101-4/+6
| | | | | | | | | Previously we would attempt to install documentation even if the `doc` directory doesn't exist (e.g. due to `--docs=none`). This would result in the surprising side-effect of the entire contents of the bindist being installed in the destination documentation directory. Fix this. Fixes #21976.