projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
NCG: Refactor LiveCmmTop to hold a list of SCCs instead of abusing ListGraph
[ghc-hetmet.git]
/
compiler
/
nativeGen
/
RegAlloc
/
Graph
/
SpillCost.hs
diff --git
a/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs
b/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs
index
58e9580
..
5932d31
100644
(file)
--- a/
compiler/nativeGen/RegAlloc/Graph/SpillCost.hs
+++ b/
compiler/nativeGen/RegAlloc/Graph/SpillCost.hs
@@
-23,11
+23,11
@@
import Reg
import GraphBase
import GraphBase
-
import BlockId
import Cmm
import UniqFM
import UniqSet
import BlockId
import Cmm
import UniqFM
import UniqSet
+import Digraph (flattenSCCs)
import Outputable
import State
import Outputable
import State
@@
-71,11
+71,9
@@
slurpSpillCostInfo cmm
= execState (countCmm cmm) zeroSpillCostInfo
where
countCmm CmmData{} = return ()
= execState (countCmm cmm) zeroSpillCostInfo
where
countCmm CmmData{} = return ()
- countCmm (CmmProc info _ _ (ListGraph blocks))
- = mapM_ (countComp info) blocks
-
- countComp info (BasicBlock _ blocks)
- = mapM_ (countBlock info) blocks
+ countCmm (CmmProc info _ _ sccs)
+ = mapM_ (countBlock info)
+ $ flattenSCCs sccs
-- lookup the regs that are live on entry to this block in
-- the info table from the CmmProc
-- lookup the regs that are live on entry to this block in
-- the info table from the CmmProc