diff options
author | Ben Gamari <ben@smart-cactus.org> | 2017-11-13 12:34:54 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-11-28 15:49:46 -0500 |
commit | 048a91380cbbc18d1704bb7c328247a1660b5596 (patch) | |
tree | 4030bc33eff0bc45e14c59696146af7bda9c9e6a /compiler/nativeGen/NCGMonad.hs | |
parent | 17e71c14fee6bc068cf081abfc1abd0470e84c66 (diff) | |
download | haskell-048a91380cbbc18d1704bb7c328247a1660b5596.tar.gz |
cmm: Use LocalBlockLabel instead of AsmTempLabel to represent blocks
blockLbl was originally changed in 8b007abbeb3045900a11529d907a835080129176 to
use mkTempAsmLabel to fix an inconsistency resulting in #14221. However, this
breaks the C code generator, which doesn't support AsmTempLabels (#14454).
Instead let's try going the other direction: use a new CLabel variety,
LocalBlockLabel. Then we can teach the C code generator to deal with
these as well.
Diffstat (limited to 'compiler/nativeGen/NCGMonad.hs')
-rw-r--r-- | compiler/nativeGen/NCGMonad.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/nativeGen/NCGMonad.hs b/compiler/nativeGen/NCGMonad.hs index f4d02dae3c..b9532e17b5 100644 --- a/compiler/nativeGen/NCGMonad.hs +++ b/compiler/nativeGen/NCGMonad.hs @@ -46,7 +46,7 @@ import TargetReg import BlockId import Hoopl.Collections import Hoopl.Label -import CLabel ( CLabel, mkAsmTempLabel ) +import CLabel ( CLabel ) import Debug import FastString ( FastString ) import UniqFM @@ -160,8 +160,7 @@ getBlockIdNat getNewLabelNat :: NatM CLabel getNewLabelNat - = do u <- getUniqueNat - return (mkAsmTempLabel u) + = blockLbl <$> getBlockIdNat getNewRegNat :: Format -> NatM Reg |