diff options
author | Simon Marlow <marlowsd@gmail.com> | 2012-11-12 14:01:01 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2012-11-12 15:20:37 +0000 |
commit | 4dc7d04e59161be4ea33192f82aa94be3c68bf20 (patch) | |
tree | b7da80a728cf279a46871942ba65234291218e1c /compiler | |
parent | 929578081e8b2b0f14e9518329f516eebf4315ce (diff) | |
download | haskell-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.hs | 5 |
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 |