summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gitlab-ci: Add CI support for s390x under cross-compilationwip/cross-ci-s390xBen Gamari2022-10-183-1/+123
| | | | | | This adds rudimentary validation of s390x (supported via the LLVM backend) via cross-compilation on Debian 11. The goal is to provide at least minimal test coverage of big-endian platforms.
* hadrian: Pass CROSS_EMULATOR to runtests.pyBen Gamari2022-10-181-0/+2
|
* testsuite: Introduce and use req_pluginsBen Gamari2022-10-183-3/+12
|
* testsuite: Mark a number of tests omitting profasm as req_thBen Gamari2022-10-188-69/+9
|
* testsuite: Mark T7919 as req_thBen Gamari2022-10-181-1/+1
|
* testsuite: Mark overfloadedrecflds/ghci tests as req_interpBen Gamari2022-10-181-0/+2
| | | | Due to ghci usage.
* testsuite: Mark LinearTH tests as req_thBen Gamari2022-10-181-4/+4
|
* testsuite: Mark NoFieldSelectors as req_interpBen Gamari2022-10-181-1/+1
| | | | Due to ANN usage.
* testsuite: Mark some multipleHomeUnits tests as req_thBen Gamari2022-10-182-2/+2
|
* testsuite: Mark cc017 as req_thBen Gamari2022-10-181-10/+4
|
* testsuite/driver: Normalize away differences in ghc executable nameBen Gamari2022-10-181-8/+12
|
* testsuite: Mark T21115b as req_thBen Gamari2022-10-181-1/+1
|
* testsuite: Drop annotation from T17904Ben Gamari2022-10-181-2/+0
| | | | | Annotations make it harder to run tests due to compile-time code loading and this particular annotation was not critical to the test.
* testsuite: Mark annrun01 as req_interpBen Gamari2022-10-181-12/+2
| | | | Annotations require the compile-time code loading.
* testsuite/driver: Add basic support for testing cross-compilersBen Gamari2022-10-183-2/+29
|
* Build System: Remove out-of-date comment about make build systemMatthew Pickering2022-10-181-4/+0
| | | | | | | | Both make and hadrian interleave compilation of modules of different modules and don't respect the package boundaries. Therefore I just remove this comment which points out this "difference". Fixes #22253
* configure: Bump minimum bootstrap GHC versionBen Gamari2022-10-181-2/+3
| | | | Fixes #22245
* Make `Functor` a superclass of `TrieMap`, which lets us derive the `map` ↵M Farkas-Dyck2022-10-185-91/+126
| | | | functions.
* Fix GHCis interaction with tag inference.Andreas Klebinger2022-10-1819-69/+177
| | | | | | | | | | | | | | | | | | | | | | | | | I had assumed that wrappers were not inlined in interactive mode. Meaning we would always execute the compiled wrapper which properly takes care of upholding the strict field invariant. This turned out to be wrong. So instead we now run tag inference even when we generate bytecode. In that case only for correctness not performance reasons although it will be still beneficial for runtime in some cases. I further fixed a bug where GHCi didn't tag nullary constructors properly when used as arguments. Which caused segfaults when calling into compiled functions which expect the strict field invariant to be upheld. Fixes #22042 and #21083 ------------------------- Metric Increase: T4801 Metric Decrease: T13035 -------------------------
* Fix T15155l not getting -fllvmKrzysztof Gogolewski2022-10-171-1/+1
|
* testsuite: Fix typo when setting llvm_waysMatthew Pickering2022-10-171-2/+1
| | | | | | | Since 2014 llvm_ways has been set to [] so none of the tests which use only_ways(llvm_ways) have worked as expected. Hopefully the tests still pass with this typo fix!
* use heredocEric Lindblad2022-10-171-3/+4
|
* remove redirectEric Lindblad2022-10-171-1/+1
|
* example rewriteEric Lindblad2022-10-171-2/+2
|
* Testsuite: Add a new tables_next_to_code predicate.Andreas Klebinger2022-10-175-1/+16
| | | | | | And use it to avoid T21710a failing on non-tntc archs. Fixes #22169
* Avoid allocating intermediate lists for non recursive bindings.Andreas Klebinger2022-10-178-14/+50
| | | | | | | We do so by having an explicit folding function that doesn't need to allocate intermediate lists first. Fixes #22196
* Update the check-exact infrastructure to match ghc-exactprintAlan Zimmerman2022-10-1717-3099/+3838
| | | | | | | | | | | | | | | | | | | | GHC tests the exact print annotations using the contents of utils/check-exact. The same functionality is provided via https://github.com/alanz/ghc-exactprint The latter was updated to ensure it works with all of the files on hackage when 9.2 was released, as well as updated to ensure users of the library could work properly (apply-refact, retrie, etc). This commit brings the changes from ghc-exactprint into GHC/utils/check-exact, adapting for the changes to master. Once it lands, it will form the basis for the 9.4 version of ghc-exactprint. See also discussion around this process at #21355
* Add `Enum (Down a)` instance that swaps `succ` and `pred`Gergo ERDI2022-10-172-2/+25
| | | | | | | | | | | See https://github.com/haskell/core-libraries-committee/issues/51 for discussion. The key points driving the implementation are the following two ideas: * For the `Int` type, `comparing (complement @Int)` behaves exactly as an order-swapping `compare @Int`. * `enumFrom @(Down a)` can be implemented in terms of `enumFromThen @a`, if only the corner case of starting at the very end is handled specially
* DmdAnal: Look through unfoldings of DataCon wrappers (#22241)Sebastian Graf2022-10-176-7/+111
| | | | | | | | | | | | | | | | | | Previously, the demand signature we computed upfront for a DataCon wrapper lacked boxity information and was much less precise than the demand transformer for the DataCon worker. In this patch we adopt the solution to look through unfoldings of DataCon wrappers during Demand Analysis, but still attach a demand signature for other passes such as the Simplifier. See `Note [DmdAnal for DataCon wrappers]` for more details. Fixes #22241.
* Add realease note for #21927Teo Camarasu2022-10-151-0/+6
|
* rts: trigger a major collection if megablock usage exceeds maxHeapSizeTeo Camarasu2022-10-151-1/+5
| | | | | | | | | | | When the heap is suffering from block fragmentation, live bytes might be low while megablock usage is high. If megablock usage exceeds maxHeapSize, we want to trigger a major GC to try to recover some memory otherwise we will die from a heapOverflow at the end of the GC. Fixes #21927
* rts: ensure we are below maxHeapSize after returning megablocksTeo Camarasu2022-10-151-0/+7
| | | | | | | | | When the heap is heavily block fragmented the live byte size might be low while the memory usage is high. We want to ensure that heap overflow triggers in these cases. We do so by checking that we can return enough megablocks to under maxHeapSize at the end of GC.
* ncg/aarch64: Fix sub-word sign extension yet againBen Gamari2022-10-141-12/+20
| | | | | | | | | | | | | | | | | | | | | | In adc7f108141a973b6dcb02a7836eed65d61230e8 we fixed a number of issues to do with sign extension in the AArch64 NCG found by ghc/test-primops>. However, this patch made a critical error, assuming that getSomeReg would allocate a fresh register for the result of its evaluation. However, this is not the case as `getSomeReg (CmmReg r) == r`. Consequently, any mutation of the register returned by `getSomeReg` may have unwanted side-effects on other expressions also mentioning `r`. In the fix listed above, this manifested as the registers containing the operands of binary arithmetic operations being incorrectly sign-extended. This resulted in #22282. Sadly, the rather simple structure of the tests generated by `test-primops` meant that this particular case was not exercised. Even more surprisingly, none of our testsuite caught this case. Here we fix this by ensuring that intermediate sign extension is performed in a fresh register. Fixes #22282.
* testsuite: Add test for #22282Ben Gamari2022-10-144-0/+24
| | | | | | This will complement mpickering's more general port of foundation's numerical testsuite, providing a test for the specific case found in #22282.
* rts: Use pthread_setname_np correctly on DarwinBen Gamari2022-10-141-10/+36
| | | | | | As noted in #22206, pthread_setname_np on Darwin only supports setting the name of the calling thread. Consequently we must introduce a trampoline which first sets the thread name before entering the thread entrypoint.
* Add type signatures in where-clause of Data.List.permutationsBodigrim2022-10-141-7/+12
| | | | The type of interleave' is very much revealing, otherwise it's extremely tough to decipher.
* Add standard Unicode case predicates isUpperCase and isLowerCase.Pierre Le Marre2022-10-1412-51/+200
| | | | | | | | These predicates use the standard Unicode case properties and are more intuitive than isUpper and isLower. Approved by CLC in https://github.com/haskell/core-libraries-committee/issues/90#issuecomment-1276649403. Fixes #14589
* Clearer error msg for newtype GADTs with defaulted kindFinley McIlwaine2022-10-1318-75/+157
| | | | | | | | | | | When a newtype introduces GADT eq_specs due to a defaulted RuntimeRep, we detect this and print the error message with explicit kinds. This also refactors newtype type checking to use the new diagnostic infra. Fixes #21447
* Update phases.rst Simon Hengel2022-10-131-2/+2
| | | (the name of the original source file is $1, not $2)
* rts/linker: Add support for .fini sectionsBen Gamari2022-10-133-0/+9
|
* rts/linker: Consolidate initializer/finalizer handlingBen Gamari2022-10-137-251/+316
| | | | | | | | | Here we extend our treatment of initializer/finalizer priorities to include ELF and in so doing refactor things to share the implementation with PEi386. As well, I fix a subtle misconception of the ordering behavior for `.ctors`. Fixes #21847.
* Add a perf test for the generics code pattern from #21839.Andreas Klebinger2022-10-136-0/+109
| | | | | | | | | This code showed a strong shift between compile time (got worse) and run time (got a lot better) recently which is perfectly acceptable. However it wasn't clear why the compile time regression was happening initially so I'm adding this test to make it easier to track such changes in the future.
* Unrestricted OverloadedLabels (#11671)Charles Taylor2022-10-125-33/+135
| | | | | Implements GHC proposal: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0170-unrestricted-overloadedlabels.rst
* winio: do not re-translate input when handle is uncookedTamar Christina2022-10-121-22/+32
|
* remove name shadowingCurran McConnell2022-10-121-8/+7
|
* rts: Don't hint inlining of appendToRunQueueBen Gamari2022-10-122-54/+58
| | | | | | | | | These hints have resulted in compile-time warnings due to failed inlinings for quite some time. Moreover, it's quite unlikely that inlining them is all that beneficial given that they are rather sizeable functions. Resolves #22280.
* Mark T7919 as fragileBryan Richter2022-10-121-3/+7
| | | | | | On x86_64-linux, T7919 timed out ~30 times during July 2022. And again ~30 times in September 2022.
* Make Cmm Lint messages use dump styleKrzysztof Gogolewski2022-10-111-1/+2
| | | | | | | | | | | Lint errors indicate an internal error in GHC, so it makes sense to use it instead of the user style. This is consistent with Core Lint and STG Lint: https://gitlab.haskell.org/ghc/ghc/-/blob/22096652/compiler/GHC/Core/Lint.hs#L429 https://gitlab.haskell.org/ghc/ghc/-/blob/22096652/compiler/GHC/Stg/Lint.hs#L144 Fixes #22218.
* Separate IPE source file from spanBen Gamari2022-10-1113-442/+168
| | | | | | The source file name can very often be shared across many IPE entries whereas the source coordinates are generally unique. Separate the two to exploit sharing of the former.
* Refactor IPE initializationBen Gamari2022-10-1129-556/+683
| | | | | | | | | | | | | | | Here we refactor the representation of info table provenance information in object code to significantly reduce its size and link-time impact. Specifically, we deduplicate strings and represent them as 32-bit offsets into a common string table. In addition, we rework the registration logic to eliminate allocation from the registration path, which is run from a static initializer where things like allocation are technically undefined behavior (although it did previously seem to work). For similar reasons we eliminate lock usage from registration path, instead relying on atomic CAS. Closes #22077.