summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Add test for T21229Matthew Pickering2022-04-303-0/+26
|
* Revert "Make the specialiser handle polymorphic specialisation"Matthew Pickering2022-04-304-238/+52
| | | | | | | | | | | | | This reverts commit ef0135934fe32da5b5bb730dbce74262e23e72e8. See ticket #21229 ------------------------- Metric Decrease: T15164 Metric Increase: T13056 -------------------------
* hacking guide: mention the core libraries committeeChris Martin2022-04-301-0/+1
|
* users guide: add categories to some flagsAdam Sandberg Ericsson2022-04-301-6/+6
|
* ghc-boot: export typesynonyms from GHC.Utils.EncodingAdam Sandberg Ericsson2022-04-301-0/+2
| | | | This makes the Haddocks easier to understand.
* Update user guide example rewrite rules formattingMarius Ghita2022-04-301-3/+3
| | | | | | | | | | | | | | Change the rewrite rule examples to include a space between the composition of `f` and `g` in the map rewrite rule examples. Without this change, if the user has locally enabled the extension OverloadedRecordDot the copied example will result in a compile time error that `g` is not a field of `f`. ``` • Could not deduce (GHC.Records.HasField "g" (a -> b) (a1 -> b)) arising from selecting the field ‘g’ ```
* Convert More Diagnostics (#20116)Ben Gamari2022-04-3017-189/+505
| | | | | Replaces uses of `TcRnUnknownMessage` with proper diagnostics constructors.
* Make mkFunCo take AnonArgFlags into accountRyan Scott2022-04-304-2/+19
| | | | | | | | | | | | | | | | | | | | | | Previously, whenever `mkFunCo` would produce reflexive coercions, it would use `mkVisFunTy` to produce the kind of the coercion. However, `mkFunCo` is also used to produce coercions between types of the form `ty1 => ty2` in certain places. This has the unfortunate side effect of causing the type of the coercion to appear as `ty1 -> ty2` in certain error messages, as spotted in #21328. This patch address this by changing replacing the use of `mkVisFunTy` with `mkFunctionType` in `mkFunCo`. `mkFunctionType` checks the kind of `ty1` and makes the function arrow `=>` instead of `->` if `ty1` has kind `Constraint`, so this should always produce the correct `AnonArgFlag`. As a result, this patch fixes part (2) of #21328. This is not the only possible way to fix #21328, as the discussion on that issue lists some possible alternatives. Ultimately, it was concluded that the alternatives would be difficult to maintain, and since we already use `mkFunctionType` in `coercionLKind` and `coercionRKind`, using `mkFunctionType` in `mkFunCo` is consistent with this choice. Moreover, using `mkFunctionType` does not regress the performance of any test case we have in GHC's test suite.
* Add a note about instance visibility across component boundariesparsonsmatt2022-04-301-3/+16
| | | | | | | | | | | | | | | | | | | In principle, the *visible* instances are * all instances defined in a prior top-level declaration group (see docs on `newDeclarationGroup`), or * all instances defined in any module transitively imported by the module being compiled However, actually searching all modules transitively below the one being compiled is unreasonably expensive, so `reifyInstances` will report only the instance for modules that GHC has had some cause to visit during this compilation. This is a shortcoming: `reifyInstances` might fail to report instances for a type that is otherwise unusued, or instances defined in a different component. You can work around this shortcoming by explicitly importing the modules whose instances you want to be visible. GHC issue #20529 has some discussion around this. Fixes #20529
* rts: Refactor handling of dead threads' stacksBen Gamari2022-04-296-14/+36
| | | | | | | | | | | | | | | | This fixes a bug that @JunmingZhao42 and I noticed while working on her MMTK port. Specifically, in stg_stop_thread we used stg_enter_info as a sentinel at the tail of a stack after a thread has completed. However, stg_enter_info expects to have a two-field payload, which we do not push. Consequently, if the GC ends up somehow the stack it will attempt to interpret data past the end of the stack as the frame's fields, resulting in unsound behavior. To fix this I eliminate this hacky use of `stg_stop_thread` and instead introduce a new stack frame type, `stg_dead_thread_info`. Not only does this eliminate the potential for the previously mentioned memory unsoundness but it also more clearly captures the intended structure of the dead threads' stacks.
* testsuite: Deduplicate ways correctlywip/deduplicate-waysMatthew Pickering2022-04-291-1/+2
| | | | | | This was leading to a bug where we would run a profasm test twice which led to invalid junit.xml which meant the test results database was not being populated for the fedora33-perf job.
* testsuite: Normalise package versions in UnusedPackages testMatthew Pickering2022-04-291-1/+4
|
* Bump bytestring submoduleBen Gamari2022-04-291-0/+0
| | | | Update to current `master`.
* Provide efficient unionMG function for combining two module graphs.Matthew Pickering2022-04-291-4/+25
| | | | | | This function is used by API clients (hls). This supercedes !6922
* Revert "rts: Refactor handling of dead threads' stacks"Matthew Pickering2022-04-286-30/+9
| | | | This reverts commit e09afbf2a998beea7783e3de5dce5dd3c6ff23db.
* Remove unused lineTamar Christina2022-04-281-1/+0
|
* winio: add support to iserv.Tamar Christina2022-04-285-11/+84
|
* add since annotation for GHC.Stack.CCS.whereFromTeo Camarasu2022-04-281-0/+2
|
* configure: Bump GHC version to 9.5Ben Gamari2022-04-282-1/+1
| | | | Bumps haddock submodule.