summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Force more in NFData Name instancewip/nfdata-nameMatthew Pickering2023-01-251-1/+1
| | | | | | | | | | | Doesn't force the lazy `OccName` field (#19619) which is already known as a really bad source of leaks. When we slam the hammer storing Names on disk (in interface files or the like), all this should be forced as otherwise a `Name` can easily retain an `Id` and hence the entire world. Fixes #22833
* compiler: fix handling of MO_F_Neg in wasm NCGCheng Shao2023-01-253-4/+29
| | | | | | | | In the wasm NCG, we used to compile MO_F_Neg to 0.0-x. It was an oversight, there actually exists f32.neg/f64.neg opcodes in the wasm spec and those should be used instead! The old behavior almost works, expect when GHC compiles the -0.0 literal, which will incorrectly become 0.0.
* docs: Update INSTALL.mdMatthew Pickering2023-01-251-3/+2
| | | | | | Removes references to make. Fixes #22480
* Restore Compose's Read/Show behavior to match Read1/Show1 instancesRyan Scott2023-01-244-7/+54
| | | | Fixes #22816.
* Allow waiting for timerfd to be interrupted during rts shutdownWander Hillen2023-01-242-13/+127
|
* CmmToC: fix CmmRegOff for 64-bit register on a 32-bit targetCheng Shao2023-01-241-2/+2
| | | | | | | | | | | | | | | | | We used to print the offset value to a platform word sized integer. This is incorrect when the offset is negative (e.g. output of cmm constant folding) and the register is 64-bit but on a 32-bit target, and may lead to incorrect runtime result (e.g. #22607). The fix is simple: just treat it as a proper MO_Add, with the correct width info inferred from the register itself. Metric Increase: T12707 T13379 T4801 T5321FD T5321Fun
* Clarify where `f` is definedTom Ellis2023-01-241-4/+7
|
* Add test for T22671Matthew Pickering2023-01-242-0/+9
| | | | | | This was fixed by b13c6ea5 Closes #22671
* Fix Lint check for duplicate external namesKrzysztof Gogolewski2023-01-241-6/+5
| | | | | | | | | | Lint was checking for duplicate external names by calling removeDups, which needs a comparison function that is passed to Data.List.sortBy. But the comparison was not a valid ordering - it returned LT if one of the names was not external. For example, the previous implementation won't find a duplicate in [M.x, y, M.x]. Instead, we filter out non-external names before looking for duplicates.
* Debug: Print full NodeKey when pretty printing ModuleGraphNodeMatthew Pickering2023-01-241-1/+1
| | | | This is helpful when debugging multiple component issues.
* Finder: Look in current unit before looking in any home package dependenciesMatthew Pickering2023-01-249-1/+30
| | | | | | | | | | | | | | In order to preserve existing behaviour it's important to look within the current component before consideirng a module might come from an external component. This already happened by accident in `downsweep`, (because roots are used to repopulated the cache) but in the `Finder` the logic was the wrong way around. Fixes #22680 ------------------------- Metric Decrease: MultiComponentModules MultiComponentModulesRecomp -------------------------p
* Key ModSummary cache by UnitId as well as FilePathMatthew Pickering2023-01-247-9/+21
| | | | | | | | | | | | | | | Multiple units can refer to the same files without any problem. Just another assumption which needs to be updated when we may have multiple home units. However, there is the invariant that within each unit each file only maps to one module, so as long as we also key the cache by UnitId then we are all good. This led to some confusing behaviour in GHCi when reloading, multipleHomeUnits_shared distils the essence of what can go wrong. Fixes #22679
* Improve driver diagnostic messages by including UnitId in messageMatthew Pickering2023-01-2414-49/+61
| | | | | | | | | | Currently the driver diagnostics don't give any indication about which unit they correspond to. For example `-Wmissing-home-modules` can fire multiple times for each different home unit and gives no indication about which unit it's actually reporting about. Perhaps a longer term fix is to generalise the providence information away from a SrcSpan so that these kind of whole project errors can be reported with an accurate provenance. For now we can just include the `UnitId` in the error message. Fixes #22678
* Don't write o-boot files in Interactive modeMatthew Pickering2023-01-245-15/+36
| | | | | | | | We should not be producing object files when in interactive mode but we still produced the dummy o-boot files. These never made it into a `Linkable` but then confused the recompilation checker. Fixes #22669
* Recompilation checking: Don't try to find artefacts for Interactive & ↵Matthew Pickering2023-01-243-62/+74
| | | | | | | | | | hs-boot combo In interactive mode we don't produce any linkables for hs-boot files. So we also need to not going looking for them when we check to see if we have all the right objects needed for recompilation. Ticket #22669
* Use NodeKey rather than ModuleName in pruneCacheMatthew Pickering2023-01-241-3/+10
| | | | | | | | | | | The `pruneCache` function assumes that the list of `CachedInfo` all have unique `ModuleName`, this is not true: * In normal compilation, the same module name can appear for a file and it's boot file. * In multiple home unit compilation the same ModuleName can appear in different units The fix is to use a `NodeKey` as the actual key for the interfaces which includes `ModuleName`, `IsBoot` and `UnitId`. Fixes #22677
* Augment target filepath by working directory when checking if module ↵Matthew Pickering2023-01-243-1/+5
| | | | | | | | | | | | satisfies target This fixes a spurious warning in -Wmissing-home-modules. This is a simple oversight where when looking for the target in the first place we augment the search by the -working-directory flag but then fail to do so when checking this warning. Fixes #22676
* Fix recompilation checking for multiple home unitsMatthew Pickering2023-01-2416-21/+84
| | | | | | | | | | | | | | | The key part of this change is to store a UnitId in the `UsageHomeModule` and `UsageHomeModuleInterface`. * Fine-grained dependency tracking is used if the dependency comes from any home unit. * We actually look up the right module when checking whether we need to recompile in the `UsageHomeModuleInterface` case. These scenarios are both checked by the new tests ( multipleHomeUnits_recomp and multipleHomeUnits_recomp_th ) Fixes #22675
* Do not collect compile-time metrics for T21839rMatthew Craven2023-01-233-3/+7
| | | | | | | | | ...the testsuite doesn't handle this properly since it also collects run-time metrics. Compile-time metrics for this test are already tracked via T21839c. Metric Decrease: T21839r
* codeowners: Add Ben, Matt, and Bryan to CIwip/ci-codeownersBryan Richter2023-01-231-0/+4
|
* Fix #22742Simon Peyton Jones2023-01-234-4/+22
| | | | | | | | | | | | | runtimeRepLevity_maybe was panicing unnecessarily; and the error printing code made use of the case when it should return Nothing rather than panicing. For some bizarre reason perf/compiler/T21839r shows a 10% bump in runtime peak-megagbytes-used, on a single architecture (alpine). See !9753 for commentary, but I'm going to accept it. Metric Increase: T21839r
* ghcup metadata: Remove viPostRemove field from generated metadataMatthew Pickering2023-01-231-1/+0
| | | | This has been removed from the downstream metadata.
* ghcup metadata: Fix subdir for windows bindistMatthew Pickering2023-01-231-1/+1
|
* Bump process submoduleCheng Shao2023-01-232-1/+3
| | | | | | | Includes a critical fix for wasm32, see https://github.com/haskell/process/pull/272 for details. Also changes the existing cross test to include process stuff and avoid future regression here.
* hadrian: disable alloca for in-tree GMP on wasm32Cheng Shao2023-01-231-1/+9
| | | | | When building in-tree GMP for wasm32, disable its alloca usage, since it may potentially cause stack overflow (e.g. #22602).
* template-haskell: Bump version to 2.20.0.0Ben Gamari2023-01-237-5/+5
| | | | | | Updates `text` and `exceptions` submodules for bounds bumps. Addresses #22767.
* EPA: Add SourceText to HsOverLabelAlan Zimmerman2023-01-2318-32/+107
| | | | | | To be able to capture string literals with possible escape codes as labels. Close #22771
* Set "since: 9.8" for TypeAbstractions and -Wterm-variable-captureVladislav Zavialov2023-01-236-8/+18
| | | | | These flags did not make it into the 9.6 release series, so the "since" annotations must be corrected.
* gitlab-ci: Add Rocky8 jobsBen Gamari2023-01-232-1/+133
| | | | Addresses #22268.
* hadrian: add missing docs for recently added flavour transformersCheng Shao2023-01-231-0/+16
|
* hadrian: add hi_core flavour transformerCheng Shao2023-01-231-0/+9
| | | | | | | | The hi_core flavour transformer enables -fwrite-if-simplified-core for stage1 libraries, which emit core into interface files to make it possible to restart code generation. Building boot libs with it makes it easier to use GHC API to prototype experimental backends that needs core/stg at link time.
* Fix printing of promoted MkSolo datacon (#22785)Andrei Borzenkov2023-01-1811-19/+39
| | | | | | | | | | | | Problem: In 2463df2f, the Solo data constructor was renamed to MkSolo, and Solo was turned into a pattern synonym for backwards compatibility. Since pattern synonyms can not be promoted, the old code that pretty-printed promoted single-element tuples started producing ill-typed code: t :: Proxy ('Solo Int) This fails with "Pattern synonym ‘Solo’ used as a type" The solution is to track the distinction between type constructors and data constructors more carefully when printing single-element tuples.
* Add regression test for #22151Ryan Scott2023-01-182-0/+17
| | | | | | | | | Issue #22151 was coincidentally fixed in commit aed1974e92366ab8e117734f308505684f70cddf (`Refactor the treatment of loopy superclass dicts`). This adds a regression test to ensure that the issue remains fixed. Fixes #22151.
* nativeGen/X86: MFENCE is unnecessary for release semanticsBen Gamari2023-01-181-1/+1
| | | | | | | | | | | In #22764 a user noticed that a program implementing a simple atomic counter via an STRef regressed significantly due to the introduction of necessary atomic operations in the MutVar# primops (#22468). This regression was caused by a bug in the NCG, which emitted an unnecessary MFENCE instruction for a release-ordered atomic write. MFENCE is rather only needed to achieve sequentially consistent ordering. Fixes #22764.
* ghc-pkg does not have to depend on terminfoBodigrim2023-01-182-45/+17
|
* ghc package does not have to depend on terminfoBodigrim2023-01-185-32/+9
|
* Give the RTS it's own configure scriptJohn Ericson2023-01-1811-43/+92
| | | | | | | | | | | | | Currently it doesn't do much anything, we are just trying to introduce it without breaking the build. Later, we will move functionality from the top-level configure script over to it. We need to bump Cabal for https://github.com/haskell/cabal/pull/8649; to facilitate and existing hack of skipping some configure checks for the RTS we now need to skip just *part* not *all* of the "post configure" hook, as running the configure script (which we definitely want to do) is also implemented as part of the "post configure" hook. But doing this requires exposing functionality that wasn't exposed before.
* Move documentation of deferred type error flags out of warnings sectionAdam Gundry2023-01-182-62/+63
|
* Revise warnings documentation in user's guideAdam Gundry2023-01-182-34/+60
|
* Minor corrections to commentsAdam Gundry2023-01-181-4/+4
|
* Refactor warning flag parsing to add missing flagsAdam Gundry2023-01-186-92/+126
| | | | | | | | This adds `-Werror=<group>` and `-fwarn-<group>` flags for warning groups as well as individual warnings. Previously these were defined on an ad hoc basis so for example we had `-Werror=compat` but not `-Werror=unused-binds`, whereas we had `-fwarn-unused-binds` but not `-fwarn-compat`. Fixes #22182.
* Add PrimCallConv support to GHCiLuite Stegeman2023-01-1821-145/+1043
| | | | | | | | | | | | | This adds support for calling Cmm code from bytecode using the native calling convention, allowing modules that use `foreign import prim` to be loaded and debugged in GHCi. This patch introduces a new `PRIMCALL` bytecode instruction and a helper stack frame `stg_primcall`. The code is based on the existing functionality for dealing with unboxed tuples in bytecode, which has been generalised to handle arbitrary calls. Fixes #22051
* Fix typo in recent darwin tests fixCheng Shao2023-01-181-1/+1
| | | | | Corrects a typo in !9647. Otherwise T18623 will still fail on darwin and stall other people's work.
* Bump gmp-tarballs submoduleBen Gamari2023-01-181-0/+0
| | | | This backports the upstream fix for CVE-2021-43618, fixing #22789.
* Bump ghc-tarballs to fix #22497Ben Gamari2023-01-181-0/+0
| | | | | | | | | | | It turns out that gmp 6.2.1 uses the platform-reserved `x18` register on AArch64/Darwin. This was fixed in upstream changeset 18164:5f32dbc41afc, which was merged in 2020. Here I backport this patch although I do hope that a new release is forthcoming soon. Bumps gmp-tarballs submodule. Fixes #22497.
* Add missing parenthesizeHsType in cvtSigTypeKindRyan Scott2023-01-184-2/+16
| | | | | | | | We need to ensure that the output of `cvtSigTypeKind` is parenthesized (at precedence `sigPrec`) so that any type signatures with an outermost, explicit kind signature can parse correctly. Fixes #22784.
* Enable -Wstar-is-type by default (#22759)Vladislav Zavialov2023-01-1816-53/+38
| | | | | | | | | | | | | Following the plan in GHC Proposal #143 "Remove the * kind syntax", which states: In the next release (or 3 years in), enable -fwarn-star-is-type by default. The "next release" happens to be 9.6.1 I also moved the T21583 test case from should_fail to should_compile, because the only reason it was failing was -Werror=compat in our test suite configuration.
* Use -Wdefault when running Python testdriver (#22727)Krzysztof Gogolewski2023-01-184-7/+9
|
* testsuite: req_smp --> req_target_smp, req_ghc_smpSylvain Henry2023-01-1816-44/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See #22630 and !9552 This commit: - splits req_smp into req_target_smp and req_ghc_smp - changes the testsuite driver to calculate req_ghc_smp - changes a handful of tests to use req_target_smp instead of req_smp - changes a handful of tests to use req_host_smp when needed The problem: - the problem this solves is the ambiguity surrounding req_smp - on master req_smp was used to express the constraint that the program being compiled supports smp _and_ that the host RTS (i.e., the RTS used to compile the program) supported smp. Normally that is fine, but in cross compilation this is not always the case as was discovered in #22630. The solution: - Differentiate the two constraints: - use req_target_smp to say the RTS the compiled program is linked with (and the platform) supports smp - use req_host_smp to say the RTS the host is linked with supports smp WIP: fix req_smp (target vs ghc) add flag to separate bootstrapper split req_smp -> req_target_smp and req_ghc_smp update tests smp flags cleanup and add some docstrings only set ghc_with_smp to bootstrapper on S1 or CC Only set ghc_with_smp to bootstrapperWithSMP of when testing stage 1 and cross compiling test the RTS in config/ghc not hadrian re-add ghc_with_smp fix and align req names fix T11760 to use req_host_smp test the rts directly, avoid python 3.5 limitation test the compiler in a try block align out of tree and in tree withSMP flags mark failing tests as host req smp testsuite: req_host_smp --> req_ghc_smp Fix ghc vs host, fix ghc_with_smp leftover
* Hadrian: fix warnings (#22783)Vladislav Zavialov2023-01-173-5/+3
| | | | | | | | | This change fixes the following warnings when building Hadrian: src/Hadrian/Expression.hs:38:10: warning: [-Wredundant-constraints] src/Hadrian/Expression.hs:84:13: warning: [-Wtype-equality-requires-operators] src/Hadrian/Expression.hs:84:21: warning: [-Wtype-equality-requires-operators] src/Hadrian/Haskell/Cabal/Parse.hs:67:1: warning: [-Wunused-imports]