-
012af357
by Cheng Shao at 2024-12-09T09:46:45-08:00
compiler: implement --show-iface-abi-hash major mode
-
0f665588
by Cheng Shao at 2024-12-09T09:46:45-08:00
Oneshot bytecode linking
-
a54376cf
by Torsten Schmits at 2024-12-09T09:46:45-08:00
Package deps bytecode linking
-
44c8c978
by Ian-Woo Kim at 2024-12-09T09:46:45-08:00
set extra_decls = Nothing in interpreter after interface generation
-
d695ed07
by Ian-Woo Kim at 2024-12-09T09:46:45-08:00
No in-memory resident mi_extra_decls in compilation.
They are transiently loaded and removed after byte-code generation.
-
27a4a8bc
by Ben Gamari at 2024-12-09T10:20:35-08:00
rts: Tighten up invariants of PACK
-
0756f0b5
by Ben Gamari at 2024-12-09T10:20:40-08:00
StgToByteCode: Don't assume that data con workers are nullary
Previously StgToByteCode assumed that all data-con workers were of a
nullary representation. This is not a valid assumption, as seen
in #23210, where an unsaturated application of a unary data
constructor's worker resulted in invalid bytecode. Sadly, I have not yet
been able to reduce a minimal testcase for this.
Fixes #23210.
-
b335f856
by Cheng Shao at 2024-12-10T10:52:14-08:00
driver: fix hpc undefined symbol issue in TH with -fprefer-byte-code
This commit fixes an undefined symbol error in RTS linker when
attempting to compile home modules with -fhpc and
-fbyte-code-and-object-code/-fprefer-byte-code, see #25510 for
detailed description and analysis of the bug.
Also adds T25510/T25510c regression tests to test make mode/oneshot
mode of the bug.
backported to GHC 9.10.
-
2261e59e
by Rebecca Turner at 2024-12-10T13:55:31-08:00
ghc-internal: No trailing whitespace in exceptions
This is a backport of the *behavior* in
https://gitlab.haskell.org/ghc/ghc/-/commit/bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8
The commit upstream depends on a bunch of other changes to the exception
reporting infrastructure, so I've chosen to recreate its behavior here
rather than pulling in all the dependent patches.
This fixes a regression where GHC 9.10.1 adds a trailing newline to the
`displayException` implementation for `SomeException`. This has been
reverted in `master` but 9.10.2 isn't out yet and there's various
changes the upstream commit depends on, so this is a simple one-line
fix.
See: https://gitlab.haskell.org/ghc/ghc/-/issues/25052
-
68f4225c
by Ian-Woo Kim at 2024-12-11T14:49:55-08:00
disabled stub dynamic object generation for one-shot byte-code linking.
-
97da9d9e
by Torsten Schmits at 2024-12-25T08:52:35-08:00
refactor quadratic search in warnMissingHomeModules
-
ba330bbd
by Rodrigo Mesquita at 2024-12-25T09:49:02-08:00
Improve reachability queries on ModuleGraph
Introduces `ReachabilityIndex`, an index constructed from a
`GHC.Data.Graph.Directed` `Graph` that supports fast reachability
queries (in $O(1)$). This abstract data structure is exposed from
`GHC.Data.Graph.Directed.Reachability`.
This index is constructed from the module graph nodes and cached in
`ModuleGraph`, enabling efficient reachability queries on the module
graph. Previously, we'd construct a Map of Set of ModuleGraph nodes
which used a lot of memory (`O(n^2)` in the number of nodes) and cache
that in the `ModuleGraph`. By using the reachability index we get rid of
this space leak in the module graph -- even though the index is still
quadratic in the number of modules, it is much, much more space
efficient due to its representation using an IntMap of IntSet as opposed
to the transitive closure we previously cached.
In a memory profile of MultiLayerModules with 100x100 modules, memory
usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB
are caused by a second space leak related to ModuleGraph. On the same
program, it brings compile time from 7.5s to 5.5s.
Note how we simplify `checkHomeUnitsClosed` in terms of
`isReachableMany` and by avoiding constructing a second graph with the
full transitive closure -- it suffices to answer the reachability query
on the full graph without collapsing the transitive closure completely
into nodes.
Unfortunately, solving this leak means we have to do a little bit more
work since we can no longer cache the result of turning vertex indices
into nodes. This results in a slight regression in MultiLayerModulesTH_Make,
but results in large performance and memory wins when compiling large
amounts of modules.
-------------------------
Metric Decrease:
mhu-perf
Metric Increase:
MultiLayerModulesTH_Make
-------------------------
-
53ecc06c
by Ian-Woo Kim at 2024-12-25T16:45:39-08:00
dummy flag -fpackage-db-byte-code
-
3573c6fe
by Ian-Woo Kim at 2025-01-08T06:58:32-08:00
similarize the parallel downsweep to GHC HEAD version.
-
9da11f8f
by Matthew Pickering at 2025-01-08T08:29:47-08:00
Use deterministic names for temporary files
When there are multiple threads they can race to create a temporary
file, in some situations the thread will create ghc_1.c and in some it
will create ghc_2.c. This filename ends up in the debug info for object
files after compiling a C file, therefore contributes to object
nondeterminism.
In order to fix this we store a prefix in `TmpFs` which serves to
namespace temporary files. The prefix is populated from the counter in
TmpFs when the TmpFs is forked. Therefore the TmpFs must be forked
outside the thread which consumes it, in a deterministic order, so each
thread always receives a TmpFs with the same prefix.
This assumes that after the initial TmpFs is created, all other TmpFs
are created from forking the original TmpFs. Which should have been try
anyway as otherwise there would be file collisions and non-determinism.
Fixes #25224
-
3a484a7b
by Ian-Woo Kim at 2025-01-08T14:47:34-08:00
monotonic FinderCache. missed part from parallel downsweep latest GHC HEAD patch
-
2c4d9f61
by Andreas Klebinger at 2025-02-28T15:04:43-08:00
SpecConstr: Introduce a separate argument limit for forced specs.
We used to put no limit at all on specializations forced via the SPEC
argument. This isn't always reasonable so we introduce a very high limit
that applies to forced specializations, a flag to control it, and we now
emit a warning if we fail a specialization because we exceed the
warning.
Fixes #25197
-
1c80ba27
by Torsten Schmits at 2025-10-30T17:58:26+01:00
Load TH deps from home unit states of the modules that import them