summaryrefslogtreecommitdiff
path: root/compiler/cmm/CmmProcPoint.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-03-09 11:06:25 +0000
committerSimon Marlow <marlowsd@gmail.com>2012-03-15 13:25:15 +0000
commit643eb066aa221976d2d57f2e2a2c46bc7fb44e24 (patch)
tree512fe81bea1accf506d65e9f6bd7267ec054f94c /compiler/cmm/CmmProcPoint.hs
parent2c4b427cdef4198ead5546e77cf30c8b71ba02dd (diff)
downloadhaskell-643eb066aa221976d2d57f2e2a2c46bc7fb44e24.tar.gz
Remove the old stack layout algorithms
Also, do removeDeadAssignments instead of cmmLiveness before stack allocation, because the former also does liveness analysis, and we can do just one liveness analysis instead of two. The stack layout algorithm doesn't introduce any dead assignments, so this doesn't affect the generated code.
Diffstat (limited to 'compiler/cmm/CmmProcPoint.hs')
-rw-r--r--compiler/cmm/CmmProcPoint.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/cmm/CmmProcPoint.hs b/compiler/cmm/CmmProcPoint.hs
index 77ffb4df56..15f8affb8e 100644
--- a/compiler/cmm/CmmProcPoint.hs
+++ b/compiler/cmm/CmmProcPoint.hs
@@ -403,11 +403,12 @@ splitAtProcPoints entry_label callPPs procPoints procMap
[] -> graphEnv
[id] -> add graphEnv id bid b
_ -> panic "Each block should be reachable from only one ProcPoint"
- Nothing -> pprPanic "block not reached by a proc point?" (ppr bid)
+ Nothing -> graphEnv
where bid = entryLabel b
add graphEnv procId bid b = mapInsert procId graph' graphEnv
where graph = mapLookup procId graphEnv `orElse` mapEmpty
graph' = mapInsert bid b graph
+
graphEnv <- return $ foldGraphBlocks addBlock emptyBlockMap g
-- Build a map from proc point BlockId to pairs of:
-- * Labels for their new procedures