diff options
| author | Ben.Lippmeier@anu.edu.au <unknown> | 2009-09-17 06:03:32 +0000 |
|---|---|---|
| committer | Ben.Lippmeier@anu.edu.au <unknown> | 2009-09-17 06:03:32 +0000 |
| commit | 85981a6fc4bb94af433b0b3655c26c5ec4dda1bd (patch) | |
| tree | 5130455c641534c3f2f321b8401b0ef77403967d /compiler/nativeGen/RegAlloc/Graph/Coalesce.hs | |
| parent | 37802abf7457723624097d8b78d5ec53a68d7f09 (diff) | |
| download | haskell-85981a6fc4bb94af433b0b3655c26c5ec4dda1bd.tar.gz | |
NCG: Refactor LiveCmmTop to hold a list of SCCs instead of abusing ListGraph
Diffstat (limited to 'compiler/nativeGen/RegAlloc/Graph/Coalesce.hs')
| -rw-r--r-- | compiler/nativeGen/RegAlloc/Graph/Coalesce.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/nativeGen/RegAlloc/Graph/Coalesce.hs b/compiler/nativeGen/RegAlloc/Graph/Coalesce.hs index 74eb0c2f55..a5d95a3adf 100644 --- a/compiler/nativeGen/RegAlloc/Graph/Coalesce.hs +++ b/compiler/nativeGen/RegAlloc/Graph/Coalesce.hs @@ -14,6 +14,7 @@ import Reg import Cmm import Bag +import Digraph import UniqFM import UniqSet import UniqSupply @@ -68,10 +69,9 @@ slurpJoinMovs slurpJoinMovs live = slurpCmm emptyBag live where - slurpCmm rs CmmData{} = rs - slurpCmm rs (CmmProc _ _ _ (ListGraph blocks)) = foldl' slurpComp rs blocks - slurpComp rs (BasicBlock _ blocks) = foldl' slurpBlock rs blocks - slurpBlock rs (BasicBlock _ instrs) = foldl' slurpLI rs instrs + slurpCmm rs CmmData{} = rs + slurpCmm rs (CmmProc _ _ _ sccs) = foldl' slurpBlock rs (flattenSCCs sccs) + slurpBlock rs (BasicBlock _ instrs) = foldl' slurpLI rs instrs slurpLI rs (Instr _ Nothing) = rs slurpLI rs (Instr instr (Just live)) |
