summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/PPC/Ppr.hs
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2017-09-19 10:58:36 -0400
committerBen Gamari <ben@smart-cactus.org>2017-09-19 13:37:46 -0400
commit8b007abbeb3045900a11529d907a835080129176 (patch)
tree811084db4cf156ff51cf8661631676d6fb0ff326 /compiler/nativeGen/PPC/Ppr.hs
parent6252292d4f4061f6e55c7f92a399160147c4ca74 (diff)
downloadhaskell-8b007abbeb3045900a11529d907a835080129176.tar.gz
nativeGen: Consistently use blockLbl to generate CLabels from BlockIds
This fixes #14221, where the NCG and the DWARF code were apparently giving two different names to the same block. Test Plan: Validate with DWARF support enabled. Reviewers: simonmar, austin Subscribers: rwbarton, thomie GHC Trac Issues: #14221 Differential Revision: https://phabricator.haskell.org/D3977
Diffstat (limited to 'compiler/nativeGen/PPC/Ppr.hs')
-rw-r--r--compiler/nativeGen/PPC/Ppr.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs
index 63d01c3913..fe8d9e6484 100644
--- a/compiler/nativeGen/PPC/Ppr.hs
+++ b/compiler/nativeGen/PPC/Ppr.hs
@@ -23,9 +23,10 @@ import Cmm hiding (topInfoTable)
import Hoopl.Collections
import Hoopl.Label
+import BlockId
import CLabel
-import Unique ( pprUniqueAlways, Uniquable(..) )
+import Unique ( pprUniqueAlways )
import Platform
import FastString
import Outputable
@@ -108,7 +109,7 @@ pprFunctionPrologue lab = pprGloblDecl lab
pprBasicBlock :: LabelMap CmmStatics -> NatBasicBlock Instr -> SDoc
pprBasicBlock info_env (BasicBlock blockid instrs)
= maybe_infotable $$
- pprLabel (mkAsmTempLabel (getUnique blockid)) $$
+ pprLabel (blockLbl blockid) $$
vcat (map pprInstr instrs)
where
maybe_infotable = case mapLookup blockid info_env of
@@ -576,7 +577,7 @@ pprInstr (BCC cond blockid) = hcat [
char '\t',
ppr lbl
]
- where lbl = mkAsmTempLabel (getUnique blockid)
+ where lbl = blockLbl blockid
pprInstr (BCCFAR cond blockid) = vcat [
hcat [
@@ -589,7 +590,7 @@ pprInstr (BCCFAR cond blockid) = vcat [
ppr lbl
]
]
- where lbl = mkAsmTempLabel (getUnique blockid)
+ where lbl = blockLbl blockid
pprInstr (JMP lbl)
-- We never jump to ForeignLabels; if we ever do, c.f. handling for "BL"