[Git][ghc/ghc][master] StgToCmm: Use CmmRegOff smart constructor

Marge Bot gitlab at gitlab.haskell.org
Wed Jul 15 08:05:40 UTC 2020



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
51dbfa52 by Ben Gamari at 2020-07-15T04:05:34-04:00
StgToCmm: Use CmmRegOff smart constructor

Previously we would generate expressions of the form
`CmmRegOff BaseReg 0`. This should do no harm (and really should be
handled by the NCG anyways) but it's better to just generate a plain
`CmmReg`.

- - - - -


1 changed file:

- compiler/GHC/StgToCmm/CgUtils.hs


Changes:

=====================================
compiler/GHC/StgToCmm/CgUtils.hs
=====================================
@@ -121,7 +121,7 @@ regTableOffset dflags n =
 get_Regtable_addr_from_offset :: DynFlags -> Int -> CmmExpr
 get_Regtable_addr_from_offset dflags offset =
     if haveRegBase (targetPlatform dflags)
-    then CmmRegOff baseReg offset
+    then cmmRegOff baseReg offset
     else regTableOffset dflags offset
 
 -- | Fixup global registers so that they assign to locations within the



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/51dbfa52df483822b99bb191d2ffc0943954e1d3
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/20200715/3cc3a80a/attachment.html>


More information about the ghc-commits mailing list