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/RegAlloc | |
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/RegAlloc')
-rw-r--r-- | compiler/nativeGen/RegAlloc/Graph/Spill.hs | 1 | ||||
-rw-r--r-- | compiler/nativeGen/RegAlloc/Graph/SpillClean.hs | 1 | ||||
-rw-r--r-- | compiler/nativeGen/RegAlloc/Graph/SpillCost.hs | 2 | ||||
-rw-r--r-- | compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs | 1 | ||||
-rw-r--r-- | compiler/nativeGen/RegAlloc/Linear/Main.hs | 1 | ||||
-rw-r--r-- | compiler/nativeGen/RegAlloc/Liveness.hs | 7 |
6 files changed, 9 insertions, 4 deletions
diff --git a/compiler/nativeGen/RegAlloc/Graph/Spill.hs b/compiler/nativeGen/RegAlloc/Graph/Spill.hs index 445f416187..0704e53102 100644 --- a/compiler/nativeGen/RegAlloc/Graph/Spill.hs +++ b/compiler/nativeGen/RegAlloc/Graph/Spill.hs @@ -12,6 +12,7 @@ import Instruction import Reg import Cmm hiding (RegSet) import BlockId +import Hoopl import MonadUtils import State diff --git a/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs b/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs index c75bcebb7b..03da772819 100644 --- a/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs +++ b/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs @@ -33,6 +33,7 @@ import Instruction import Reg import BlockId +import Hoopl import Cmm import UniqSet import UniqFM diff --git a/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs b/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs index 198be622e1..efa1cd11e2 100644 --- a/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs +++ b/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs @@ -20,7 +20,7 @@ import Reg import GraphBase -import BlockId +import Hoopl (mapLookup) import Cmm import UniqFM import UniqSet diff --git a/compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs b/compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs index 294608a04e..0b655374a5 100644 --- a/compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs +++ b/compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs @@ -17,6 +17,7 @@ import Instruction import Reg import BlockId +import Hoopl import Digraph import DynFlags import Outputable diff --git a/compiler/nativeGen/RegAlloc/Linear/Main.hs b/compiler/nativeGen/RegAlloc/Linear/Main.hs index cec08a2f3f..4db02d6dee 100644 --- a/compiler/nativeGen/RegAlloc/Linear/Main.hs +++ b/compiler/nativeGen/RegAlloc/Linear/Main.hs @@ -118,6 +118,7 @@ import Instruction import Reg import BlockId +import Hoopl import Cmm hiding (RegSet) import Digraph diff --git a/compiler/nativeGen/RegAlloc/Liveness.hs b/compiler/nativeGen/RegAlloc/Liveness.hs index 98b9659748..a904202ba7 100644 --- a/compiler/nativeGen/RegAlloc/Liveness.hs +++ b/compiler/nativeGen/RegAlloc/Liveness.hs @@ -39,6 +39,7 @@ import Reg import Instruction import BlockId +import Hoopl import Cmm hiding (RegSet) import PprCmm() @@ -65,7 +66,7 @@ type RegMap a = UniqFM a emptyRegMap :: UniqFM a emptyRegMap = emptyUFM -type BlockMap a = BlockEnv a +type BlockMap a = LabelMap a -- | A top level thing which carries liveness information. @@ -167,7 +168,7 @@ data Liveness -- | Stash regs live on entry to each basic block in the info part of the cmm code. data LiveInfo = LiveInfo - (BlockEnv CmmStatics) -- cmm info table static stuff + (LabelMap CmmStatics) -- cmm info table static stuff [BlockId] -- entry points (first one is the -- entry point for the proc). (Maybe (BlockMap RegSet)) -- argument locals live on entry to this block @@ -685,7 +686,7 @@ sccBlocks blocks entries = map (fmap get_node) sccs g1 = graphFromEdgedVerticesUniq nodes - reachable :: BlockSet + reachable :: LabelSet reachable = setFromList [ id | (_,id,_) <- reachablesG g1 roots ] g2 = graphFromEdgedVerticesUniq [ node | node@(_,id,_) <- nodes |