summaryrefslogtreecommitdiff
path: root/compiler/codeGen/StgCmmMonad.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2013-08-27 15:48:02 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2013-08-27 15:48:02 +0100
commitef017944600cf4e153aad686a6a78bfb48dea67a (patch)
treecde2fa0174bc9587174d6e46427cd164eb218cea /compiler/codeGen/StgCmmMonad.hs
parent776cfe28cf089c24a56a288f2f0c49494f7d9e47 (diff)
downloadhaskell-ef017944600cf4e153aad686a6a78bfb48dea67a.tar.gz
Comments only, relating to #8166 fix
Diffstat (limited to 'compiler/codeGen/StgCmmMonad.hs')
-rw-r--r--compiler/codeGen/StgCmmMonad.hs10
1 files changed, 9 insertions, 1 deletions
diff --git a/compiler/codeGen/StgCmmMonad.hs b/compiler/codeGen/StgCmmMonad.hs
index 17bad247e2..d5e893afd9 100644
--- a/compiler/codeGen/StgCmmMonad.hs
+++ b/compiler/codeGen/StgCmmMonad.hs
@@ -180,13 +180,21 @@ type CgBindings = IdEnv CgIdInfo
data CgIdInfo
= CgIdInfo
- { cg_id :: Id -- Id that this is the info for
+ { cg_id :: Id -- Id that this is the info for
-- Can differ from the Id at occurrence sites by
-- virtue of being externalised, for splittable C
+ -- See Note [Externalise when splitting]
, cg_lf :: LambdaFormInfo
, cg_loc :: CgLoc -- CmmExpr for the *tagged* value
}
+-- Note [Externalise when splitting]
+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+-- If we're splitting the object with -fsplit-objs, we need to
+-- externalise *all* the top-level names, and then make sure we only
+-- use the externalised one in any C label we use which refers to this
+-- name.
+
data CgLoc
= CmmLoc CmmExpr -- A stable CmmExpr; that is, one not mentioning
-- Hp, so that it remains valid across calls