summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Disable split sections on aarch64-deb10 buildwip/disable-split-sections-arch64Matthew Pickering2023-01-072-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See #22722 Failure on this job: https://gitlab.haskell.org/ghc/ghc/-/jobs/1287852 ``` Unexpected failures: /builds/ghc/ghc/tmp/ghctest-s3d8g1hj/test spaces/testsuite/tests/th/T10828.run T10828 [exit code non-0] (ext-interp) /builds/ghc/ghc/tmp/ghctest-s3d8g1hj/test spaces/testsuite/tests/th/T13123.run T13123 [exit code non-0] (ext-interp) /builds/ghc/ghc/tmp/ghctest-s3d8g1hj/test spaces/testsuite/tests/th/T20590.run T20590 [exit code non-0] (ext-interp) Appending 232 stats to file: /builds/ghc/ghc/performance-metrics.tsv ``` ``` Compile failed (exit code 1) errors were: data family D_0 a_1 :: * -> * data instance D_0 GHC.Types.Int GHC.Types.Bool :: * where DInt_2 :: D_0 GHC.Types.Int GHC.Types.Bool data E_3 where MkE_4 :: a_5 -> E_3 data Foo_6 a_7 b_8 where MkFoo_9, MkFoo'_10 :: a_11 -> Foo_6 a_11 b_12 newtype Bar_13 :: * -> GHC.Types.Bool -> * where MkBar_14 :: a_15 -> Bar_13 a_15 b_16 data T10828.T (a_0 :: *) where T10828.MkT :: forall (a_1 :: *) . a_1 -> a_1 -> T10828.T a_1 T10828.MkC :: forall (a_2 :: *) (b_3 :: *) . (GHC.Types.~) a_2 GHC.Types.Int => {T10828.foo :: a_2, T10828.bar :: b_3} -> T10828.T GHC.Types.Int T10828.hs:1:1: error: [GHC-87897] Exception when trying to run compile-time code: ghc-iserv terminated (-4) Code: (do TyConI dec <- runQ $ reify (mkName "T") runIO $ putStrLn (pprint dec) >> hFlush stdout d <- runQ $ [d| data T' a :: Type where MkT' :: a -> a -> T' a MkC' :: forall a b. (a ~ Int) => {foo :: a, bar :: b} -> T' Int |] runIO $ putStrLn (pprint d) >> hFlush stdout ....) *** unexpected failure for T10828(ext-interp) =====> 7000 of 9215 [0, 1, 0] =====> 7000 of 9215 [0, 1, 0] =====> 7000 of 9215 [0, 1, 0] =====> 7000 of 9215 [0, 1, 0] Compile failed (exit code 1) errors were: T13123.hs:1:1: error: [GHC-87897] Exception when trying to run compile-time code: ghc-iserv terminated (-4) Code: ([d| data GADT where MkGADT :: forall k proxy (a :: k). proxy a -> GADT |]) *** unexpected failure for T13123(ext-interp) =====> 7100 of 9215 [0, 2, 0] =====> 7100 of 9215 [0, 2, 0] =====> 7200 of 9215 [0, 2, 0] Compile failed (exit code 1) errors were: T20590.hs:1:1: error: [GHC-87897] Exception when trying to run compile-time code: ghc-iserv terminated (-4) Code: ([d| data T where MkT :: forall a. a -> T |]) *** unexpected failure for T20590(ext-interp) ``` Looks fairly worrying to me.
* Only store Name in FunRhs rather than Id with knot-tied fieldsMatthew Pickering2023-01-0618-80/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | All the issues here have been caused by #18758. The goal of the ticket is to be able to talk about things like `LTyClDecl GhcTc`. In the case of HsMatchContext, the correct "context" is whatever we want, and in fact storing just a `Name` is sufficient and correct context, even if the rest of the AST is storing typechecker Ids. So this reverts (#20415, !5579) which intended to get closed to #18758 but didn't really and introduced a few subtle bugs. Printing of an error message in #22695 would just hang, because we would attempt to print the `Id` in debug mode to assertain whether it was empty or not. Printing the Name is fine for the error message. Another consequence is that when `-dppr-debug` was enabled the compiler would hang because the debug printing of the Id would try and print fields which were not populated yet. This also led to 32070e6c2e1b4b7c32530a9566fe14543791f9a6 having to add a workaround for the `checkArgs` function which was probably a very similar bug to #22695. Fixes #22695
* Add support for sized literals in the bytecode interpreter.Luite Stegeman2023-01-0611-16/+733
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bytecode interpreter only has branching instructions for word-sized values. These are used for pattern matching. Branching instructions for other types (e.g. Int16# or Word8#) weren't needed, since unoptimized Core or STG never requires branching on types like this. It's now possible for optimized STG to reach the bytecode generator (e.g. fat interface files or certain compiler flag combinations), which requires dealing with various sized literals in branches. This patch improves support for generating bytecode from optimized STG by adding the following new bytecode instructions: TESTLT_I64 TESTEQ_I64 TESTLT_I32 TESTEQ_I32 TESTLT_I16 TESTEQ_I16 TESTLT_I8 TESTEQ_I8 TESTLT_W64 TESTEQ_W64 TESTLT_W32 TESTEQ_W32 TESTLT_W16 TESTEQ_W16 TESTLT_W8 TESTEQ_W8 Fixes #21945
* Revert "configure: Drop uses of AC_PROG_CC_C99"Matthew Pickering2023-01-053-0/+48
| | | | | | | | | | This reverts commit 7c6de18dd3151ead954c210336728e8686c91de6. Centos7 using a very old version of the toolchain (autotools-2.69) where the behaviour of these macros has not yet changed. I am reverting this without haste as it is blocking the 9.6 branch. Fixes #22704
* HsToken in TypeArg (#19623)Vladislav Zavialov2023-01-0518-61/+84
| | | | Updates the haddock submodule.
* EPA: Do not collect comments from end of fileAlan Zimmerman2023-01-059-49/+192
| | | | | | | | In Parser.y semis1 production triggers for the virtual semi at the end of the file. This is detected by it being zero length. In this case, do not extend the span being used to gather comments, so any final comments are allocated at the module level instead.
* Misc cleanupKrzysztof Gogolewski2023-01-0528-90/+59
| | | | | | | | | - Remove unused uniques and hs-boot declarations - Fix types of seq and unsafeCoerce# - Remove FastString/String roundtrip in JS - Use TTG to enforce totality - Remove enumeration in Heap/Inspect; the 'otherwise' clause serves the primitive types well.
* sphinx: Use modern syntax for extlinksMatthew Pickering2023-01-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | This fixes the following build error: ``` Command line: /opt/homebrew/opt/sphinx-doc/bin/sphinx-build -b man -d /private/tmp/extra-dir-55768274273/.doctrees-man -n -w /private/tmp/extra-dir-55768274273/.log docs/users_guide /private/tmp/extra-dir-55768274273 ===> Command failed with error code: 2 Exception occurred: File "/opt/homebrew/Cellar/sphinx-doc/6.0.0/libexec/lib/python3.11/site-packages/sphinx/ext/extlinks.py", line 101, in role title = caption % part ~~~~~~~~^~~~~~ TypeError: not all arguments converted during string formatting ``` I tested on Sphinx-5.1.1 and Sphinx-6.0.0 Thanks for sterni for providing instructions about how to test using sphinx-6.0.0. Fixes #22690
* packaging: Build perf builds with -split-sectionswip/various-hadrian-fixesMatthew Pickering2023-01-046-43/+63
| | | | | | | | | | | In 8f71d958 the make build system was made to use split-sections on linux systems but it appears this logic never made it to hadrian. There is the split_sections flavour transformer but this doesn't appear to be used for perf builds on linux. This is disbled on deb9 and windows due to #21670 Closes #21135
* hadrian: Document using GHC environment variable to select boot compilerMatthew Pickering2023-01-041-0/+12
| | | | Fixes #22340
* ci: Build all test dependencies with in-tree compilerMatthew Pickering2023-01-041-1/+1
| | | | | | | This means that these executables will honour flavour transformers such as "werror". Fixes #22555
* check-exact: Fix build with -WerrorMatthew Pickering2023-01-041-1/+2
|
* hadrian: Add no_split_sections tranformerMatthew Pickering2023-01-046-25/+53
| | | | | | | | | | | This transformer reverts the effect of `split_sections`, which we intend to use for platforms which don't support split sections. In order to achieve this we have to modify the implemntation of the split_sections transformer to store whether we are enabling split_sections directly in the `Flavour` definition. This is because otherwise there's no convenient way to turn off split_sections due to having to pass additional linker scripts when merging objects.
* hadrian: Add test:all_deps to build just testsuite dependenciesMatthew Pickering2023-01-042-0/+16
| | | | Fixes #22534
* hadrian: Fix computation of tables_next_to_code for outOfTreeCompilerMatthew Pickering2023-01-042-1/+3
| | | | This copy-pasto was introduced in de5fb3489f2a9bd6dc75d0cb8925a27fe9b9084b
* compiler: Add -f[no-]split-sections flagsMatthew Pickering2023-01-042-9/+15
| | | | | | | | Here we add a `-fsplit-sections` flag which may some day replace `-split-sections`. This has the advantage of automatically providing a `-fno-split-sections` flag, which is useful for our packaging because we enable `-split-sections` by default but want to disable it in certain configurations.
* Explain the auxiliary functions of permutationsFacundo Domínguez2023-01-031-0/+27
|
* Force the Docs structure to prevent leaks in GHCi with -haddock without ↵wip/force-docsZubin Duggal2023-01-0311-12/+76
| | | | | | | | | | -fwrite-interface Involves adding many new NFData instances. Without forcing Docs, references to the TcGblEnv for each module are retained by the Docs structure. Usually these are forced when the ModIface is serialised but not when we aren't writing the interface.
* Document infelicities of instance Ord Double and workaroundsBodigrim2022-12-241-23/+30
|
* hadrian: Ensure that linker scripts are used when merging objectsBen Gamari2022-12-241-2/+6
| | | | | | In #22527 @rui314 inadvertantly pointed out a glaring bug in Hadrian's implementation of the object merging rules: unlike the old `make` build system we utterly failed to pass the needed linker scripts. Fix this.
* Drop support for kind constraints.wip/p547Richard Eisenberg2022-12-2441-620/+156
| | | | | | | | | | | | | | | | | | | | | | | | This implements proposal 547 and closes ticket #22298. See the proposal and ticket for motivation. Compiler perf improves a bit Metrics: compile_time/bytes allocated ------------------------------------- CoOpt_Singletons(normal) -2.4% GOOD T12545(normal) +1.0% T13035(normal) -13.5% GOOD T18478(normal) +0.9% T9872d(normal) -2.2% GOOD geo. mean -0.2% minimum -13.5% maximum +1.0% Metric Decrease: CoOpt_Singletons T13035 T9872d
* Store RdrName rather than OccName in HolesMatthew Pickering2022-12-2419-56/+117
| | | | | | | | | | | | | | | | | In #20472 it was pointed out that you couldn't defer out of scope but the implementation collapsed a RdrName into an OccName to stuff it into a Hole. This leads to the error message for a deferred qualified name dropping the qualification which affects the quality of the error message. This commit adds a bit more structure to a hole, so a hole can replace a RdrName without losing information about what that RdrName was. This is important when printing error messages. I also added a test which checks the Template Haskell deferral of out of scope qualified names works properly. Fixes #22130
* gitlab-ci: Introduce aarch64-linux-llvm jobBen Gamari2022-12-242-0/+178
| | | | | | | This nightly job will ensure that we don't break the LLVM backend on AArch64/Linux by bootstrapping GHC. This would have caught #22640.
* llvmGen: Fix relaxed orderingBen Gamari2022-12-241-1/+1
| | | | | | | Previously I used LLVM's `unordered` ordering for the C11 `relaxed` ordering. However, this is wrong and should rather use the LLVM `monotonic` ordering. Fixes #22640
* ci: Run head.hackage jobs on upstream-testing branch rather than masterMatthew Pickering2022-12-241-1/+1
| | | | | | | | | This change allows less priviledged users to trigger head.hackage jobs because less permissions are needed to trigger jobs on the upstream-testing branch, which is not protected. There is a CI job which updates upstream-testing each hour to the state of the master branch so it should always be relatively up-to-date.
* ci: Don't run abi-test-nightly on release jobsMatthew Pickering2022-12-241-1/+0
| | | | | | The test is not configured to get the correct dependencies for the release pipelines (and indeed stops the release pipeline being run at all)
* head.hackage: Use slow-validate bindist for linting jobsMatthew Pickering2022-12-241-14/+54
| | | | | | | | | | | | | | | | | | | | | | | | This enables the SLOW_VALIDATE env var for the linting head.hackage jobs, namely the jobs enabled manually, by the label or on the nightly build now use the deb10-numa-slow-validate bindist which has assertions enabled. See #22623 for a ticket which was found by using this configuration already! The head.hackage jobs triggered by upstream CI are now thusly: hackage-lint: Can be triggered on any MR, normal validate pipeline or nightly build. Runs head.hackage with -dlint and a slow-validate bindist hackage-label-lint: Trigged on MRs with "user-facing" label, runs the slow-validate head.hackage build with -dlint. nightly-hackage-lint: Runs automatically on nightly pipelines with slow-validate + dlint config. nightly-hackage-perf: Runs automaticaly on nightly pipelines with release build and eventlogging enabled. release-hackage-lint: Runs automatically on release pipelines with -dlint on a release bindist.
* compiler: Ensure that GHC toolchain is first in search pathBen Gamari2022-12-242-9/+9
| | | | | | | As noted in #22561, it is important that GHC's toolchain look first for its own headers and libraries to ensure that the system's are not found instead. If this happens things can break in surprising ways (e.g. see #22561).
* add GHC.Utils.Binary.foldGet' and use for Ifacedoyougnu2022-12-232-2/+19
| | | | | | | | | | A minor optimization to remove lazy IO and a lazy accumulator strictify foldGet' IFace.Binary: use strict foldGet' remove superfluous bang
* nonmoving: Make free list counter accesses atomicBen Gamari2022-12-231-1/+1
| | | | Since these may race with the allocator(s).
* nonmoving: Fix race in shortcuttingBen Gamari2022-12-232-1/+8
| | | | | We must use an acquire load to read the info table pointer since if we find an indirection we must be certain that we see the indirectee.
* nonmoving: Fix benign race in update remembered set checkBen Gamari2022-12-231-1/+3
| | | | | Relaxed load is fine here since we will take the lock before looking at the list.
* nonmoving: Make bitmap accesses atomicBen Gamari2022-12-231-2/+2
| | | | | | This is a benign race on any sensible hard since these are byte accesses. Nevertheless, atomic accesses are necessary to satisfy TSAN.
* nonmoving: Ensure that we aren't holding locks when closing themBen Gamari2022-12-231-1/+4
| | | | TSAN complains about this sort of thing.
* nonmoving: Refactor update remembered set initializationBen Gamari2022-12-235-34/+66
| | | | | | | This avoids a lock inversion between the storage manager mutex and the stable pointer table mutex by not dropping the SM_MUTEX in nonmovingCollect. This requires quite a bit of rejiggering but it does seem like a better strategy.
* nonmoving: Make segment state updates atomicBen Gamari2022-12-231-1/+1
|
* nonmoving: Fix races in collector status trackingBen Gamari2022-12-232-7/+10
| | | | | | Mark a number of accesses to do with tracking of the status of the concurrent collection thread as atomic. No interesting races here, merely necessary to satisfy TSAN.
* nonmoving: Ensure that mutable fields have acquire barrierBen Gamari2022-12-231-8/+16
|
* nonmoving: Eliminate race in bump_static_flagBen Gamari2022-12-231-8/+10
| | | | | | | To ensure that we don't race with a mutator entering a new CAF we take the SM mutex before touching static_flag. The other option here would be to instead modify newCAF to use a CAS but the present approach is a bit safer.
* nonmoving: Use atomic when looking at bd->genBen Gamari2022-12-231-1/+4
| | | | Since it may have been mutated by a moving GC.
* nonmoving: Fix segment list racesBen Gamari2022-12-232-6/+12
|
* nonmoving: Fix race in marking of blackholesBen Gamari2022-12-232-2/+8
| | | | | We must use an acquire-fence when marking to ensure that the indirectee is visible.
* ci: Move wasm pipelines into nightly rather than masterMatthew Pickering2022-12-231-2/+3
| | | | | See #22664 for the changes which need to be made to bring one of these back to the validate pipeline.
* rts/m32: Fix sanity checkingBen Gamari2022-12-221-1/+1
| | | | | Previously we would attempt to clear pages which were marked as read-only. Fix this.
* Fix unifier bug: failing to decompose over-saturated type familySimon Peyton Jones2022-12-223-13/+37
| | | | This simple patch fixes #22647
* base: Fix event manager shutdown race on non-Linux platformsBen Gamari2022-12-221-3/+10
| | | | | | | During shutdown it's possible that we will attempt to use a closed fd to wakeup another capability's event manager. On the Linux eventfd path we were careful to handle this. However on the non-Linux path we failed to do so. Fix this.
* Refactor mkRuntimeErrorSimon Peyton Jones2022-12-2212-102/+182
| | | | | | | | | This patch fixes #22634. Because we don't have TYPE/CONSTRAINT polymorphism, we need two error functions rather than one. I took the opportunity to rname runtimeError to impossibleError, to line up with mkImpossibleExpr, and avoid confusion with the genuine runtime-error-constructing functions.
* JS: fix support for -outputdir (#22641)Sylvain Henry2022-12-224-62/+56
| | | | | | | The `-outputdir` option wasn't correctly handled with the JS backend because the same code path was used to handle both objects produced by the JS backend and foreign .js files. Now we clearly distinguish the two in the pipeline, fixing the bug.
* EPA: Make EOF position part of AnnsModuleAlan Zimmerman2022-12-2225-209/+190
| | | | | Closes #20951 Closes #19697
* Bump libffi-tarballs submoduleBen Gamari2022-12-221-0/+0
| | | | We will now use libffi-3.4.4.