summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* testsuite: Normalise output of ghci011 and T7627wip/normalise-testsMatthew Pickering2022-02-221-2/+7
| | | | | | | | The outputs of these tests vary on the order interface files are loaded so we normalise the output to correct for these inconsequential differences. Fixes #21121
* hadrian: Enable late-ccs when building profiled_ghcMatthew Pickering2022-02-211-1/+7
|
* Reinstallable GHCZubin Duggal2022-02-2133-69/+691
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows ghc and its dependencies to be built using a normal invocation of cabal-install. Each componenent which relied on generated files or additional configuration now has a Setup.hs file. There are also various fixes to the cabal files to satisfy cabal-install. There is a new hadrian command which will build a stage2 compiler and then a stage3 compiler by using cabal. ``` ./hadrian/build build-cabal ``` There is also a new CI job which tests running this command. For the 9.4 release we will upload all the dependent executables to hackage and then end users will be free to build GHC and GHC executables via cabal. There are still some unresolved questions about how to ensure soundness when loading plugins into a reinstalled GHC (#20742) which will be tighted up in due course. Fixes #19896
* hadrian: detect if 'main' is not a haskell file and add it to appropriate ↵Zubin Duggal2022-02-201-3/+13
| | | | list of sources
* Bump time submodule to 1.12.1Ben Gamari2022-02-205-2/+2
|
* Generically: remove redundant Semigroup constraintsheaf2022-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | This patch removes a redundant Semigroup constraint on the Monoid instance for Generically. This constraint can cause trouble when one wants to derive a Monoid instance via Generically through a type that doesn't itself have a Semigroup instance, for example: data Point2D a = Point2D !a !a newtype Vector2D a = Vector2D { tip :: Point2D a } deriving ( Semigroup, Monoid ) via Generically ( Point2D ( Sum a ) ) In this case, we should not require there to be an instance Semigroup ( Point2D ( Sum a ) ) as all we need is an instance for the generic representation of Point2D ( Sum a ), i.e. Semigroup ( Rep ( Point2D ( Sum a) ) () ).
* Use diagnostics for "missing signature" errorssheaf2022-02-208-221/+337
| | | | | | | | | | | | This patch makes the "missing signature" errors from "GHC.Rename.Names" use the diagnostic infrastructure. This encompasses missing type signatures for top-level bindings and pattern synonyms, as well as missing kind signatures for type constructors. This patch also renames TcReportMsg to TcSolverReportMsg, and adds a few convenience functions to compute whether such a TcSolverReportMsg is an expected/actual message.
* Track object file dependencies for TH accurately (#20604)Zubin Duggal2022-02-2028-199/+365
| | | | | | | | | | | | | | | | | | | `hscCompileCoreExprHook` is changed to return a list of `Module`s required by a splice. These modules are accumulated in the TcGblEnv (tcg_th_needed_mods). Dependencies on the object files of these modules are recording in the interface. The data structures in `LoaderState` are replaced with more efficient versions to keep track of all the information required. The MultiLayerModulesTH_Make allocations increase slightly but runtime is faster. Fixes #20604 ------------------------- Metric Increase: MultiLayerModulesTH_Make -------------------------
* rts/AdjustorPool: Silence unused function warningBen Gamari2022-02-171-1/+2
| | | | | | bitmap_get is only used in the DEBUG RTS configuration. Fixes #21079.
* Always define __GLASGOW_HASKELL_PATCHLEVEL1/2__ macrosMatthew Pickering2022-02-173-0/+11
| | | | | | | | | | | | As #21076 reports if you are using `-Wcpp-undef` then you get warnings when using the `MIN_VERSION_GLASGOW_HASKELL` macro because __GLASGOW_HASKELL_PATCHLEVEL2__ is very rarely explicitliy set (as version numbers are not 4 components long). This macro was introduced in 3549c952b535803270872adaf87262f2df0295a4 and it seems the bug has existed ever since. Fixes #21076
* docs: fix release notes formattingAdam Sandberg Ericsson2022-02-161-16/+17
|
* docs: mention -fprof-late-ccs in the release notesAdam Sandberg Ericsson2022-02-162-0/+5
| | | | And note which compiler version it was added in.
* ghci: fix -ddump-stg-cg (#21052)nineonine2022-02-164-3/+18
| | | | | The pre-codegen Stg AST dump was not available in ghci because it was performed in 'doCodeGen'. This was now moved to 'coreToStg' area.
* rts: document some closure typesAdam Sandberg Ericsson2022-02-164-68/+198
|
* rts: remove struct StgRetry, it is never usedAdam Sandberg Ericsson2022-02-161-5/+0
|
* Add test for #20562Oleg Grenrus2022-02-162-0/+16
|
* Relax load_load_barrier for aarch64Takenobu Tani2022-02-161-1/+1
| | | | | | | | | | | | | | | | | This patch relaxes the instruction for load_load_barrier(). Current load_load_barrier() implements full-barrier with `dmb sy`. It's too strong to order load-load instructions. We can relax it by using `dmb ld`. If current load_load_barrier() is used for full-barriers (load/store - load/store barrier), this patch is not suitable. See also linux-kernel's smp_rmb() implementation: https://github.com/torvalds/linux/blob/v5.14/arch/arm64/include/asm/barrier.h#L90 Hopefully, it's better to use `dmb ishld` rather than `dmb ld` to improve performance. However, I can't validate effects on a real many-core Arm machine.
* (#21044) Documented arithmetic functions in base.nikshalark2022-02-134-4/+264
| | | | Didn't get it right the ninth time. Now everything's formatted correctly.
* configure: Fix result reporting of adjustors method checkBen Gamari2022-02-131-1/+2
|
* adjustors/NativeAmd64Mingw: Use AdjustorPoolBen Gamari2022-02-134-151/+189
|
* adjustors/NativeAmd64: Use AdjustorPoolBen Gamari2022-02-134-124/+160
|
* Introduce initAdjustorsBen Gamari2022-02-138-5/+22
|
* rts: Initial commit of AdjustorPoolBen Gamari2022-02-134-0/+365
|
* rts/adjustor: Split Windows path out of NativeAmd64Ben Gamari2022-02-134-165/+229
|
* rts: Drop DEC Alpha adjustor implementationBen Gamari2022-02-131-107/+0
| | | | The last Alpha chip was produced in 2004.
* rts/Adjustor: Ensure that allocateExecPage succeededBen Gamari2022-02-134-0/+27
| | | | Previously we failed to handle the case that `allocateExecPage` failed.
* Only check the exit code in derefnull & divbyzero tests on OpenBSDGreg Steuck2022-02-123-2/+4
|
* Tag inference work.Andreas Klebinger2022-02-1288-310/+3093
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does three major things: * Enforce the invariant that all strict fields must contain tagged pointers. * Try to predict the tag on bindings in order to omit tag checks. * Allows functions to pass arguments unlifted (call-by-value). The former is "simply" achieved by wrapping any constructor allocations with a case which will evaluate the respective strict bindings. The prediction is done by a new data flow analysis based on the STG representation of a program. This also helps us to avoid generating redudant cases for the above invariant. StrictWorkers are created by W/W directly and SpecConstr indirectly. See the Note [Strict Worker Ids] Other minor changes: * Add StgUtil module containing a few functions needed by, but not specific to the tag analysis. ------------------------- Metric Decrease: T12545 T18698b T18140 T18923 LargeRecord Metric Increase: LargeRecord ManyAlternatives ManyConstructors T10421 T12425 T12707 T13035 T13056 T13253 T13253-spj T13379 T15164 T18282 T18304 T18698a T1969 T20049 T3294 T4801 T5321FD T5321Fun T783 T9233 T9675 T9961 T19695 WWRec -------------------------
* Fix documentation about Word64Rep/Int64Rep (#16964)Sylvain Henry2022-02-111-2/+2
|
* testsuite: Make sure all tests trigger ghc rebuildMatthew Pickering2022-02-112-2/+2
| | | | | | | I made a mistake when implementing #21029 which meant that certain tests didn't trigger a GHC recompilation. By adding the `test:ghc` target to the default settings all tests will now depend on this target unless explicitly opting out via the no_deps modifier.
* Make sure all platforms have a release jobMatthew Pickering2022-02-111-20/+24
| | | | | | | | | The release bindists are currently a mixture of validate and release builds. This is bad because the validate builds don't have profiling libraries. The fix is to make sure there is a release job for each platform we want to produce a release for.t Fixes #21066
* Decrease the size of the LargeRecord testsheaf2022-02-111-30/+0
| | | | | | | | | This test was taking too long to run, so this patch makes it smaller. ------------------------- Metric Decrease: LargeRecord -------------------------
* Refine tcSemigroupWarnings to work in ghc-primMatthew Pickering2022-02-101-4/+7
| | | | | | | | | | | | | ghc-prim doesn't depend on base so can't have any Monoid or Semigroup instances. However, attempting to load these definitions ran into issues when the interface for `GHC.Base` did exist as that would try and load the interface for `GHC.Types` (which is the module we are trying to compile and has no interface). The fix is to just not do this check when we are compiling a module in ghc-prim. Fixes #21069
* Fix copy-pasto in prof-late-ccs docsMatthew Pickering2022-02-101-2/+2
|
* eventlog: Fix size of TICKY_COUNTER_BEGIN_SAMPLEMatthew Pickering2022-02-101-1/+1
|
* eventlog: Delete misleading comment in gen_event_types.pyMatthew Pickering2022-02-101-2/+0
| | | | | Not all events start with CapNo and there's not logic I could see which adds this to the length.
* eventlog: Fix event type of MEM_RETURNMatthew Pickering2022-02-101-1/+1
| | | | | | | This leads to corrupted eventlogs because the size of EVENT_MEM_RETURN is completely wrong. Fixes a bug introduced in 2e29edb7421c21902b47d130d45f60d3f584a0de
* eventlog: Fix event type of EVENT_IPEMatthew Pickering2022-02-101-1/+1
| | | | | | | This leads to corrupted eventlogs because the size of EVENT_IPE is completely wrong. Fixes a bug introduced in 2e29edb7421c21902b47d130d45f60d3f584a0de
* Add metadata to integer-gmp.cabalMorrow2022-02-101-0/+8
|
* Bump Cabal submoduleBen Gamari2022-02-108-20/+18
| | | | | | | | | Adapts GHC to the factoring-out of `Cabal-syntax`. Fixes #20991. Metric Decrease: haddock.Cabal
* ghc-boot: Simplify writePackageDb permissions handlingDaniel Gröber2022-02-101-23/+16
| | | | | | | | | | | | | | | Commit ef8a3fbf1 ("ghc-boot: Fix metadata handling of writeFileAtomic") introduced a somewhat over-engineered fix for #14017 by trying to preserve the current permissions if the target file already exists. The problem in the issue is simply that the package db cache file should be world readable but isn't if umask is too restrictive. In fact the previous fix only handles part of this problem. If the file isn't already there in a readable configuration it wont make it so which isn't really ideal either. Rather than all that we now simply always force all the read access bits to allow access while leaving the owner at the system default as it's just not our business to mess with it.
* linker/PEi386: Make addLibrarySearchPath long-path awareBen Gamari2022-02-101-15/+3
| | | | | | | | | | Previously `addLibrarySearchPath` failed to normalise the added path to UNC form before passing it to `AddDllDirectory`. Consequently, the call was subject to the MAX_PATH restriction, leading to the failure of `test-defaulting-plugin-fail`, among others. Happily, this also nicely simplifies the implementation. Closes #21059.
* PEi386: Drop Windows Vista fallback in addLibrarySearchPathBen Gamari2022-02-101-52/+3
| | | | We no longer support Windows Vista.
* Docs:Mention that safe calls don't keep their arguments alive.Andreas Klebinger2022-02-101-2/+9
|
* Add late cost centre supportAndreas Klebinger2022-02-1017-6/+157
| | | | | This allows cost centres to be inserted after the core optimization pipeline has run.
* Add some perf tests for coercionssheaf2022-02-099-0/+1189
| | | | | | | | This patch adds some performance tests for programs that create large coercions. This is useful because the existing test coverage is not very representative of real-world situations. In particular, this adds a test involving an extensible records library, a common pain-point for users.
* rts/mmap: Refactor mmapForLinkerBen Gamari2022-02-092-113/+124
| | | | | | Here we try to separate the policy decisions of where to place mappings from the mechanism of creating the mappings. This makes things significantly easier to follow.
* linker: Don't use MAP_FIXEDBen Gamari2022-02-091-7/+4
| | | | | | | | As noted in #21057, we really shouldn't be using MAP_FIXED. I would much rather have the process crash with a "failed to map" error than randomly overwrite existing mappings. Closes #21057.
* rts/linker/MMap: Use MemoryAccess in mmapForLinkerBen Gamari2022-02-095-24/+42
|
* rts/linker: Drop dead IA64 codeBen Gamari2022-02-091-6/+0
|