summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Specialiser: saturate DFuns correctlywip/T21489Simon Peyton Jones2022-05-101-4/+7
| | | | | | | | | | | Ticket #21489 showed that the saturation mechanism for DFuns (see Note Specialising DFuns) should use both UnspecType and UnspecArg. We weren't doing that; but this MR fixes that problem. No test case because it's hard to tickle, but it showed up in Gergo's work with GHC-as-a-library.
* STG: only print cost-center if asked toSylvain Henry2022-05-094-8/+9
|
* Correct base's changelog for 4.16.1.0Hécate Moonlight2022-05-091-4/+9
| | | | | | | This commit reaffects the new Ix instances of the foreign integral types from base 4.17 to 4.16.1.0 closes #21529
* avoid hadrian/bindist/Makefile install_docs error when --docs=noneJens Petersen2022-05-091-3/+4
| | | | | | | | | When docs are disabled the bindist does not have docs/ and hence docs-utils/ is not generated. Here we just test that docs-utils exists before attempting to install prologue.txt and gen_contents_index to avoid the error: /usr/bin/install: cannot stat 'docs-utils/prologue.txt': No such file or directory make: *** [Makefile:195: install_docs] Error 1
* add test case for #21446Teo Camarasu2022-05-093-0/+12
|
* Respect -po when heap profiling (#21446)Teo Camarasu2022-05-091-15/+21
|
* Tweak GHC.CmmToAsm.CFG.delEdgeSimon Jakobi2022-05-081-4/+1
| | | | mapAdjust is more efficient than mapAlter.
* Change Specialise to use OrdList.Rob2022-05-081-23/+23
| | | | | | | Fixes #21362 Metric Decrease: T16875
* ci: Generate source-tarball in release jobsMatthew Pickering2022-05-061-0/+1
| | | | | We need to distribute the source tarball so we should generate it in the CI pipeline.
* Fix name of windows release bindist in doc-tarball jobMatthew Pickering2022-05-061-1/+1
|
* Comments only: Note [AppCtxt]Simon Peyton Jones2022-05-061-2/+36
|
* template-haskell: Fix representation of OPAQUE pragmasMatthew Pickering2022-05-064-8/+33
| | | | | | | | | | There is a mis-match between the TH representation of OPAQUE pragmas and GHC's internal representation due to how OPAQUE pragmas disallow phase annotations. It seemed most in keeping to just fix the wired in name issue by adding a special case to the desugaring of INLINE pragmas rather than making TH/GHC agree with how the representation should look. Fixes #21463
* Allow `let` just before pure/return in ApplicativeDoZiyang Liu2022-05-067-19/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following is currently rejected: ```haskell -- F is an Applicative but not a Monad x :: F (Int, Int) x = do a <- pure 0 let b = 1 pure (a, b) ``` This has bitten me multiple times. This MR contains a simple fix: only allow a "let only" segment to be merged with the next (and not the previous) segment. As a result, when the last one or more statements before pure/return are `LetStmt`s, there will be one more segment containing only those `LetStmt`s. Note that if the `let` statement mentions a name bound previously, then the program is still rejected, for example ```haskell x = do a <- pure 0 let b = a + 1 pure (a, b) ``` or the example in #18559. To support this would require a more complex approach, but this is IME much less common than the previous case.
* testsuite: Add test for #21465Ben Gamari2022-05-054-0/+64
|
* rts: Ensure that XMM registers are preserved on Win64Ben Gamari2022-05-053-30/+41
| | | | | | | | Previously we only preserved the bottom 64-bits of the callee-saved 128-bit XMM registers, in violation of the Win64 calling convention. Fix this. Fixes #21465.
* ci: Add job to check that jobs.yaml is up-to-dateMatthew Pickering2022-05-051-0/+22
| | | | | | | | There have been quite a few situations where jobs.yaml has been out of date. It's better to add a CI job which checks that it's right. We don't want to use a staged pipeline because it obfuscates the structure of the pipeline.
* Start 9.6.1-notessheaf2022-05-054-435/+27
| | | | | Updates the documentation notes to start tracking changes for the 9.6.1 release (instead of 9.4).
* add since annotations for instances of ByteArrayTeo Camarasu2022-05-051-0/+9
|
* SpecConstr: Properly create rules for call patterns representing partial ↵Andreas Klebinger2022-05-053-28/+74
| | | | | | | | | | | | | applications The main fix is that in addVoidWorkerArg we now add the argument to the front. This fixes #21448. ------------------------- Metric Decrease: T16875 -------------------------
* Give the two T19569 tests different namesMatthew Craven2022-05-055-2/+2
|
* Fix broken rules for (^) with known small powersMatthew Craven2022-05-052-13/+12
|
* Add a test for the bracketing in rules for (^)Matthew Craven2022-05-052-0/+57
|
* Explain that 'fail s' should run in the monad itselfTom Ellis2022-05-051-0/+4
|
* Remove two uses of IntMap.sizeSimon Jakobi2022-05-052-2/+2
| | | | | | | | | | | IntMap.size is O(n). The new code should be slightly more efficient. The transformation of GHC.CmmToAsm.CFG.calcFreqs.nodeCount can be described formally as the transformation: (\sum_{0}^{n-1} \sum_{0}^{k-1} i_nk) + n ==> (\sum_{0}^{n-1} 1 + \sum_{0}^{k-1} i_nk)
* adjustors: align comment about number of integer like arguments with ↵Adam Sandberg Ericsson2022-05-051-3/+3
| | | | implementation for Amd4+MinGW implementation
* Fix several note references, part 2Krzysztof Gogolewski2022-05-0528-88/+41
|
* gitlab/ci: Fix name of bootstrap compiler directoryBen Gamari2022-05-041-2/+2
| | | | | | | | Windows binary distributions built with Hadrian have a target platform suffix in the name of their root directory. Teach `ci.sh` about this fact. (cherry picked from commit df5752f39671f6d04d8cd743003469ae5eb67235)
* gitlab-ci: Don't run make job in release pipelinesBen Gamari2022-05-041-1/+1
| | | | (cherry picked from commit 16d6a8ff011f2194485387dcca1c00f8ddcdbdeb)
* configure: Make sphinx version check more robustBen Gamari2022-05-041-1/+1
| | | | | | | It appears that the version of sphinx shipped on CentOS 7 reports a version string of `Sphinx v1...`. Accept the `v`. (cherry picked from commit a9197a292fd4b13308dc6664c01351c7239357ed)
* gitlab-ci: Always preserve artifacts, even in failed jobsBen Gamari2022-05-042-72/+145
| | | | (cherry picked from commit fd08b0c91ea3cab39184f1b1b1aafcd63ce6973f)
* gitlab-ci: Use ld.lld on ARMv7/LinuxBen Gamari2022-05-042-8/+14
| | | | | | | | Due to #16177. Also cleanup some code style issues. (cherry picked from commit cc1c3861e2372f464bf9e3c9c4d4bd83f275a1a6)
* testsuite/T7275: Use sed -rBen Gamari2022-05-041-1/+1
| | | | | | Darwin requires the `-r` flag to be compatible with GNU sed. (cherry picked from commit 512338c8feec96c38ef0cf799f3a01b77c967c56)
* Update supported LLVM versionsBen Gamari2022-05-042-1/+7
| | | | | | Pull forward minimum version to match 9.2. (cherry picked from commit c26faa54c5fbe902ccb74e79d87e3fa705e270d1)
* Ensure Any is not levity-polymorphic in FFIsheaf2022-05-044-13/+30
| | | | | | | | The previous patch forgot to account for a type such as Any @(TYPE (BoxedRep l)) for a quantified levity variable l.
* Improve error reporting in generated codeSimon Peyton Jones2022-05-0416-86/+126
| | | | | | Our error reporting in generated code (via desugaring before typechecking) only worked when the generated code was just a simple call. This commit makes it work in nested cases.
* rts/ghc.mk: Only build StgCRunAsm.S when it is neededBen Gamari2022-05-041-0/+3
| | | | | | | | Previously the make build system unconditionally included StgCRunAsm.S in the link, meaning that the RTS would require an execstack unnecessarily. Fixes #21478.
* genprimopcode: Replace LaTeX documentation syntax with HaddockAlexis King2022-05-044-444/+240
| | | | | | | | | | | The LaTeX documentation generator does not seem to have been used for quite some time, so the LaTeX-to-Haddock preprocessing step has become a pointless complication that makes documenting the contents of GHC.Prim needlessly difficult. This commit replaces the LaTeX syntax with the Haddock it would have been converted into, anyway, though with an additional distinction: it uses single quotes in places to instruct Haddock to generate hyperlinks to bindings. This improves the quality of the generated output.
* genprimopcode: Support Unicode properlyAlexis King2022-05-044-23/+74
|
* CoreLint - When checking for levity polymorphism look through more ticks.Andreas Klebinger2022-05-044-13/+45
| | | | | | | | | | | For expressions like `(scc<cc_name> primOp#) arg1` we should also look at arg1 to determine if we call primOp# at a fixed runtime rep. This is what corePrep already does but CoreLint didn't yet. This patch will bring them in sync in this regard. It also uses tickishFloatable in CorePrep instead of CorePrep having it's own slightly differing definition of when a tick is floatable.
* Assume at least one evaluation for nested SubDemands (#21081, #21133)wip/T21081Sebastian Graf2022-05-0353-488/+853
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See the new `Note [SubDemand denotes at least one evaluation]`. A demand `n :* sd` on a let binder `x=e` now means > "`x` was evaluated `n` times and in any program trace it is evaluated, `e` is > evaluated deeply in sub-demand `sd`." The "any time it is evaluated" premise is what this patch adds. As a result, we get better nested strictness. For example (T21081) ```hs f :: (Bool, Bool) -> (Bool, Bool) f pr = (case pr of (a,b) -> a /= b, True) -- before: <MP(L,L)> -- after: <MP(SL,SL)> g :: Int -> (Bool, Bool) g x = let y = let z = odd x in (z,z) in f y ``` The change in demand signature "before" to "after" allows us to case-bind `z` here. Similarly good things happen for the `sd` in call sub-demands `Cn(sd)`, which allows for more eta-reduction (which is only sound with `-fno-pedantic-bottoms`, albeit). We also fix #21085, a surprising inconsistency with `Poly` to `Call` sub-demand expansion. In an attempt to fix a regression caused by less inlining due to eta-reduction in T15426, I eta-expanded the definition of `elemIndex` and `elemIndices`, thus fixing #21345 on the go. The main point of this patch is that it fixes #21081 and #21133. Annoyingly, I discovered that more precise demand signatures for join points can transform a program into a lazier program if that join point gets floated to the top-level, see #21392. There is no simple fix at the moment, but !5349 might. Thus, we accept a ~5% regression in `MultiLayerModulesTH_OneShot`, where #21392 bites us in `addListToUniqDSet`. T21392 reliably reproduces the issue. Surprisingly, ghc/alloc perf on Windows improves much more than on other jobs, by 0.4% in the geometric mean and by 2% in T16875. Metric Increase: MultiLayerModulesTH_OneShot Metric Decrease: T16875
* Fix several note referencesKrzysztof Gogolewski2022-05-0225-84/+40
|
* Remove obsolete code in CoreToStgKrzysztof Gogolewski2022-05-022-11/+0
| | | | | Note [Nullary unboxed tuple] was removed in e9e61f18a548b70693f4. This codepath is tested by T15696_3.
* libraries/base: docs: Explain relationshipt between `finalizeForeignPtr` and ↵Niklas Hambüchen2022-05-022-10/+22
| | | | | | `*Conc*` creation Fixes https://gitlab.haskell.org/ghc/ghc/-/issues/21420
* typosEric Lindblad2022-05-011-2/+2
|
* exprIsDeadEnd: Use isDeadEndAppSig to check if a function appliction is ↵Andreas Klebinger2022-05-013-7/+7
| | | | | | | | | | | | bottoming. We used to check the divergence and that the number of arguments > arity. But arity zero represents unknown arity so this was subtly broken for a long time! We would check if the saturated function diverges, and if we applied >=arity arguments. But for unknown arity functions any number of arguments is >=idArity. This fixes #21440.
* Add documentation to the ByteArray# primetype.Hécate Moonlight2022-05-011-5/+44
| | | | close #21417
* StgLint: Check that functions are applied to compatible runtime repsAndreas Klebinger2022-05-014-24/+179
| | | | | We use compatibleRep to compare reps, and avoid checking functions with levity polymorphic types because of #21399.
* Testsuite driver: don't crash on empty metricssheaf2022-04-301-3/+7
| | | | | | The testsuite driver crashed when trying to display minimum/maximum performance changes when there are no metrics (i.e. there is no baseline available). This patch fixes that.
* rts/m32: Fix assertion failureBen Gamari2022-04-301-0/+3
| | | | | | | | | | This fixes an assertion failure in the m32 allocator due to the imprecisely specified preconditions of `m32_allocator_push_filled_list`. Specifically, the caller must ensure that the page type is set to filled prior to calling `m32_allocator_push_filled_list`. While this issue did result in an assertion failure in the debug RTS, the issue is in fact benign.
* Hadrian: Update README about the flavour/testsuite contractMatthew Pickering2022-04-302-0/+10
| | | | | | | | | There have been a number of tickets about non-tested flavours not passing the testsuite.. this is expected and now noted in the documentation. You use other flavours to run the testsuite at your own risk. Fixes #21418