[Git][ghc/ghc][wip/romes/12935] 7 commits: UniqDSM det uniques + use in Cmm.Info

Rodrigo Mesquita (@alt-romes) gitlab at gitlab.haskell.org
Wed Sep 4 15:25:29 UTC 2024



Rodrigo Mesquita pushed to branch wip/romes/12935 at Glasgow Haskell Compiler / GHC


Commits:
7adb8189 by Rodrigo Mesquita at 2024-09-04T16:24:33+01:00
UniqDSM det uniques + use in Cmm.Info

Now for SRTs

SRT generation using deterministic uniq supply

Back LabelMap with deterministic UDFM

TSAN uniq rename hard

Revert "TSAN uniq rename hard"

This reverts commit 7ca5ab3036c15f38c6d4cbcb616d415958c6bcda.

improvements to uniqdsm

UniqDSM ProcPoint

CmmLayoutStack UniqDet

90% of cpsTop UniqDSM

Major progress in using UniqDSM in CmmToAsm and Ncg backends

Fix imports

Un-back label map with udfm

Revert "Un-back label map with udfm"

This reverts commit f5d2e4257214a3f7b7d845651e6662c5babfd6a3.

Make UDSM oneshot deriving via state

Fix -fllvm hang

- - - - -
02596b5d by Rodrigo Mesquita at 2024-09-04T16:25:04+01:00
Remame uniques straight off stgtocmm, before cmm pipeline

WIP

Progress

Work around LLVM assembler bug!

In a really stupid way)

Fix ordering of CLabels for IdLabels

Local test script tweaks

Do uniq renaming before SRTs

Revert "Do uniq renaming before SRTs"

This reverts commit db38b635d626106e40b3ab18091e0a24046c30c5.

Do on CmmGroup

Do uniq-renaming pass right at `codeGen`

not better

Revert "Do uniq-renaming pass right at `codeGen`"

This reverts commit 74e9068aaaf736bf815a36bf74a0dde19a074a7a.

Reapply "Do uniq renaming before SRTs"

This reverts commit 682f89732fc2a95fa011f530c0c6922bf576d229.

Try ALSO after SRT

Revert "Try ALSO after SRT"

This reverts commit c5dd7b426cde768126402aac3f39617ccb99f5c5.

Renaming before and after SRTs bc of procs and srts and ...

Wait no that was way too slow...

cleaner approach, same idea

Put deterministic renaming behind a flag

Fix Ord CLabel only compare externalNames

UniqRnem fixes external names

DCmmDecl UniqRenam

Refactor ProfilingInfo to preserve Unique information before rendering it

Rename Profiling Info now that names are preserved

Revert "Rename Profiling Info now that names are preserved"

This reverts commit 2dd3da96b7e771ae272791a00d7fb55313401c9e.

Revert "Refactor ProfilingInfo to preserve Unique information before rendering it"

This reverts commit 8aba0515bb744ca5add6a4c3c9c7760e226e0b31.

Performance tweaks

Get rid of UniqRenamable class, do it directly

Make sure graph is renamed first, info table last

Turns out it does matter!

Whitespace

- - - - -
96f65fa8 by Rodrigo Mesquita at 2024-09-04T16:25:05+01:00
cmm: Back LabelMap with UDFM

Use a deterministic unique map to back the implementation of `LabelMap`.

This is necessary towards the goal of object code determinism in #12935.

Our intended solution requires renaming uniques in a deterministic
order (which will be the order in which they were created), but storing
them label map makes us lose this order. Backing it with a UDFM fixes
this issue.

Introduce back LabelMap non deterministic

Use NonDeterministic Label map in multiple passes

(TODO: More could be available. Look through Det LabelMap uses again)

Use NonDet for CFG

More NonDet

More explicit

Introduce DCmmDecl, start

Removing more maps

- - - - -
59813fd7 by Rodrigo Mesquita at 2024-09-04T16:25:05+01:00
Don't print unique in pprFullName

This unique was leaking as part of the profiling description in info tables when profiling was enabled

- - - - -
a7555a1f by Rodrigo Mesquita at 2024-09-04T16:25:05+01:00
distinct-constructor-tables determinism

- - - - -
75cd963d by Rodrigo Mesquita at 2024-09-04T16:25:06+01:00
Rename deterministically CmmGroups in generateCgIPEStub

- - - - -
9e260112 by Rodrigo Mesquita at 2024-09-04T16:25:06+01:00
Writing Notes and Cleaning up v1

Fix linters

MP entries

- - - - -


30 changed files:

- 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/Monad.hs
- compiler/GHC/CmmToAsm/PPC/Instr.hs
- compiler/GHC/CmmToAsm/Reg/Graph.hs
- compiler/GHC/CmmToAsm/Reg/Graph/Spill.hs
- compiler/GHC/CmmToAsm/Reg/Linear.hs
- compiler/GHC/CmmToAsm/Reg/Linear/Base.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8c244e4d5376adb99df1eb2008b01a7078193e29...9e26011233806205d37aba2605f4ed3341f73e36

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8c244e4d5376adb99df1eb2008b01a7078193e29...9e26011233806205d37aba2605f4ed3341f73e36
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/20240904/f421e9b1/attachment.html>


More information about the ghc-commits mailing list