[Git][ghc/ghc][wip/arity-type-9.4] 12 commits: testsuite: Add test for #22282
Zubin (@wz1000)
gitlab at gitlab.haskell.org
Fri Oct 28 11:37:30 UTC 2022
Zubin pushed to branch wip/arity-type-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)
- - - - -
ccdc1053 by Andreas Klebinger at 2022-10-23T16:54:38-04:00
SpecConstr: Properly create rules for call patterns representing partial applications
The main fix is that in addVoidWorkerArg we now add the argument to the front.
This fixes #21448.
-------------------------
Metric Decrease:
T16875
-------------------------
(cherry picked from commit 61901b32b7e680234c0f1173d96d124ecd74bbc5)
- - - - -
bbfd46cb by Ben Gamari at 2022-10-23T21:27:05-04:00
Bump VERSION=9.4.3
- - - - -
bf0cbaa3 by Ben Gamari at 2022-10-23T23:00:13-04:00
Add release notes for 9.4.3
- - - - -
9c08d9a1 by Ben Gamari at 2022-10-24T14:34:24-04:00
Accept perf shifts
Metric Decrease:
T18923
Metric Increase:
ManyAlternatives
ManyConstructors
MultiComponentModules
MultiComponentModulesRecomp
T18282
T5642
T10421
T12150
T12234
T12425
T12707
T13035
T13056
T13379
T13719
T14697
T15703
T16577
T16875
T18140
T18698a
T18698b
T1969
T20049
T3064
T3294
T4801
T4978
T5321FD
T5321Fun
T7257
T783
T9020
T9198
T9233
T9961
WWRec
- - - - -
c0de9298 by Simon Peyton Jones at 2022-10-28T13:56:21+05:30
Fix arityType: -fpedantic-bottoms, join points, etc
This MR fixes #21694 and #21755
* For #21694 the underlying problem was that we were calling arityType
on an expression that had free join points. This is a Bad Bad Idea.
See Note [No free join points in arityType].
* I also made andArityType work correctly with -fpedantic-bottoms;
see Note [Combining case branches: andWithTail].
* I realised that, now we have ae_sigs giving the ArityType for
let-bound Ids, we don't need the (pre-dating) special code in
arityType for join points. But instead we need to extend the env for
Rec bindings, which weren't doing before. More uniform now. See
Note [arityType for let-bindings].
This meant we could get rid of ae_joins, and in fact get rid of
EtaExpandArity altogether. Simpler.
And finally, it was the strange treatment of join-point Ids (involving
a fake ABot type) that led to a serious bug: #21755. Fixed by this
refactoring
* Rewrote Note [Combining case branches: optimistic one-shot-ness]
Compile time improves slightly on average:
Metrics: compile_time/bytes allocated
---------------------------------------------------------------------------------------
CoOpt_Read(normal) ghc/alloc 803,788,056 747,832,680 -7.1% GOOD
T18223(normal) ghc/alloc 928,207,320 959,424,016 +3.1% BAD
geo. mean -0.3%
minimum -7.1%
maximum +3.1%
On Windows it's a bit better: geo mean is -0.6%, and three more
benchmarks trip their compile-time bytes-allocated threshold (they
were all close on the other build):
T18698b(normal) ghc/alloc 235,619,776 233,219,008 -1.0% GOOD
T6048(optasm) ghc/alloc 112,208,192 109,704,936 -2.2% GOOD
T18140(normal) ghc/alloc 85,064,192 83,168,360 -2.2% GOOD
I had a quick look at T18223 but it is knee deep in coercions and
the size of everything looks similar before and after. I decided
to accept that 3.4% increase in exchange for goodness elsewhere.
Metric Decrease:
CoOpt_Read
T18140
T18698b
T6048
Metric Increase:
T18223
(cherry picked from commit 5e282da37e19a1ab24ae167daf32276a64ed2842)
- - - - -
53a31426 by Zubin Duggal at 2022-10-28T17:06:49+05:30
traces
- - - - -
30 changed files:
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/Simplify.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/SpecConstr.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
- configure.ac
- + docs/users_guide/9.4.3-notes.rst
- docs/users_guide/release-notes.rst
- 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
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c96bcafb041d3d36d93bdb94a097d6307a433027...53a314266838e7a2cb970d5d477da69076ec0e56
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c96bcafb041d3d36d93bdb94a097d6307a433027...53a314266838e7a2cb970d5d477da69076ec0e56
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/20221028/1d7f4097/attachment-0001.html>
More information about the ghc-commits
mailing list