summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Document that reifyRoles includes kind parameterswip/T21056Richard Eisenberg2022-02-071-1/+13
| | | | Close #21056
* Avoid using removed utils/checkUniques in validateGreg Steuck2022-02-071-1/+0
| | | | | Asked the question: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7460/diffs#4061f4d17546e239dd10d78c6b48668c2a288e02_1_0
* Create `CoverageConfig`John Ericson2022-02-072-7/+27
| | | | | As requested by @mpickering to collect the information we project from `HscEnv`
* GHC.HsToCore.Coverage: No more HscEnv, less DynFlagsJohn Ericson2022-02-072-33/+31
| | | | Progress towards #20730
* hadrian: remove redundant importAlex D2022-02-061-1/+0
|
* RTS: Fix cabal specificationPeter Trommler2022-02-061-4/+0
| | | | | In 35bea01b xxhash.c was removed. Remove the extra-source-files stanza referring to it.
* Purge DynFlags from GHC.StgJohn Ericson2022-02-0620-97/+218
| | | | | Also derive some more instances. GHC doesn't need them, but downstream consumers may need to e.g. put stuff in maps.
* Fix macro redefinition warnings for PRINTFBen Gamari2022-02-063-9/+12
| | | | | | * Move `PRINTF` macro from `Stats.h` to `Stats.c` as it's only needed in the latter. * Undefine `PRINTF` at the end of `Messages.h` to avoid leaking it.
* rts: Dump memory map on memory mapping failuresBen Gamari2022-02-065-0/+158
| | | | Fixes #20992.
* rts/m32: Increase size of free page pool to 256 pagesGHC GitLab CI2022-02-061-1/+1
|
* rts/m32: Free large objects back to the free page poolBen Gamari2022-02-061-3/+2
| | | | Not entirely convinced that this is worth doing.
* rts/m32: Add consistency-checking infrastructureGHC GitLab CI2022-02-061-11/+96
| | | | | | | This adds logic, enabled in the `-debug` RTS for checking the internal consistency of the m32 allocator. This area has always made me a bit nervous so this should help me sleep better at night in exchange for very little overhead.
* rts: Generalize mmapForLinkerMarkExecutableGHC GitLab CI2022-02-067-17/+61
| | | | | Renamed to mprotectForLinker and allowed setting of arbitrary protection modes.
* rts/m32: Accept any address within 4GB of program textBen Gamari2022-02-063-66/+78
| | | | | | | | | | | Previously m32 would assume that the program image was located near the start of the address space and therefore assume that it wanted pages in the bottom 4GB of address space. Instead we now check whether they are within 4GB of whereever the program is loaded. This is necessary on Windows, which now tends to place the image in high memory. The eventual goal is to use m32 to allocate memory for linker sections on Windows.
* Make implication tidying agree with Note [Tidying multiple names at once]Matthew Pickering2022-02-0535-200/+201
| | | | | | | | | | | Note [Tidying multiple names at once] indicates that if multiple variables have the same name then we shouldn't prioritise one of them and instead rename them all to a1, a2, a3... etc This patch implements that change, some error message changes as expected. Closes #20932
* Exit with failure when -e fails (fixes #18411 #9916 #17560)nineonine2022-02-0533-70/+263
|
* Improve errors for non-existent labelsSimon Peyton Jones2022-02-0411-46/+59
| | | | | | | | | | | | | | | | This patch fixes #17469, by improving matters when you use non-existent field names in a record construction: data T = MkT { x :: Int } f v = MkT { y = 3 } The check is now made in the renamer, in GHC.Rename.Env.lookupRecFieldOcc. That in turn led to a spurious error in T9975a, which is fixed by making GHC.Rename.Names.extendGlobalRdrEnvRn fail fast if it finds duplicate bindings. See Note [Fail fast on duplicate definitions] in that module for more details. This patch was originated and worked on by Alex D (@nineonine)
* Add a missing restoreLclEnvSimon Peyton Jones2022-02-041-2/+2
| | | | | | | | | | | | | | The commit commit 18df4013f6eaee0e1de8ebd533f7e96c4ee0ff04 Date: Sat Jan 22 01:12:30 2022 +0000 Define and use restoreLclEnv omitted to change one setLclEnv to restoreLclEnv, namely the one in GHC.Tc.Errors.warnRedundantConstraints. This new commit fixes the omission.
* Add Outputable instance for MessagesSimon Peyton Jones2022-02-041-2/+11
| | | | c.f. #20980
* Fix unsound behavior of unlifted datatypes in ghci (#20194)nineonine2022-02-049-21/+195
| | | | | | | | | | | | Previously, directly calling a function that pattern matches on an unlifted data type which has at least two constructors in GHCi resulted in a segfault. This happened due to unaccounted return frame info table pointer. The fix is to pop the above mentioned frame info table pointer when unlifted things are returned. See Note [Popping return frame for unlifted things] authors: bgamari, nineonine
* primops: Fix documentation of setByteArray#Ben Gamari2022-02-042-5/+8
| | | | | | Previously the documentation was subtly incorrect regarding the bounds of the operation. Fix this and add a test asserting that a zero-length operation is in fact a no-op.
* llvmGen: Handle unaligned loads/storesBen Gamari2022-02-041-7/+7
| | | | | This allows us to produce valid code for indexWord8ArrayAs*# on platforms that lack unaligned memory access.
* Fix array primop alignmentBen Gamari2022-02-042-21/+35
|
* Introduce alignment to CmmStoreBen Gamari2022-02-0418-80/+99
|
* Introduce alignment in CmmLoadBen Gamari2022-02-0426-158/+193
|
* cmm: Introduce cmmLoadBWord and cmmLoadGCWordBen Gamari2022-02-0411-23/+31
|
* Add commentsBen Gamari2022-02-041-0/+2
|
* Drop dead codeBen Gamari2022-02-041-2/+0
|
* Add the Ix class to Foreign C integral typesHécate Moonlight2022-02-045-2/+10
| | | | Related CLC proposal is here: https://github.com/haskell/core-libraries-committee/issues/30
* testsuite: Run testsuite dependency calculation before GHC is builtMatthew Pickering2022-02-0414-81/+212
| | | | | | | | | | | | | | | | | | | | The main motivation for this patch is to allow tests to be added to the testsuite which test things about the source tree without needing to build GHC. In particular the notes linter can easily start failing and by integrating it into the testsuite the process of observing these changes is caught by normal validation procedures rather than having to run the linter specially. With this patch I can run ``` ./hadrian/build test --flavour=devel2 --only="uniques" ``` In a clean tree to run the checkUniques linter without having to build GHC. Fixes #21029
* compiler: Introduce and use RoughMap for instance environmentsBen Gamari2022-02-0460-450/+1063
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here we introduce a new data structure, RoughMap, inspired by the previous `RoughTc` matching mechanism for checking instance matches. This allows [Fam]InstEnv to be implemented as a trie indexed by these RoughTc signatures, reducing the complexity of instance lookup and FamInstEnv merging (done during the family instance conflict test) from O(n) to O(log n). The critical performance improvement currently realised by this patch is in instance matching. In particular the RoughMap mechanism allows us to discount many potential instances which will never match for constraints involving type variables (see Note [Matching a RoughMap]). In realistic code bases matchInstEnv was accounting for 50% of typechecker time due to redundant work checking instances when simplifying instance contexts when deriving instances. With this patch the cost is significantly reduced. The larger constants in InstEnv creation do mean that a few small tests regress in allocations slightly. However, the runtime of T19703 is reduced by a factor of 4. Moreover, the compilation time of the Cabal library is slightly improved. A couple of test cases are included which demonstrate significant improvements in compile time with this patch. This unfortunately does not fix the testcase provided in #19703 but does fix #20933 ------------------------- Metric Decrease: T12425 Metric Increase: T13719 T9872a T9872d hard_hole_fits ------------------------- Co-authored-by: Matthew Pickering <matthewtpickering@gmail.com>
* ci: Add debian 11 jobs (validate/release/nightly)Matthew Pickering2022-02-031-1/+34
| | | | Fixes #21002
* Rewrite CallerCC parser using ReadPMatthew Pickering2022-02-036-14/+63
| | | | | | | | | | This allows us to remove the dependency on parsec and hence transitively on text. Also added some simple unit tests for the parser and fixed two small issues in the documentation. Fixes #21033
* Unbreak T13168 on windowsMatthew Pickering2022-02-031-2/+1
| | | | Fixes #14276
* Remove ghc_plugin_wayMatthew Pickering2022-02-033-46/+32
| | | | | | Using ghc_plugin_way had the unintended effect of meaning certain tests weren't run at all when ghc_dynamic=true, if you delete this modifier then the tests work in both the static and dynamic cases.
* Add flushes to plugin tests which print to stdoutMatthew Pickering2022-02-033-1/+20
| | | | | Due to #20791 you need to explicitly flush as otherwise the output from these tests doesn't make it to stdout.
* Accept new output for T14335 testMatthew Pickering2022-02-031-1/+1
| | | | This test was previously not run due to #20960
* T13168: Filter out rtsopts for consistency between dynamic and static waysMatthew Pickering2022-02-032-5/+1
|
* Filter out -rtsopts in T16219 to make static/dynamic ways agreeMatthew Pickering2022-02-032-7/+1
|
* Mark prog003 as expected_broken on static way #20704Matthew Pickering2022-02-031-0/+1
|
* Don't initialise plugins when there are no pipelines to runMatthew Pickering2022-02-032-2/+4
|
* Frontend01 passes with static GHCMatthew Pickering2022-02-033-10/+1
|
* Add failing test for #20791Matthew Pickering2022-02-032-0/+8
| | | | The test produces different output on static vs dynamic GHC builds.
* Check type first then expressionPeter Trommler2022-02-021-1/+1
|
* Cmm: fix equality of expressionsPeter Trommler2022-02-021-1/+1
| | | | | Compare expressions and types when comparing `CmmLoad`s. Fixes #21016
* More accurate unboxingSimon Peyton Jones2022-02-029-384/+823
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements a fix for #20817. It ensures that * The final strictness signature for a function accurately reflects the unboxing done by the wrapper See Note [Finalising boxity for demand signatures] and Note [Finalising boxity for let-bound Ids] * A much better "layer-at-a-time" implementation of the budget for how many worker arguments we can have See Note [Worker argument budget] Generally this leads to a bit more worker/wrapper generation, because instead of aborting entirely if the budget is exceeded (and then lying about boxity), we unbox a bit. Binary sizes in increase slightly (around 1.8%) because of the increase in worker/wrapper generation. The big effects are to GHC.Ix, GHC.Show, GHC.IO.Handle.Internals. If we did a better job of dropping dead code, this effect might go away. Some nofib perf improvements: Program Size Allocs Runtime Elapsed TotalMem -------------------------------------------------------------------------------- VSD +1.8% -0.5% 0.017 0.017 0.0% awards +1.8% -0.1% +2.3% +2.3% 0.0% banner +1.7% -0.2% +0.3% +0.3% 0.0% bspt +1.8% -0.1% +3.1% +3.1% 0.0% eliza +1.8% -0.1% +1.2% +1.2% 0.0% expert +1.7% -0.1% +9.6% +9.6% 0.0% fannkuch-redux +1.8% -0.4% -9.3% -9.3% 0.0% kahan +1.8% -0.1% +22.7% +22.7% 0.0% maillist +1.8% -0.9% +21.2% +21.6% 0.0% nucleic2 +1.7% -5.1% +7.5% +7.6% 0.0% pretty +1.8% -0.2% 0.000 0.000 0.0% reverse-complem +1.8% -2.5% +12.2% +12.2% 0.0% rfib +1.8% -0.2% +2.5% +2.5% 0.0% scc +1.8% -0.4% 0.000 0.000 0.0% simple +1.7% -1.3% +17.0% +17.0% +7.4% spectral-norm +1.8% -0.1% +6.8% +6.7% 0.0% sphere +1.7% -2.0% +13.3% +13.3% 0.0% tak +1.8% -0.2% +3.3% +3.3% 0.0% x2n1 +1.8% -0.4% +8.1% +8.1% 0.0% -------------------------------------------------------------------------------- Min +1.1% -5.1% -23.6% -23.6% 0.0% Max +1.8% +0.0% +36.2% +36.2% +7.4% Geometric Mean +1.7% -0.1% +6.8% +6.8% +0.1% Compiler allocations in CI have a geometric mean of +0.1%; many small decreases but there are three bigger increases (7%), all because we do more worker/wrapper than before, so there is simply more code to compile. That's OK. Perf benchmarks in perf/should_run improve in allocation by a geo mean of -0.2%, which is good. None get worse. T12996 improves by -5.8% Metric Decrease: T12996 Metric Increase: T18282 T18923 T9630
* testsuite: Honour PERF_BASELINE_COMMIT when computing allowed metric changesMatthew Pickering2022-02-022-2/+21
| | | | | | | We now get all the commits between the PERF_BASELINE_COMMIT and HEAD and check any of them for metric changes. Fixes #20882
* Replace sndOfTriple with sndOf3Andreas Klebinger2022-02-021-5/+4
| | | | I also cleaned up the imports slightly while I was at it.
* Refactor the escaping kind check for data constructorsSimon Peyton Jones2022-02-022-58/+64
| | | | | | | | | | | | | | As #20929 pointed out, we were in-elegantly checking for escaping kinds in `checkValidType`, even though that check was guaranteed to succeed for type signatures -- it's part of kind-checking a type. But for /data constructors/ we kind-check the pieces separately, so we still need the check. This MR is a pure refactor, moving the test from `checkValidType` to `checkValidDataCon`. No new tests; external behaviour doesn't change.
* Fix @since annotation on NatMorrow2022-02-021-1/+1
|