summaryrefslogtreecommitdiff
path: root/compiler/codeGen/StgCmmBind.hs
diff options
context:
space:
mode:
authorPatrick Palka <patrick@parcs.ath.cx>2013-11-29 13:40:42 -0500
committerJan Stolarek <jan.stolarek@p.lodz.pl>2013-12-01 09:08:24 +0100
commitadb9964e2f97338501411282c0bb6a9f47a56b1b (patch)
treeb3f19147dc1bea5c70f99c7f5f9fe9ae7c0e32be /compiler/codeGen/StgCmmBind.hs
parent4bbffb49ebddaa803f2c82c837a68553042f0793 (diff)
downloadhaskell-adb9964e2f97338501411282c0bb6a9f47a56b1b.tar.gz
Fix loopification with profiling and enable it by default (#8275)
Diffstat (limited to 'compiler/codeGen/StgCmmBind.hs')
-rw-r--r--compiler/codeGen/StgCmmBind.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/codeGen/StgCmmBind.hs b/compiler/codeGen/StgCmmBind.hs
index 4762c5a4e0..16477c83dc 100644
--- a/compiler/codeGen/StgCmmBind.hs
+++ b/compiler/codeGen/StgCmmBind.hs
@@ -31,7 +31,6 @@ import StgCmmForeign (emitPrimCall)
import MkGraph
import CoreSyn ( AltCon(..) )
import SMRep
-import BlockId
import Cmm
import CmmInfo
import CmmUtils
@@ -481,8 +480,7 @@ closureCodeBody top_lvl bndr cl_info cc args arity body fv_details
-- Emit new label that might potentially be a header
-- of a self-recursive tail call. See Note
-- [Self-recursive tail calls] in StgCmmExpr
- ; u <- newUnique
- ; let loop_header_id = mkBlockId u
+ ; loop_header_id <- newLabelC
; emitLabel loop_header_id
-- Extend reader monad with information that
-- self-recursive tail calls can be optimized into local
@@ -495,7 +493,7 @@ closureCodeBody top_lvl bndr cl_info cc args arity body fv_details
tickyEnterFun cl_info
; enterCostCentreFun cc
(CmmMachOp (mo_wordSub dflags)
- [ CmmReg nodeReg
+ [ CmmReg (CmmLocal node) -- not nodeReg, see #8275
, mkIntExpr dflags (funTag dflags cl_info) ])
; fv_bindings <- mapM bind_fv fv_details
-- Load free vars out of closure *after*