[Git][ghc/ghc][wip/romes/12935] 26 commits: Bump submodule deepseq to 1.5.1.0
Rodrigo Mesquita (@alt-romes)
gitlab at gitlab.haskell.org
Tue Sep 17 12:30:36 UTC 2024
Rodrigo Mesquita pushed to branch wip/romes/12935 at Glasgow Haskell Compiler / GHC
Commits:
8e462f4d by Andrew Lelechenko at 2024-09-11T22:20:37-04:00
Bump submodule deepseq to 1.5.1.0
- - - - -
aa4500ae by Sebastian Graf at 2024-09-11T22:21:13-04:00
User's guide: Fix the "no-backtracking" example of -XOrPatterns (#25250)
Fixes #25250.
- - - - -
1c479c01 by Sven Tennie at 2024-09-12T10:39:38+00:00
RISCV64: Add Native Code Generator (NCG)
This architecture wasn't supported before.
Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com>
- - - - -
51b678e1 by Sven Tennie at 2024-09-12T10:39:38+00:00
Adjust test timings for slower computers
Increase the delays a bit to be able to run these tests on slower
computers.
The reference was a Lichee Pi 4a RISCV64 machine.
- - - - -
a0e41741 by Sven Tennie at 2024-09-12T10:39:38+00:00
RISCV64: Add RTS linker
This architecture wasn't supported before.
Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com>
- - - - -
d365b1d4 by Sven Tennie at 2024-09-12T10:39:38+00:00
RISCV64: Ignore divbyzero test
The architecture's behaviour differs from the test's expectations. See
comment in code why this is okay.
- - - - -
abf3d699 by Sven Tennie at 2024-09-12T10:39:38+00:00
RISCV64: Enable MulMayOflo_full test
It works and thus can be tested.
- - - - -
38c7ea8c by Sven Tennie at 2024-09-12T10:39:38+00:00
RISCV64: LibffiAdjustor: Ensure code caches are flushed
RISCV64 needs a specific code flushing sequence (involving fence.i) when
new code is created/loaded.
- - - - -
7edc6965 by Sven Tennie at 2024-09-12T10:39:38+00:00
RISCV64: Add additional linker symbols for builtins
We're relying on some GCC/Clang builtins. These need to be visible to
the linker (and not be stripped away.)
- - - - -
92ad3d42 by Sven Tennie at 2024-09-12T10:39:38+00:00
RISCV64: Add GHCi support
As we got a RTS linker for this architecture now, we can enable GHCi for
it.
- - - - -
a145f701 by Sven Tennie at 2024-09-12T10:39:38+00:00
RISCV64: Set codeowners of the NCG
- - - - -
8e6d58cf by Sven Tennie at 2024-09-12T10:39:38+00:00
Add test for C calling convention
Ensure that parameters and return values are correctly processed. A
dedicated test (like this) helps to get the subtleties of calling
conventions easily right.
The test is failing for WASM32 and marked as fragile to not forget to
investigate this (#25249).
- - - - -
fff55592 by Torsten Schmits at 2024-09-12T21:50:34-04:00
finder: Add `IsBootInterface` to finder cache keys
- - - - -
cdf530df by Alan Zimmerman at 2024-09-12T21:51:10-04:00
EPA: Sync ghc-exactprint to GHC
- - - - -
1374349b by Sebastian Graf at 2024-09-13T07:52:11-04:00
DmdAnal: Fast path for `multDmdType` (#25196)
This is in order to counter a regression exposed by SpecConstr.
Fixes #25196.
- - - - -
80769bc9 by Andrew Lelechenko at 2024-09-13T07:52:47-04:00
Bump submodule array to 0.5.8.0
- - - - -
49ac3fb8 by Sylvain Henry at 2024-09-16T10:33:01-04:00
Linker: add support for extra built-in symbols (#25155)
See added Note [Extra RTS symbols] and new user guide entry.
Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com>
Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com>
- - - - -
3939a8bf by Samuel Thibault at 2024-09-16T10:33:44-04:00
GNU/Hurd: Add getExecutablePath support
GNU/Hurd exposes it as /proc/self/exe just like on Linux.
- - - - -
505764ba by Matthew Pickering at 2024-09-17T13:19:52+01:00
ci: Run abi-test on test-abi label
- - - - -
57860775 by Rodrigo Mesquita at 2024-09-17T13:22:30+01:00
testsuite: Add a test for object determinism
Extends the abi_test with an object determinism check
Also includes a standalone test to be run by developers manually when
debugging issues with determinism.
- - - - -
0a42f397 by Rodrigo Mesquita at 2024-09-17T13:24:10+01:00
determinism: Sampling uniques in the CG
To achieve object determinism, the passes processing Cmm and the rest of
the code generation pipeline musn't create new uniques which are
non-deterministic.
This commit changes occurrences of non-deterministic unique sampling
within these code generation passes by a deterministic unique sampling
strategy by propagating and threading through a deterministic
incrementing counter in them. The threading is done implicitly with
`UniqDSM` and `UniqDSMT`.
Secondly, the `DUniqSupply` used to run a `UniqDSM` must be threaded
through all passes to guarantee uniques in different passes are unique
amongst them altogether. Specifically, the same `DUniqSupply` must be
threaded through the CG Streaming pipeline, starting with Driver.Main
calling `StgToCmm.codeGen`, `cmmPipeline`, `cmmToRawCmm`, and
`codeOutput` in sequence.
To thread resources through the `Stream` abstraction, we use the `UniqDSMT`
transformer on top of `IO` as the Monad underlying the Stream. `UniqDSMT` will
thread the `DUniqSupply` through every pass applied to the `Stream`, for every
element. We use @type CgStream = Stream (UniqDSMT IO)@ for the Stream used in
code generation which that carries through the deterministic unique supply.
See Note [Deterministic Uniques in the CG]
- - - - -
4325ffc1 by Rodrigo Mesquita at 2024-09-17T13:24:10+01:00
determinism: Cmm unique renaming pass
To achieve object determinism, we need to prevent the non-deterministic
uniques from leaking into the object code. We can do this by
deterministically renaming the non-external uniques in the Cmm groups
that are yielded right after StgToCmm.
The key to deterministic renaming is observing that the order of
declarations, instructions, and data in the Cmm groups are already
deterministic (modulo other determinism bugs), regardless of the
uniques. We traverse the Cmm AST in this deterministic order and
rename the uniques, incrementally, in the order they are found, thus
making them deterministic. This renaming is guarded by
-fobject-determinism which is disabled by default for now.
This is one of the key passes for object determinism. Read about the
overview of object determinism and a more detailed explanation of this
pass in:
* Note [Object determinism]
* Note [Renaming uniques deterministically]
Significantly closes the gap to #12935
- - - - -
6457d108 by Rodrigo Mesquita at 2024-09-17T13:24:10+01:00
determinism: DCmmGroup vs CmmGroup
Part of our strategy in producing deterministic objects, namely,
renaming all Cmm uniques in order, depend on the object code produced
having a deterministic order (say, A_closure always comes before
B_closure).
However, the use of LabelMaps in the Cmm representation invalidated this
requirement because the LabelMaps elements would already be in a
non-deterministic order (due to the original uniques), and the renaming
in sequence wouldn't work because of that non-deterministic order.
Therefore, we now start off with lists in CmmGroup (which preserve the
original order), and convert them into LabelMaps (for performance in the
code generator) after the uniques of the list elements have been
renamed.
See Note [DCmmGroup vs CmmGroup or: Deterministic Info Tables] and #12935.
- - - - -
9ae19dd2 by Rodrigo Mesquita at 2024-09-17T13:24:10+01:00
determinism: Don't print unique in pprFullName
This unique was leaking as part of the profiling description in info
tables when profiling was enabled, despite not providing information
relevant to the profile.
- - - - -
33412bb6 by Rodrigo Mesquita at 2024-09-17T13:24:10+01:00
determinism: UDFM for distinct-constructor-tables
In order to produce deterministic objects when compiling with
-distinct-constructor-tables, we also have to update the data
constructor map to be backed by a deterministic unique map (UDFM) rather
than a non-deterministic one (UniqMap).
- - - - -
57c3dd9b by Rodrigo Mesquita at 2024-09-17T13:24:11+01:00
determinism: InfoTableMap uniques in generateCgIPEStub
Fixes object determinism when using -finfo-table-map
Make sure to also deterministically rename the IPE map (as per Note
[Renaming uniques deterministically]), and to use a deterministic unique
supply when creating new labels for the IPE information to guarantee
deterministic objects when IPE information is requested.
Note that the Cmm group produced in generateCgIPEStub must /not/ be
renamed because renaming uniques is not idempotent, and the references
to the previously renamed code in the IPE Cmm group would be renamed
twice and become invalid references to non-existent symbols.
We do need to det-rename the InfoTableMap that is created in the
conversion from Core to Stg. This is not a problem since that map won't
refer any already renamed names (since it was created before the
renaming).
- - - - -
30 changed files:
- .gitlab-ci.yml
- .gitlab/ci.sh
- CODEOWNERS
- compiler/CodeGen.Platform.h
- compiler/GHC/Cmm.hs
- compiler/GHC/Cmm/BlockId.hs
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Cmm/Dataflow.hs
- compiler/GHC/Cmm/Dataflow/Graph.hs
- compiler/GHC/Cmm/Graph.hs
- compiler/GHC/Cmm/Info.hs
- compiler/GHC/Cmm/Info/Build.hs
- compiler/GHC/Cmm/LayoutStack.hs
- compiler/GHC/Cmm/Opt.hs
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/Cmm/Pipeline.hs
- compiler/GHC/Cmm/ProcPoint.hs
- compiler/GHC/Cmm/Reducibility.hs
- compiler/GHC/Cmm/Sink.hs
- compiler/GHC/Cmm/Switch.hs
- compiler/GHC/Cmm/Switch/Implement.hs
- compiler/GHC/Cmm/ThreadSanitizer.hs
- + compiler/GHC/Cmm/UniqueRenamer.hs
- compiler/GHC/CmmToAsm.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/BlockLayout.hs
- compiler/GHC/CmmToAsm/Dwarf.hs
- compiler/GHC/CmmToAsm/Dwarf/Constants.hs
- compiler/GHC/CmmToAsm/Monad.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/53d54e2b2fe19d93b3ac92690cf6f6afb5054996...57c3dd9b9aefa01a096c41849ff95d7babf950e2
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/53d54e2b2fe19d93b3ac92690cf6f6afb5054996...57c3dd9b9aefa01a096c41849ff95d7babf950e2
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/20240917/db70fd21/attachment-0001.html>
More information about the ghc-commits
mailing list