diff options
author | Michal Terepeta <michal.terepeta@gmail.com> | 2016-12-08 16:34:10 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-12-08 18:44:55 -0500 |
commit | 2bb099e5ccd7255f9742cb8bc5d512cd92d035b6 (patch) | |
tree | bf4bf1fbff529c082e55f9a2b85cb55e1e9722a3 /compiler/nativeGen/PPC | |
parent | 55361b381d14d8752f00d90868fcbe82f86c6b2d (diff) | |
download | haskell-2bb099e5ccd7255f9742cb8bc5d512cd92d035b6.tar.gz |
BlockId: remove BlockMap and BlockSet synonyms
This continues removal of `BlockId` module in favor of Hoopl's `Label`.
Most of the changes here are mechanical, apart from the orphan
`Outputable` instances for `LabelMap` and `LabelSet`. For now I've
moved them to `cmm/Hoopl`, since it's already trying to manage all
imports from Hoopl (to avoid any collisions).
Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>
Test Plan: validate
Reviewers: bgamari, austin, simonmar
Reviewed By: simonmar
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2800
Diffstat (limited to 'compiler/nativeGen/PPC')
-rw-r--r-- | compiler/nativeGen/PPC/Instr.hs | 5 | ||||
-rw-r--r-- | compiler/nativeGen/PPC/Ppr.hs | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/compiler/nativeGen/PPC/Instr.hs b/compiler/nativeGen/PPC/Instr.hs index 5dc0325dff..ae7d6bf260 100644 --- a/compiler/nativeGen/PPC/Instr.hs +++ b/compiler/nativeGen/PPC/Instr.hs @@ -33,6 +33,7 @@ import Reg import CodeGen.Platform import BlockId +import Hoopl import DynFlags import Cmm import CmmInfo @@ -117,7 +118,7 @@ allocMoreStack platform slots (CmmProc info lbl live (ListGraph code)) = do alloc = mkStackAllocInstr platform delta dealloc = mkStackDeallocInstr platform delta - new_blockmap :: BlockEnv BlockId + new_blockmap :: LabelMap BlockId new_blockmap = mapFromList (zip entries (map mkBlockId uniqs)) insert_stack_insns (BasicBlock id insns) @@ -655,7 +656,7 @@ ppc_takeRegRegMoveInstr _ = Nothing -- big, we have to work around this limitation. makeFarBranches - :: BlockEnv CmmStatics + :: LabelMap CmmStatics -> [NatBasicBlock Instr] -> [NatBasicBlock Instr] makeFarBranches info_env blocks diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs index f0dd73e7a1..fcd084b8ae 100644 --- a/compiler/nativeGen/PPC/Ppr.hs +++ b/compiler/nativeGen/PPC/Ppr.hs @@ -20,7 +20,7 @@ import RegClass import TargetReg import Cmm hiding (topInfoTable) -import BlockId +import Hoopl import CLabel @@ -104,7 +104,7 @@ pprFunctionPrologue lab = pprGloblDecl lab $$ text "\t.localentry\t" <> ppr lab <> text ",.-" <> ppr lab -pprBasicBlock :: BlockEnv CmmStatics -> NatBasicBlock Instr -> SDoc +pprBasicBlock :: LabelMap CmmStatics -> NatBasicBlock Instr -> SDoc pprBasicBlock info_env (BasicBlock blockid instrs) = maybe_infotable $$ pprLabel (mkAsmTempLabel (getUnique blockid)) $$ |