summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-11-12 14:01:01 +0000
committerSimon Marlow <marlowsd@gmail.com>2012-11-12 15:20:37 +0000
commit4dc7d04e59161be4ea33192f82aa94be3c68bf20 (patch)
treeb7da80a728cf279a46871942ba65234291218e1c /compiler
parent929578081e8b2b0f14e9518329f516eebf4315ce (diff)
downloadhaskell-4dc7d04e59161be4ea33192f82aa94be3c68bf20.tar.gz
replaceLabels: null out the cml_cont field of CmmCall
This fixes a CmmLint complaint when doing proc-point splitting.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/cmm/CmmProcPoint.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/cmm/CmmProcPoint.hs b/compiler/cmm/CmmProcPoint.hs
index 02b232d488..fb94b95e51 100644
--- a/compiler/cmm/CmmProcPoint.hs
+++ b/compiler/cmm/CmmProcPoint.hs
@@ -354,7 +354,10 @@ replaceBranches env cmmg
last (CmmBranch id) = CmmBranch (lookup id)
last (CmmCondBranch e ti fi) = CmmCondBranch e (lookup ti) (lookup fi)
last (CmmSwitch e tbl) = CmmSwitch e (map (fmap lookup) tbl)
- last l@(CmmCall {}) = l
+ last l@(CmmCall {}) = l { cml_cont = Nothing }
+ -- NB. remove the continuation of a CmmCall, since this
+ -- label will now be in a different CmmProc. Not only
+ -- is this tidier, it stops CmmLint from complaining.
last l@(CmmForeignCall {}) = l
lookup id = fmap lookup (mapLookup id env) `orElse` id
-- XXX: this is a recursive lookup, it follows chains