summaryrefslogtreecommitdiff
path: root/compiler/cmm/Cmm.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2018-05-16 14:03:55 +0100
committerSimon Marlow <marlowsd@gmail.com>2018-05-17 08:54:55 +0100
commitf2d27c1ad69321872a87a37144fe41e815301f5b (patch)
treee579648c6360411911767fbe36c402c59694890a /compiler/cmm/Cmm.hs
parent0c7db226012b5cfafc9a38bfe372661672ec8900 (diff)
downloadhaskell-f2d27c1ad69321872a87a37144fe41e815301f5b.tar.gz
Comments and refactoring only
Addressing review comments on D4637
Diffstat (limited to 'compiler/cmm/Cmm.hs')
-rw-r--r--compiler/cmm/Cmm.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/cmm/Cmm.hs b/compiler/cmm/Cmm.hs
index 4c8e528250..eb34618e38 100644
--- a/compiler/cmm/Cmm.hs
+++ b/compiler/cmm/Cmm.hs
@@ -143,6 +143,18 @@ data CmmInfoTable
cit_clo :: Maybe (Id, CostCentreStack)
-- Just (id,ccs) <=> build a static closure later
-- Nothing <=> don't build a static closure
+ --
+ -- Static closures for FUNs and THUNKs are *not* generated by
+ -- the code generator, because we might want to add SRT
+ -- entries to them later (for FUNs at least; THUNKs are
+ -- treated the same for consistency). See Note [SRTs] in
+ -- CmmBuildInfoTables, in particular the [FUN] optimisation.
+ --
+ -- This is strictly speaking not a part of the info table that
+ -- will be finally generated, but it's the only convenient
+ -- place to convey this information from the code generator to
+ -- where we build the static closures in
+ -- CmmBuildInfoTables.doSRTs.
}
data ProfilingInfo