Skip to content
Snippets Groups Projects
Commit ac31b799 authored by parcs's avatar parcs
Browse files

Move the LDV code below the self-loop label (#8275)

parent 6178f6e1
No related branches found
No related tags found
No related merge requests found
...@@ -476,12 +476,12 @@ closureCodeBody top_lvl bndr cl_info cc args arity body fv_details ...@@ -476,12 +476,12 @@ closureCodeBody top_lvl bndr cl_info cc args arity body fv_details
; dflags <- getDynFlags ; dflags <- getDynFlags
; let node_points = nodeMustPointToIt dflags lf_info ; let node_points = nodeMustPointToIt dflags lf_info
node' = if node_points then Just node else Nothing node' = if node_points then Just node else Nothing
; when node_points (ldvEnterClosure cl_info (CmmLocal node))
-- Emit new label that might potentially be a header -- Emit new label that might potentially be a header
-- of a self-recursive tail call. See Note -- of a self-recursive tail call. See Note
-- [Self-recursive tail calls] in StgCmmExpr -- [Self-recursive tail calls] in StgCmmExpr
; loop_header_id <- newLabelC ; loop_header_id <- newLabelC
; emitLabel loop_header_id ; emitLabel loop_header_id
; when node_points (ldvEnterClosure cl_info (CmmLocal node))
-- Extend reader monad with information that -- Extend reader monad with information that
-- self-recursive tail calls can be optimized into local -- self-recursive tail calls can be optimized into local
-- jumps -- jumps
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment