[Git][ghc/ghc][wip/romes/12935] Apply 3 suggestion(s) to 2 file(s)

Rodrigo Mesquita (@alt-romes) gitlab at gitlab.haskell.org
Wed Sep 18 08:20:22 UTC 2024



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


Commits:
e88731dc by Rodrigo Mesquita at 2024-09-18T08:20:17+00:00
Apply 3 suggestion(s) to 2 file(s)

Co-authored-by: Ben Gamari <ben at well-typed.com>
- - - - -


2 changed files:

- compiler/GHC/Cmm.hs
- compiler/GHC/Cmm/UniqueRenamer.hs


Changes:

=====================================
compiler/GHC/Cmm.hs
=====================================
@@ -378,10 +378,10 @@ CmmGroup uses LabelMap in two places:
 * In CmmProc for info tables
 * In CmmGraph for the blocks of the graph
 
-LabelMap is not a deterministic strucutre, so traversing a LabelMap can process
+LabelMap is not a deterministic structure, so traversing a LabelMap can process
 elements in different order (depending on the given uniques).
 
-Therefore before we do the renaming we need to use a deterministic strucutre, one
+Therefore before we do the renaming we need to use a deterministic structure, one
 which we can traverse in a guaranteed order. A list does the job perfectly.
 
 Once the renaming happens it is converted back into a LabelMap, which is now deterministic


=====================================
compiler/GHC/Cmm/UniqueRenamer.hs
=====================================
@@ -124,8 +124,8 @@ detRenameCmmGroup dufm group = swap (runState (mapM detRenameCmmDecl group) dufm
         regs' <- mapM detRenameGlobalReg regs
         lbl' <- detRenameCLabel lbl
         -- Rename the info table last! This is necessary for determinism, the
-        -- info table contents not always appear in the same order accross
-        -- runs. As long as all uniques have already been renamed in a deterministic
+        -- info table contents not always appear in the same order across runs due to the existence of a LabelMap in `CmmTopInfo`.
+        -- As long as all uniques have already been renamed in a deterministic
         -- order, renaming the info table uniques will only lookup the
         -- corresponding deterministic ones rather than creating any.
         h' <- detRenameCmmTop h



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e88731dc98c5f9271f92956e1eb0d60bb86760a7

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e88731dc98c5f9271f92956e1eb0d60bb86760a7
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/20240918/db9f8f37/attachment-0001.html>


More information about the ghc-commits mailing list