[Git][ghc/ghc][ghc-9.4] 6 commits: testsuite: Add test for #22282
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Thu Oct 20 23:12:28 UTC 2022
Ben Gamari pushed to branch ghc-9.4 at Glasgow Haskell Compiler / GHC
Commits:
b4500617 by Ben Gamari at 2022-10-19T09:33:39-04:00
testsuite: Add test for #22282
This will complement mpickering's more general port of foundation's
numerical testsuite, providing a test for the specific case found
in #22282.
(cherry picked from commit 1004bff7fd017ba698795b82f76b63e742420d34)
- - - - -
6ef9d7ef by Ben Gamari at 2022-10-19T09:33:44-04:00
ncg/aarch64: Fix sub-word sign extension yet again
In adc7f108141a973b6dcb02a7836eed65d61230e8 we fixed a number of issues
to do with sign extension in the AArch64 NCG found by ghc/test-primops>.
However, this patch made a critical error, assuming that getSomeReg
would allocate a fresh register for the result of its evaluation.
However, this is not the case as `getSomeReg (CmmReg r) == r`.
Consequently, any mutation of the register returned by `getSomeReg` may
have unwanted side-effects on other expressions also mentioning `r`. In
the fix listed above, this manifested as the registers containing the
operands of binary arithmetic operations being incorrectly
sign-extended. This resulted in #22282.
Sadly, the rather simple structure of the tests generated
by `test-primops` meant that this particular case was not exercised.
Even more surprisingly, none of our testsuite caught this case.
Here we fix this by ensuring that intermediate sign extension is
performed in a fresh register.
Fixes #22282.
(cherry picked from commit 0ae6d8b5c798dfcdb0444ad69fd62124beb51b76)
- - - - -
aada6b10 by Ben Gamari at 2022-10-19T15:26:27-04:00
rts: Add missing declaration of stg_noDuplicate
(cherry picked from commit 8c430540be5044f416bcc5aa52f79e46dfaabbeb)
- - - - -
5ec22f01 by Ben Gamari at 2022-10-19T15:26:33-04:00
base: Move CString, CStringLen to GHC.Foreign
(cherry picked from commit a1e01a32c6dfe6cb62963ea00e51953e44b8e66a)
- - - - -
8f0c0c53 by Ben Gamari at 2022-10-19T15:27:17-04:00
rts: Refactor IPE tracing support
(cherry picked from commit fb6c2dd21a1f31781b7f94a1a8c8b75114b71d12)
- - - - -
d2ea5bfb by Ben Gamari at 2022-10-19T21:41:56-04:00
Refactor IPE initialization
Here we refactor the representation of info table provenance information
in object code to significantly reduce its size and link-time impact.
Specifically, we deduplicate strings and represent them as 32-bit
offsets into a common string table.
In addition, we rework the registration logic to eliminate allocation
from the registration path, which is run from a static initializer where
things like allocation are technically undefined behavior (although it
did previously seem to work). For similar reasons we eliminate lock
usage from registration path, instead relying on atomic CAS.
Closes #22077.
(cherry picked from commit 4112e3ca9361b4a6569a8d3c44d9c93781f57c20)
- - - - -
30 changed files:
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/Driver/CodeOutput.hs
- compiler/GHC/Driver/Main.hs
- + compiler/GHC/StgToCmm/InfoTableProv.hs
- compiler/GHC/StgToCmm/Prof.hs
- compiler/ghc.cabal.in
- libraries/base/Foreign/C/String.hs
- libraries/base/GHC/Foreign.hs
- rts/IPE.c
- rts/IPE.h
- rts/RtsStartup.c
- rts/Trace.c
- rts/Trace.h
- rts/eventlog/EventLog.c
- rts/eventlog/EventLog.h
- rts/include/Cmm.h
- rts/include/Rts.h
- rts/include/rts/IPE.h
- rts/include/stg/MiscClosures.h
- rts/include/stg/SMP.h
- rts/sm/NonMoving.h
- + testsuite/tests/numeric/should_run/T22282.hs
- + testsuite/tests/numeric/should_run/T22282.stdout
- + testsuite/tests/numeric/should_run/T22282A.hs
- testsuite/tests/numeric/should_run/all.T
- testsuite/tests/rts/all.T
- + testsuite/tests/rts/ipe/all.T
- + testsuite/tests/rts/ipe/ipeEventLog.c
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9a12e4961256f4c25201b8b8736ab4ef4ba0083e...d2ea5bfb7a9c5df9601af71ccea4983a5fc9528b
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9a12e4961256f4c25201b8b8736ab4ef4ba0083e...d2ea5bfb7a9c5df9601af71ccea4983a5fc9528b
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/20221020/b9bb6a71/attachment.html>
More information about the ghc-commits
mailing list