summaryrefslogtreecommitdiff
path: root/compiler/codeGen/StgCmm.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-07-31 11:19:03 +0100
committerSimon Marlow <marlowsd@gmail.com>2012-08-02 11:56:02 +0100
commit6ede0067a91a0da7f682c3ea1d6df938616e983a (patch)
tree967a755612581b3d578f9879b56353a830cfa4bb /compiler/codeGen/StgCmm.hs
parentd2361423f23c3381b5a7f57c3f9e6c2448cdac80 (diff)
downloadhaskell-6ede0067a91a0da7f682c3ea1d6df938616e983a.tar.gz
Explicitly share some return continuations
Instead of relying on common-block-elimination to share return continuations in the common case (case-alternative heap checks) we do it explicitly. This isn't hard to do, is more robust, and saves some compilation time. Full commentary in Note [sharing continuations].
Diffstat (limited to 'compiler/codeGen/StgCmm.hs')
-rw-r--r--compiler/codeGen/StgCmm.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/codeGen/StgCmm.hs b/compiler/codeGen/StgCmm.hs
index 70892eeb5e..d82b4bc3b1 100644
--- a/compiler/codeGen/StgCmm.hs
+++ b/compiler/codeGen/StgCmm.hs
@@ -244,8 +244,9 @@ cgDataCon data_con
do { _ <- ticky_code
; ldvEnter (CmmReg nodeReg)
; tickyReturnOldCon (length arg_things)
- ; emitReturn [cmmOffsetB (CmmReg nodeReg)
- (tagForCon data_con)] }
+ ; _ <- emitReturn [cmmOffsetB (CmmReg nodeReg)
+ (tagForCon data_con)]
+ ; return () }
-- The case continuation code expects a tagged pointer
arg_reps :: [(PrimRep, UnaryType)]