projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Separate NondecreasingIndentation out into its own extension
[ghc-hetmet.git]
/
compiler
/
codeGen
/
StgCmmBind.hs
diff --git
a/compiler/codeGen/StgCmmBind.hs
b/compiler/codeGen/StgCmmBind.hs
index
5decdeb
..
6451840
100644
(file)
--- a/
compiler/codeGen/StgCmmBind.hs
+++ b/
compiler/codeGen/StgCmmBind.hs
@@
-36,7
+36,7
@@
import CLabel
import StgSyn
import CostCentre
import Id
import StgSyn
import CostCentre
import Id
-import Monad (foldM, liftM)
+import Control.Monad
import Name
import Module
import ListSetOps
import Name
import Module
import ListSetOps
@@
-47,8
+47,6
@@
import Outputable
import FastString
import Maybes
import FastString
import Maybes
-import Data.List
-
------------------------------------------------------------------------
-- Top-level bindings
------------------------------------------------------------------------
------------------------------------------------------------------------
-- Top-level bindings
------------------------------------------------------------------------
@@
-403,7
+401,7
@@
closureCodeBody top_lvl bndr cl_info cc args arity body fv_details
; granYield arg_regs node_points
-- Main payload
; granYield arg_regs node_points
-- Main payload
- ; entryHeapCheck node arity arg_regs $ do
+ ; entryHeapCheck (if node_points then Just node else Nothing) arity arg_regs $ do
{ enterCostCentre cl_info cc body
; fv_bindings <- mapM bind_fv fv_details
-- Load free vars out of closure *after*
{ enterCostCentre cl_info cc body
; fv_bindings <- mapM bind_fv fv_details
-- Load free vars out of closure *after*
@@
-459,7
+457,7
@@
thunkCode cl_info fv_details cc node arity body
; granThunk node_points
-- Heap overflow check
; granThunk node_points
-- Heap overflow check
- ; entryHeapCheck node arity [] $ do
+ ; entryHeapCheck (if node_points then Just node else Nothing) arity [] $ do
{ -- Overwrite with black hole if necessary
-- but *after* the heap-overflow check
dflags <- getDynFlags
{ -- Overwrite with black hole if necessary
-- but *after* the heap-overflow check
dflags <- getDynFlags
@@
-496,8
+494,8
@@
emitBlackHoleCode is_single_entry
| otherwise =
nopC
where
| otherwise =
nopC
where
- bh_lbl | is_single_entry = mkRtsDataLabel (sLit "stg_SE_BLACKHOLE_info")
- | otherwise = mkRtsDataLabel (sLit "stg_BLACKHOLE_info")
+ bh_lbl | is_single_entry = mkCmmDataLabel rtsPackageId (fsLit "stg_SE_BLACKHOLE_info")
+ | otherwise = mkCmmDataLabel rtsPackageId (fsLit "stg_BLACKHOLE_info")
-- If we wanted to do eager blackholing with slop filling,
-- we'd need to do it at the *end* of a basic block, otherwise
-- If we wanted to do eager blackholing with slop filling,
-- we'd need to do it at the *end* of a basic block, otherwise
@@
-607,7
+605,10
@@
link_caf cl_info _is_upd = do
-- so that the garbage collector can find them
-- This must be done *before* the info table pointer is overwritten,
-- because the old info table ptr is needed for reversion
-- so that the garbage collector can find them
-- This must be done *before* the info table pointer is overwritten,
-- because the old info table ptr is needed for reversion
- ; emitRtsCallWithVols (sLit "newCAF") [(CmmReg nodeReg,AddrHint)] [node] False
+ ; emitRtsCallWithVols rtsPackageId (fsLit "newCAF")
+ [ (CmmReg (CmmGlobal BaseReg), AddrHint),
+ (CmmReg nodeReg, AddrHint) ]
+ [node] False
-- node is live, so save it.
-- Overwrite the closure with a (static) indirection
-- node is live, so save it.
-- Overwrite the closure with a (static) indirection