summaryrefslogtreecommitdiff
path: root/compiler/codeGen/StgCmmHeap.hs
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2016-11-29 14:44:19 -0500
committerBen Gamari <ben@smart-cactus.org>2016-11-29 14:44:20 -0500
commit4d4e7a512aa4ecbb5811cccc1dab335379e63efa (patch)
tree38aaf168992d569f8ff29e21286873a017562100 /compiler/codeGen/StgCmmHeap.hs
parent68450878b44ddb63beb3c589cd60d43461900986 (diff)
downloadhaskell-4d4e7a512aa4ecbb5811cccc1dab335379e63efa.tar.gz
Use newBlockId instead of newLabelC
This seems like a clearer name and the fewer functions that one needs to remember, the better. Test Plan: validate Reviewers: austin, simonmar, michalt Reviewed By: simonmar, michalt Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2735
Diffstat (limited to 'compiler/codeGen/StgCmmHeap.hs')
-rw-r--r--compiler/codeGen/StgCmmHeap.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/compiler/codeGen/StgCmmHeap.hs b/compiler/codeGen/StgCmmHeap.hs
index aa8855660b..a0b822dfd6 100644
--- a/compiler/codeGen/StgCmmHeap.hs
+++ b/compiler/codeGen/StgCmmHeap.hs
@@ -38,6 +38,7 @@ import MkGraph
import Hoopl
import SMRep
+import BlockId
import Cmm
import CmmUtils
import CostCentre
@@ -386,7 +387,7 @@ entryHeapCheck' is_fastf node arity args code
updfr_sz <- getUpdFrameOff
- loop_id <- newLabelC
+ loop_id <- newBlockId
emitLabel loop_id
heapCheck True True (gc_call updfr_sz <*> mkBranch loop_id) code
@@ -417,9 +418,9 @@ altOrNoEscapeHeapCheck checkYield regs code = do
case cannedGCEntryPoint dflags regs of
Nothing -> genericGC checkYield code
Just gc -> do
- lret <- newLabelC
+ lret <- newBlockId
let (off, _, copyin) = copyInOflow dflags NativeReturn (Young lret) regs []
- lcont <- newLabelC
+ lcont <- newBlockId
tscope <- getTickScope
emitOutOfLine lret (copyin <*> mkBranch lcont, tscope)
emitLabel lcont
@@ -462,7 +463,7 @@ cannedGCReturnsTo checkYield cont_on_stack gc regs lret off code
genericGC :: Bool -> FCode a -> FCode a
genericGC checkYield code
= do updfr_sz <- getUpdFrameOff
- lretry <- newLabelC
+ lretry <- newBlockId
emitLabel lretry
call <- mkCall generic_gc (GC, GC) [] [] updfr_sz []
heapCheck False checkYield (call <*> mkBranch lretry) code
@@ -551,7 +552,7 @@ heapCheck checkStack checkYield do_gc code
heapStackCheckGen :: Maybe CmmExpr -> Maybe CmmExpr -> FCode ()
heapStackCheckGen stk_hwm mb_bytes
= do updfr_sz <- getUpdFrameOff
- lretry <- newLabelC
+ lretry <- newBlockId
emitLabel lretry
call <- mkCall generic_gc (GC, GC) [] [] updfr_sz []
do_checks stk_hwm False mb_bytes (call <*> mkBranch lretry)
@@ -610,7 +611,7 @@ do_checks :: Maybe CmmExpr -- Should we check the stack?
-> FCode ()
do_checks mb_stk_hwm checkYield mb_alloc_lit do_gc = do
dflags <- getDynFlags
- gc_id <- newLabelC
+ gc_id <- newBlockId
let
Just alloc_lit = mb_alloc_lit