[Git][ghc/ghc][wip/mpickering/get-link-deps] 112 commits: Don't store boot locations in finder cache
Rodrigo Mesquita (@alt-romes)
gitlab at gitlab.haskell.org
Wed Dec 18 15:01:48 UTC 2024
Rodrigo Mesquita pushed to branch wip/mpickering/get-link-deps at Glasgow Haskell Compiler / GHC
Commits:
44d909a3 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00
Don't store boot locations in finder cache
Partially reverts commit fff55592a7b
Amends add(Home)ModuleToFinder so that locations for boot files are not stored in the finder cache.
Removes InstalledModule field from InstalledFound constructor since it's the same as the key that was searched for.
- - - - -
64c95292 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00
Concentrate boot extension logic in Finder
With new mkHomeModLocation that takes an extra HscSource to add boot extensions if required.
- - - - -
11bad98d by ARATA Mizuki at 2024-11-19T14:39:08-05:00
Better documentation for floating-point min/max and SIMD primitives
See #25350 for floating-point min/max
Co-authored-by: sheaf <sam.derbyshire at gmail.com>
- - - - -
791a47b2 by Arnaud Spiwack at 2024-11-20T14:00:05+00:00
Add test for #25185
- - - - -
374e18e5 by Arnaud Spiwack at 2024-11-20T14:09:30+00:00
Quick look: emit the multiplicity of app heads in tcValArgs
Otherwise it's not scaled properly by the context, allowing unsound
expressions.
Fixes #25185.
- - - - -
1fc02399 by sheaf at 2024-11-20T18:11:03-05:00
x86 NCG: fix regUsageOfInstr for VMOVU & friends
This commit fixes the implementation of 'regUsageOfInstr' for vector
operations that take an 'Operand' as the destination, by ensuring that
when the destination is an address then the address should be *READ*,
and not *WRITTEN*.
Getting this wrong is a disaster, as it means the register allocator
has incorrect information, which can lead to it discard stores to
registers, segfaults ensuing.
Fixes #25486
- - - - -
7bd407a6 by Brandon Chinn at 2024-11-21T14:08:15-05:00
Fix CRLF in multiline strings (#25375)
- - - - -
7575709b by Rodrigo Mesquita at 2024-11-21T14:08:52-05: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
-------------------------
- - - - -
bcbcdaaf by Cheng Shao at 2024-11-21T14:09:28-05: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.
- - - - -
970ada5a by Ben Gamari at 2024-11-22T23:32:06-05:00
gitlab-ci: Bump ci-images
For introduction of Alpine/i386 image.
Thanks to Julian for the base image.
Co-Authored-By: Julian Ospald <hasufell at hasufell.de>
- - - - -
8115abc2 by Ben Gamari at 2024-11-22T23:32:06-05:00
gitlab-ci: Add release job for i386/Alpine
As requested by Mikolaj and started by Julian.
Co-Authored-By: Julian Ospald <hasufell at hasufell.de>
- - - - -
639f0149 by Ben Gamari at 2024-11-22T23:32:06-05:00
rts/linker/Elf: Resolve _GLOBAL_OFFSET_TABLE_
- - - - -
490d4d0a by Ben Gamari at 2024-11-22T23:32:06-05:00
gitlab-ci: Mark i386 Alpine test breakages
Marks the following tests as broken on i386/Alpine:
* T22033 due to #25497
* simd009, T25062_V16, T25169, T22187_run due to #25498
- - - - -
536cdf09 by Cheng Shao at 2024-11-22T23:32:42-05:00
compiler: remove unused GHC.Linker.Loader.loadExpr
This patch removes the unused `GHC.Linker.Loader.loadExpr` function.
It was moved from `GHC.Runtime.Linker.linkExpr` in `ghc-9.0` to
`GHC.Linker.Loader.loadExpr` in `ghc-9.2`, and remain completely
unused and untested ever since. There's also no third party user of
this function to my best knowledge, so let's remove this. Anyone who
wants to write their own GHC API function to load bytecode can consult
the source code in older release branches.
- - - - -
6ee35024 by Drew Fenwick at 2024-11-22T23:33:26-05:00
Fix a non-compiling example in the type abstractions docs
This patch adds a missing Show constraint to a code example in the User Guide's type abstractions docs to fix issue #25422.
- - - - -
d1172e20 by Rodrigo Mesquita at 2024-11-22T23:34:02-05:00
Re-introduce ErrorCallWithLocation with a deprecation pragma
With the removal of the duplicate backtrace, part of CLC proposal #285,
the constructor `ErrorCallWithLocation` was removed from base.
This commit re-introduces it with a deprecation.
- - - - -
1187a60a by Ben Gamari at 2024-11-22T23:34:39-05:00
testsuite: Skip tests requiring Hadrian deps in out-of-tree testsuite runs
Some testsuite tests require specific tools (e.g. `check-ppr` and
`check-exact`) beyond those shipped in the binary distribution. Skip
these tests.
Fixes #13897.
- - - - -
c37d7a2e by Ben Gamari at 2024-11-22T23:34:39-05:00
testsuite: Declare exactprint tests' dependency on check-exact
- - - - -
454ce957 by Ben Gamari at 2024-11-22T23:35:15-05:00
ghc-internal: Fix a few cases of missing Haddock markup
- - - - -
a249649b by Ben Gamari at 2024-11-22T23:35:51-05:00
testsuite/GHCiPrimCall : Add missing Makefile includes
- - - - -
a021a493 by Ben Gamari at 2024-11-22T23:35:51-05:00
testsuite/IpeStats: Use Make rather than shell interpolation
- - - - -
6e1fbda7 by Ben Gamari at 2024-11-25T03:55:44-05:00
hadrian-ghci-multi: Pass -this-package-name in unit response files
As noted in #25509, the `-this-package-name` must be passed for each
package to ensure that GHC can response references to the packages'
exposed modules via package-qualified imports. Fix this.
Closes #25509.
- - - - -
a05e4a9b by Simon Hengel at 2024-11-25T03:56:33-05:00
Refactoring: Use `OnOff` more consistently for `Extension`
- - - - -
7536181d by Matthew Pickering at 2024-11-25T14:00:07-05:00
driver: Always link against "base" package when one shot linking
The default value for base-unit-id is stored in the settings file.
At install time, this can be set by using the BASE_UNIT_ID environment
variable.
At runtime, the value can be set by `-base-unit-id` flag.
For whether all this is a good idea, see #25382
Fixes #25382
- - - - -
7f90f319 by Andreas Klebinger at 2024-11-25T14:00:44-05:00
Compacting GC: Handle black holes in large objects.
As #14497 showed black holes can appear inside large objects when
we capture a computation and later blackhole it like we do for AP_STACK
closures.
Fixes #24791
- - - - -
291388e1 by Cheng Shao at 2024-11-25T14:01:19-05:00
ci: minor nix-in-docker improvements
This patch makes some minor improvements re nix-in-docker logic in the
ci configuration:
- Update `nixos/nix` to the latest version
- Apply $CPUS to `cores`/`max-jobs` to avoid oversubscribing while
allowing a reasonable degree of parallelism
- Remove redundant `--extra-experimental-features nix-command` in
later `nix shell` invocations, it's already configured in
`/etc/nix/nix.conf`
- - - - -
e684c406 by Cheng Shao at 2024-11-25T14:01:57-05:00
ci: avoid depending on stack job for test-bootstrap jobs
This patch makes test-bootstrap related ci jobs only depend on
hadrian-ghc-in-ghci job to finish, consistent with other jobs in the
full-build stage generated by gen_ci.hs. This allows the jobs to be
spawned earlier and improve overall pipeline parallelism.
- - - - -
caaf5388 by Simon Hengel at 2024-11-25T14:02:41-05:00
Refactoring: Remove `pSupportedExts` from `ParserOpts`
This is never used for lexing / parsing. It is only used by
`GHC.Parser.Header.getOptions`.
- - - - -
41f8365c by Arnaud Spiwack at 2024-11-25T14:03:23-05:00
Add test for #25515
- - - - -
9279619f by Arnaud Spiwack at 2024-11-25T14:03:23-05:00
Desugar record notation with correct multiplicities
Simply uses the multiplicity as stored in the field. As I'm writing
this commit, the only possible multiplicity is 1, but !13525 is
changing this. It's actually easier to take !13525 into account.
Fixes #25515.
- - - - -
fcc3ae6e by Andreas Klebinger at 2024-11-26T08:24:58-05:00
Clarify INLINE unfolding optimization docs.
Fixes #24660
- - - - -
88c4fe1d by Cheng Shao at 2024-11-26T08:25:34-05:00
rts: remove -Wl,-U,___darwin_check_fd_set_overflow hack
This patch bumps macOS minimum SDK version to 11.0 for x86_64-darwin
to align it with aarch64-darwin. This allows us to get rid of the
horrible -Wl,-U,___darwin_check_fd_set_overflow hack, which is causing
linker warnings and testsuite failures on macOS 15. Fixes #25504.
- - - - -
53f978c0 by doyougnu at 2024-11-26T16:07:26-05:00
ghc-experimental: expose GHC.RTS.Flags, GHC.Stats
See this CLC proposal:
- https://github.com/haskell/core-libraries-committee/issues/289
and this CLC proposal for background:
- https://github.com/haskell/core-libraries-committee/issues/288
Metric Decrease:
MultiLayerModulesTH_OneShot
- - - - -
e70d4140 by Wang Xin at 2024-11-26T16:08:10-05:00
Add -mcmodel=medium moduleflag to generated LLVM IR on LoongArch platform
With the Medium code model, the jump range of the generated jump
instruction is larger than that of the Small code model. It's a
temporary fix of the problem descriped in https://gitlab.haskell
.org/ghc/ghc/-/issues/25495. This commit requires that the LLVM
used contains the code of commit 9dd1d451d9719aa91b3bdd59c0c6679
83e1baf05, i.e., version 8.0 and later. Actually we should not
rely on LLVM, so the only way to solve this problem is to implement
the LoongArch backend.
Add new type for codemodel
- - - - -
df42ba16 by Andreas Klebinger at 2024-11-27T11:40:49-05:00
Cmm constant folding: Narrow results to operations bitwidth.
When constant folding ensure the result is still within bounds
for the given type by explicitly narrowing the results.
Not doing so results in a lot of spurious assembler warnings
especially when testing primops.
- - - - -
bf3db97e by Ben Gamari at 2024-11-27T11:41:26-05:00
ghc-toolchain: Introduce basic flag validation
We verify that required flags (currently `--output` and `--triple`) are
provided. The implementation is truly awful, but so is getopt.
Begins to address #25500.
- - - - -
a104508d by Ben Gamari at 2024-11-27T11:42:03-05:00
rts: Allow ExecPage to allocate anywhere in address space
Currently the ExecPage facility has two users:
* GHCi, for constructing info tables, and
* the adjustor allocation path
Despite neither of these have any spatial locality constraints ExecPage
was using the linker's `mmapAnonForLinker`, which tries hard to ensure
that mappings end up nearby the executable image. This makes adjustor
allocation needlessly subject to fragmentation concerns.
We now instead return less constrained mappings, improving the
robustness of the mechanism.
Addresses #25503.
- - - - -
c3fc9b86 by Ben Gamari at 2024-11-27T11:42:39-05:00
base: Fix incorrect mentions of GHC.Internal.Numeric
These were incorrectly changed by the automated refactoring of the
`ghc-internal` migration.
Fixes #25521.
- - - - -
a362b943 by sheaf at 2024-11-27T23:44:28-05:00
Add checkExact to toolTargets
This change means that the Hadrian multi target will include exactprint.
In particular, this means that HLS will work on exactprint inside the GHC tree.
- - - - -
e6c957e4 by Arnaud Spiwack at 2024-11-27T23:45:09-05:00
Add test for #25428
- - - - -
52d97f4e by Arnaud Spiwack at 2024-11-27T23:45:09-05:00
Don't bypass MonoLocalBind in empty patterns
Fixes #25428
- - - - -
7890f2d8 by Ben Gamari at 2024-11-28T10:26:46-05:00
hadrian: Bump directory bound to >=1.3.9
Earlier versions of `directory` are racy on Windows due to #24382.
Also includes necessary Hadrian bootstrap plan bump.
Fixes #24382.
- - - - -
0fd43ea6 by Adam Sandberg Ericsson at 2024-11-28T10:27:22-05:00
mention -Iw in +RTS -?
- - - - -
6cf579b9 by Ben Gamari at 2024-11-28T10:27:59-05:00
gitlab-ci: Set GIT_SUBMODULE_FORCE_HTTPS
GitLab recommends using `https://` to clone submodules and provides the
`GIT_SUBMODULE_FORCE_HTTPS` variable to force this.
Fixes #25528.
- - - - -
5b4774f9 by sheaf at 2024-12-03T15:22:07+01:00
Remove TcRnDeprecatedInvisTyArgInConPat mechanism
The combination of ScopedTypeVariables + TypeApplications now no longer
enables the use of type applications in constructor patterns, as per
GHC proposal #448.
This completes the deprecation that begun with GHC 9.8.
We also remove the -Wdeprecated-type-abstractions flag, which was
introduced in GHC 9.10.
- - - - -
f813c8d7 by sheaf at 2024-12-03T17:10:15-05:00
Hadrian: use / when making filepaths absolute
In Hadrian, we are careful to use -/- rather than </>, in order to use
/ instead of \ in filepaths. However, this gets ruined by the use of
makeAbsolute from System.Directory, which, on Windows, changes back
forward slashes to backslashes.
- - - - -
292ed74e by Ben Gamari at 2024-12-03T17:10:52-05:00
rts/linker: Fix out-of-bounds mapping logic
Previously the structure of `mmapInRegion` concealed a subtle bug
concerning handling of `mmap` returning mappings below the beginning of
the desired region. Specifically, we would reset `p = result + bytes`
and then again reset `p = region->start` before looping around for
another iteration. This resulted in an infinite loop on FreeBSD.
Fixes #25492.
- - - - -
20912f5b by Ben Gamari at 2024-12-03T17:10:52-05:00
rts/linker: Clarify debug output
- - - - -
f98b3ac0 by Simon Hengel at 2024-12-03T17:11:30-05:00
SysTools: Avoid race conditions when processing output (fixes #16450)
- - - - -
03851b64 by Rodrigo Mesquita at 2024-12-03T17:12:06-05:00
mg: Drop unnecessary HasCallStack
This HasCallStack was a debugging artifact from a previous commit.
- - - - -
01d213b5 by Rodrigo Mesquita at 2024-12-03T17:12:06-05:00
Improve haddock of graphReachabilityCyclic
- - - - -
f7cbffe2 by Rodrigo Mesquita at 2024-12-03T17:12:06-05:00
Refactor ModuleGraph interface
The 'ModuleGraph' abstraction represents the relationship and strucutre
of the modules being compiled. This structure is meant to be constructed
once at the start of compilation, and never changed again.
However, it's exposed interface was confusing and exposed too many
footguns which led to inneficient usages of the ModuleGraph. This commit
improves significantly the exported interface of ModuleGraph, taking
into consideration the recent improvements around reachability queries.
Since the ModuleGraph graphs and related structures (HPT, EPS) are
performance critical in the sense that somewhat simple mistakes can
cause bad leaks and non-linear memory usage, we want to have proper APIs
that guide efficient usage. This is a good step in that direction.
- - - - -
b69a7f3c by David Binder at 2024-12-04T18:37:42-05:00
Use consistent capitalization for "GHC Proposal" in user guide
- - - - -
18d9500d by David Binder at 2024-12-04T18:37:42-05:00
Fix reference to GHC proposal 193 in user guide
- - - - -
dd959406 by Ben Gamari at 2024-12-04T18:38:18-05:00
Revert "rts/Interpreter: Assert that TEST*_P discriminators are valid"
This assertion was based on the misconception that `GET_TAG` was
returning the pointer tag whereas it is actually returning the
constructor tag.
This reverts commit 9bf3663b9970851e7b5701d68147450272823197.
Fixes #25527.
- - - - -
cad6fede by Ben Gamari at 2024-12-04T18:38:54-05:00
rts/IOManager: Drop dead code
This assignment is dead code as it occurs after all branches have
returned. Moreover, it can't possibly be relevant since the "available"
branch already sets `flag`.
Potentially fixes #25542.
- - - - -
55d8304e by Ben Gamari at 2024-12-06T16:56:00-05:00
ghc-internal: Drop GHC.Internal.Data.Enum
This module consists only of reexports and consequently there is no
reason for it to exist.
- - - - -
56b9f484 by Ben Gamari at 2024-12-06T16:56:00-05:00
base: Introduce Data.Bounded
As proposed in [CLC#208] but unfortunately `Data.Enum` was already
incorrectly introduced in the `ghc-internal` refactor.
[CLC#208]: https://github.com/haskell/core-libraries-committee/issues/208
- - - - -
336d392e by Ben Gamari at 2024-12-06T16:56:00-05:00
base: Deprecate export of Bounded from Data.Enum
This begins the process of bringing us into compliance with
[CLC#208].
[CLC#208]: https://github.com/haskell/core-libraries-committee/issues/208
- - - - -
dd7ca939 by Ben Gamari at 2024-12-06T16:56:00-05:00
base: Mention incorrect Data.Enum addition in changelog
- - - - -
dfd1db48 by Ben Gamari at 2024-12-06T16:56:36-05:00
base: Reintroduce {Show,Enum} IoSubSystem
These instances were dropped in !9676 but not approved by the CLC.
Addresses #25549.
- - - - -
090fc7c1 by Peter Trommler at 2024-12-07T03:41:21-05:00
Fix requirements on T25240
T25240 doesn't need RTS linker, GHCi is sufficient and GHCi can also be
dynamically linked.
- - - - -
3fb5d399 by Peter Trommler at 2024-12-07T03:41:21-05:00
Fix requirements for T25155
Loading C objects requires RTS linker.
- - - - -
4c58bdf6 by Leary at 2024-12-07T03:42:07-05:00
TH: Add typed variants of dataToExpQ and liftData
This commit introduces to template-haskell (via ghc-internal) two
functions `dataToCodeQ` and `liftDataTyped`, typed variants of
`dataToExpQ` and `liftData` respectively.
Tested in: `dataToCodeQUnit`.
- - - - -
63027593 by Serge S. Gulin at 2024-12-08T13:52:05+03:00
JS: Basic cleanup for unused stuff to simplify things.
1. Make `staticInitStat`, `staticDeclStat`, `allocUnboxedConStatic`, `allocateStaticList`, `jsStaticArg` local to modules.
2. Remove unused `hdRawStr`, `hdStrStr` from Haskell and JavaScript (`h$pstr`, `h$rstr`, `h$str`).
3. Introduce a special type `StaticAppKind` enumeration and `StaticApp` to represent boxed scalar static applications. Originally, StaticThunk supported to pass Maybe when it became Nothing for initializied thunks in an alternatie way but it is not used anymore.
- - - - -
a9f8f1fb by Serge S. Gulin at 2024-12-08T14:10:45+03:00
JS: Add trivial optimizations for `unpackCString` and `unpackCStringUtf8`.
It became possible due of introduction strings unfloating at Sinker pass (#13185). Earns few more bytes at optimizations.
- - - - -
b519c06b by Serge S. Gulin at 2024-12-08T15:50:26+03:00
JS: Specialize unpackCString# CAFs (fixes #24744)
Code analysis shown that such optimization would be possible out of the box if `cachedIdentForId` allowed to do that for Haskell `Id`s which are represented by few JavaScript `Ident`s. It is a usual for strings which are represented at JavaScript as a pair of 2 values: the string content and the offset where to start reading actual string from the full content. Usually offset is 0 but technically we need to allow such complex structures to be treated as "global".
Enabling it there shown that `genToplevelRhs` and `globalOccs` had inaccuracies in their implementations:
1. `globalOccs` operated over JavaScript's `Ident`s but for complex structures it didn't pay attention to the fact that different Idents actually could be pointed to same Id. Now the algo is changed to calculate occurencies for Ids.
2. `genToplevelRhs` didn't assume that different Idents pointed to same Id can have mixed order of occurence. But actually the order is important. Strings are encoded into 2 variables where first is content and second is offset and their order are not interchangeable. It is fixed by regeneration Idents from collected Ids which is fine because all Idents generation is passed through the Cache and they are quasi-stable.
- - - - -
a8ceccf3 by Brandon Chinn at 2024-12-09T16:25:43-05:00
Fix panic in multiline string with unterminated gap (#25530)
- - - - -
9e464ad0 by Brandon Chinn at 2024-12-09T16:25:43-05:00
Add test case for unterminated multiline string
- - - - -
ed1ed5c6 by Rodrigo Mesquita at 2024-12-09T16:26:19-05:00
Revert mapMG renaming
We had previously renamed this function for consistency, but that caused unnecessary breakage
- - - - -
158261f7 by Sylvain Henry at 2024-12-09T16:27:01-05:00
RTS: make Cabal flags manual
Cabal shouldn't automatically try to set them. We set them explicitly.
- - - - -
a83b7ed6 by Matthew Stephenson at 2024-12-10T14:01:22-05:00
Add missing @since documentation for (!?) function
- - - - -
e745e3a3 by Ben Gamari at 2024-12-10T14:01:59-05:00
compiler: Don't attempt to TSAN-instrument SIMD operations
TSAN only provides instrumentation for 8, 16, 32, and 64-bit memory
loads/stores. Don't attempt to instrument wider operations.
Fixes #25563.
- - - - -
684c0018 by Ben Gamari at 2024-12-10T14:02:35-05:00
gitlab/ci: Don't clobber RUNTEST_ARGS
Previously the logic handling `IGNORE_PERF_FAILURES` clobbered the
user's `RUNTEST_ARGS`. Fix this.
- - - - -
41dae5b8 by Ben Gamari at 2024-12-10T14:03:11-05:00
hadrian: Mitigate mktexfmt race
At least some versions of Texlive's `mktexfmt` utility cannot be invoked
concurrently in their initial run since they fail to handle failure of
`mkdir` due to racing. Specifically, we see
```
| Run Xelatex: users_guide.tex => /tmp/extra-dir-9616886274866
| Run Xelatex: Haddock.tex => /tmp/extra-dir-9616886274869
This is XeTeX, Version 3.14159265-2.6-0.999992 (TeX Live 2020) (preloaded format=xelatex)
restricted \write18 enabled.
kpathsea: Running mktexfmt xelatex.fmt
mktexfmt: mktexfmt is using the following fmtutil.cnf files (in precedence order):
mktexfmt: /usr/share/texlive/texmf-dist/web2c/fmtutil.cnf
mktexfmt: mktexfmt is using the following fmtutil.cnf file for writing changes:
mktexfmt: /builds/ghc/ghc/tmp-home/.texlive2020/texmf-config/web2c/fmtutil.cnf
/usr/bin/mktexfmt: mkdir(/builds/ghc/ghc/tmp-home/.texlive2020/texmf-var/web2c/) failed for tree /builds/ghc/ghc/tmp-home/.texlive2020/texmf-var/web2c: File exists at /usr/share/texlive/tlpkg/TeXLive/TLUtils.pm line 937.
I can't find the format file `xelatex.fmt'!
```
That is two `mktexfmt` invocations (for the user's guide and haddock
builds) attempted to create `$HOME/texlive2020/texmf-var/web2c` and
raced. One of the two `mkdir`'s consequently failed, bringing down the
entire build.
We avoid this by ensuring that the first `xelatex` invocation is always
performed serially.
Fixes #25564.
- - - - -
9efbc51f by Ben Gamari at 2024-12-10T14:03:48-05:00
rts/CheckUnload: Reset old_objects if unload is skipped
Previously `checkUnload` failed to reset `old_objects` when it decided
not to unload (e.g. due to heap profiling being enabled).
Fixes #24935.
- - - - -
5192a75f by Ben Gamari at 2024-12-11T04:28:11-05:00
rts: Annotate BCOs with their Name
This introduces a new bytecode instruction, `BCO_NAME`, to aid in debugging
bytecode execution. This instruction is injected by `mkProtoBCO` and
captures the Haskell name of the BCO. It is then printed by the
disassembler, allowing ready correlation with STG dumps.
- - - - -
99225996 by Ben Gamari at 2024-12-11T04:28:48-05:00
configure: Implement ld override whitelist
Bring `configure` into alignment with `ghc-toolchain`, ensuring that the
ld-override logic will only take effect on Linux and Windows.
Fixes #25501.
- - - - -
4a8fc928 by Ben Gamari at 2024-12-11T12:33:42+00:00
testsuite: Unmark T14028 as broken on FreeBSD
This now appears to pass on FreeBSD 14.
Closes #19723.
- - - - -
d7c0eb5a by Ben Gamari at 2024-12-11T12:33:42+00:00
gitlab-ci: Migrate FreeBSD runner tag to FreeBSD 14
- - - - -
7246dacc by Ben Gamari at 2024-12-11T12:33:42+00:00
gitlab-ci: Reintroduce FreeBSD 14 job
- - - - -
4af936da by Ben Gamari at 2024-12-11T12:33:42+00:00
gitlab-ci: Allow use of newer cabal-install bindists
Newer cabal-install bindists have internal directory structure.
Here we detect and account for the presence of such structure.
- - - - -
cbf38c1b by Ben Gamari at 2024-12-11T12:33:42+00:00
gitlab-ci: Enable documentation build on FreeBSD 14
- - - - -
d68107fb by Ben Gamari at 2024-12-11T12:33:42+00:00
gitlab-ci: Use system libffi on FreeBSD
- - - - -
fea3b590 by Ben Gamari at 2024-12-11T12:33:42+00:00
testsuite: Mark linker_unload as broken on FreeeBSD
Due to #25491.
- - - - -
ccf171ee by Ben Gamari at 2024-12-11T12:33:42+00:00
gitlab-ci: Prefer system toolchain on FreeBSD
It's not uncommon to find machines with gcc installed via ports. We
should be using the system's default clang-based toolchain instead.
- - - - -
cfb34738 by Ben Gamari at 2024-12-11T12:33:42+00:00
testsuite: Mark T21969 as broken on FreeBSD
Due to #25512.
- - - - -
0b64e37c by Ben Gamari at 2024-12-11T12:33:42+00:00
testsuite: Mark RestartEventLogging as broken on FreeBSD
I am seeing this fail quite reproducibly.
Due to #19724.
- - - - -
3b412019 by Ben Gamari at 2024-12-11T12:33:42+00:00
testsuite: Mark T16180 as "broken" on FreeBSD
Sadly we in fact need to skip it as it merely times out during
compilation.
See #14012.
- - - - -
57e3cab5 by Ben Gamari at 2024-12-11T12:33:42+00:00
testsuite: Skip T16992 unless in slow speed
This test has extraordinary memory requirements and tests a rather
niche aspect of the compact region mechanism. It has been suggested
multiple times that we shouldn't run it in the default testsuite
configuration. Finally implement this.
See #21890.
See #21892.
- - - - -
f08a72eb by Ben Gamari at 2024-12-11T19:30:54-05:00
rts(setNumCapabilities): Assert that n_caps < MAX_N_CAPS
It was noticed in #25560 that this would previously be allowed,
resulting in a segfault.
I will add a proper exception in `base` in a future commit.
- - - - -
e10d31ad by Ben Gamari at 2024-12-11T19:30:55-05:00
ghc-internal: Fix inconsistent FFI import types
The foreign imports of `enabled_capabilities` and
`getNumberOfProcessors` were declared as `CInt` whereas they are defined
as `uint32_t`.
- - - - -
06265655 by Ben Gamari at 2024-12-11T19:30:55-05:00
rts: Mention maximum capability count in users guide
Addresses #25560.
- - - - -
d488470b by Ben Gamari at 2024-12-11T19:30:55-05:00
rts/Capability: Move induction variable declaration into `for`s
Just a stylistic change.
- - - - -
71f050b7 by Ben Gamari at 2024-12-11T19:30:55-05:00
rts: Determine max_n_capabilities at RTS startup
Previously the maximum number of capabilities supported by the RTS was
statically capped at 256. However, this bound is uncomfortably low given
the size of today's machine.
While supporting unbounded, fully-dynamic adjustment would be nice, it
is complex and so instead we do something simpler: Probe the logical
core count at RTS startup and use this as the static bound for the rest
of our execution.
This should avoid users running into the capability limit on large
machines while avoiding wasting memory on a large capabilities array for
most users and keeping complexity at bay.
Addresses #25560.
- - - - -
1e84b411 by Ben Gamari at 2024-12-11T19:30:55-05:00
testsuite: Introduce req_c_rts
As suggested by @hsyl20, this is intended to mark tests that rely on the
behavior of the C RTS.
- - - - -
683115a4 by Ben Gamari at 2024-12-11T19:30:55-05:00
testsuite: Add test for #25560
- - - - -
ef2052a8 by Ben Gamari at 2024-12-12T04:42:32-05:00
testsuite: Only run T14497_compact in normal way
This test targets the compacting GC so it makes little sense to run it
across all ways. Moreover, it outright conflicts with the `nonmoving`
way.
- - - - -
34d3e8e6 by Ben Gamari at 2024-12-12T04:43:08-05:00
rts/CheckUnload: Don't prepare to unload if we can't unload
Previously `prepareUnloadCheck` would move the `objects` list to
`old_objects` even when profiling (where we cannot unload). This caused
us to vacate the `objects` list during major GCs, losing track of loaded
objects. Fix this by ensuring that `prepareUnloadCheck` and
`checkUnload` both use the same short-cutting logic.
- - - - -
9c53489d by Andrei Borzenkov at 2024-12-12T15:06:42-05:00
Update GHCi :info type declaration printing (#24459)
- Do not print result's kind in type families
because we have full kind in SAKS and we display
invisible arity using @-binders
- Do not suppress significant invisible binders
An invisible binder is considered significant when it meets at least
one of the following two criteria:
- It visibly occurs in the declaration's body
- It is followed by a significant binder,
so it affects positioning
For non-generative type declarations (type synonyms and type families)
there is one additional criterion:
- It is not followed by a visible binder, so it
affects the arity of a type synonym
See Note [Print invisible binders in interface declarations]
for more information about what is "visibly occurs"
- - - - -
13fe48d4 by Matthew Pickering at 2024-12-12T15:07:19-05:00
typechecker: Perform type family consistency checks in topological order
Consider a module M importing modules A, B and C.
We can waste a lot of work depending on the order that the modules are
checked for family consistency.
Consider that C imports A and B. When compiling C we must have already
checked A and B for consistency, therefore if C is processed first then
A and B will not need to be checked for consistency again.
If A and B are compared first, then the consistency checks will be
performed against (wasted as we already performed them for C).
At the moment the order which modules are checked is non-deterministic.
Clearly we should engineer that C is checked before B and A, but by what
scheme?
A simple one is to observe that if a module M is in the transitive
closure of X then the size of the consistent family set of M is less
than or equal to size of the consistent family set of X.
Therefore by sorting the imports by the size of the consistent family
set and processing the largest first, you make sure to process modules
in topological order.
In practice we have observed that this strategy has reduced the amount
of consistency checks performed.
One solution to #25554
- - - - -
62a2b25f by Sylvain Henry at 2024-12-14T04:31:09-05:00
TNTC: set CmmProc entry_label properly (#25565)
Before this patch we were renaming the entry label of a CmmProc late in
the CmmToAsm pass. It led to inconsistencies and to some labels being
used in info tables but not being emitted (#25565).
Now we set the CmmProc entry label earlier in the StgToCmm monad and we
don't renamed it afterwards.
- - - - -
b339e7c3 by Simon Hengel at 2024-12-14T04:31:47-05:00
Make filter functionality for system tools line-based
This is more efficient as:
- All existing filter functions were line-based anyway. They broke up
the input into lines and then joined it back together.
- We already break up the output from system tools into lines when
processing it.
Splitting up the output of system tools once and then filtering and
processing it reduces both code and runtime complexity.
- - - - -
39669077 by Simon Hengel at 2024-12-14T04:31:47-05:00
Refactoring: Don't use a `Chan` when parsing SysTools output
- - - - -
64756530 by Simon Peyton Jones at 2024-12-14T22:28:04-05:00
Tidy up the handling of `assert`
Fixes #25493
- - - - -
8658fbc1 by Rodrigo Mesquita at 2024-12-14T22:28:41-05:00
base: displayException for SomeAsyncException
Provide a better implementation of `SomeException` for
`SomeAsyncException`.
The previous, implicit, implementation, would not use the
`displayException` of the exception wrapped by `SomeAsyncException`.
Implements CLC-Proposal#309
Closes #25513
- - - - -
2d3a0a70 by ARATA Mizuki at 2024-12-15T18:35:30-05:00
LLVM: When emitting a vector literal with ppTypeLit, include the type information
Fixes #25561
- - - - -
bfacc086 by Simon Peyton Jones at 2024-12-15T18:36:05-05:00
Fix signature lookup in instance declarations
This fixes a bug introduced by the fix to #16610
- - - - -
80f0e02d by Simon Peyton Jones at 2024-12-16T17:13:52+00:00
Improve GHC build times
Two small changes
* In GHC.Data.Unboxed, never omit interface pragmas. In "fast builds"
one might omit them generally, but doing so gives very bad
performance for code that imports this module.
* In GHC.Hs.Dump don't do type-class specialisation. For some reason
it goes mad and generates vast amounts of useless code. See #25463.
- - - - -
175a1355 by Simon Peyton Jones at 2024-12-16T17:13:52+00:00
Refactor Lint
Refactor Lint for two reasons:
* To improve performance
* To prepare for type-lets
The big changes are all in GHC.Core.Lint:
* Change the main APIs:
* `lintType` returns nothing rather than returning a `LintedType`;
* `lintCoercion` return nothing rather than returning a `LintedCoercion`
Reason: these functions did a lot of allocation to return a substituted
type/coercion that was often discarded, or used only to extract its kind.
Instead we now return nothing, and, when needed, extract the kind and
substitute.
* Applications are treated as a whole, by `lintApp`. By treating
multiple arguments all at once we avoid performing multiple
substitutions, each substituting a single type variable. This can
make an absolutely huge difference.
Overall this led to a pretty massive rewrite of Lint, with many smaller
changes.
Smaller chnages elsewhere
* Rename `GHC.Core.TyCo.Subst.getSubstInScope` to `substInScopeSet` for consistency
* Define and use `GHC.Core.Type.liftedTypeOrConstraintKind`
Performance. This MR someimtes gives gives a very large improvement in
compile time, when Lint is on. here is a selection of changes over 5%
in perf/compiler (with -dcore-lint)
T25196 -97.0%
T14766 -89.7%
T14683 -74.4%
T5631 -60.9%
T20261 -56.7%
T18923 -17.6%
T13035 -15.8%
T6048 -15.8%
CoOpt_Read -14.4%
T9630 -10.9%
T5642 -7.3%
Eliminating the egregious offenders is a big win.
However, in some cases the compiler allocation /increases/. Here ae the
changes over 1%:
T9961 1.5%
T8095 2.8%
T14052 3.9%
T12545 4.5%
T14052Type 5.5%
T5030 8.0%
T5321Fun 8.3%
T3064 12.7%
CoOpt_Singletons 15.6%
T9198 16.0%
LargeRecord 18.1%
I looked at the two biggest increases in compile-time bytes allocated. Interestingly,
they both show substantial *decreases* in actual compile time, due to much smaller GC times.
I'm honestly not sure either why the allocation increases, or why the GC time decreases;
but I'm going to take the win!
T9198
Baseline With patch
No Lint
Alloc 44.6M 44.6M
Mut time 0.23s 0.22s
GC time 0.21s 0.21s
With Lint
Alloc 309M 360M
Mut time 1.51s 0.85s
GC time 2.97s 0.25s
-------------------
LargeRecord
Baseline With patch
No Lint
Alloc 1.37G 1.37G
Mut time 2.33s 2.33s
GC time 2.40s 2.42s
With Lint
Alloc 3.4G 4.0G
Mut time 6.02s 5.68s
GC time 3.67s 3.03s
IMPORTANT NOTE: These changes don't show up in CI because in CI the
tests in perf/compiler are all run with -dcore-lint switched off. I
gathered this data with some manual runs.
- - - - -
8ef2dad6 by Simon Peyton Jones at 2024-12-17T02:48:09-05:00
Add Note [Typechecking overloaded literals]
See #25494.
- - - - -
7dde226d by Matthew Pickering at 2024-12-18T15:01:31+00:00
WIP external grpah
getLinkDeps and ExternalNode
missing file
fix plugin loading
(now rebased)
- - - - -
28 changed files:
- .gitattributes
- .gitlab-ci.yml
- .gitlab/ci.sh
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/hello.hs
- .gitlab/jobs.yaml
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/Instr.hs
- compiler/GHC/Cmm/Opt.hs
- compiler/GHC/Cmm/ThreadSanitizer.hs
- compiler/GHC/CmmToAsm/Format.hs
- compiler/GHC/CmmToAsm/X86/Instr.hs
- compiler/GHC/CmmToAsm/X86/Ppr.hs
- compiler/GHC/CmmToLlvm.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/Subst.hs
- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Core/TyCo/Subst.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Core/Type.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/014117486cf8503a8b48fa37b25ddbf9c906a19e...7dde226d1e5a411c224f18dfae9d68869e4f9b46
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/014117486cf8503a8b48fa37b25ddbf9c906a19e...7dde226d1e5a411c224f18dfae9d68869e4f9b46
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20241218/f6218fc7/attachment-0001.html>
More information about the ghc-commits
mailing list