summaryrefslogtreecommitdiff
path: root/compiler/codeGen
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2018-01-29 14:34:25 +0100
committerGabor Greif <ggreif@gmail.com>2019-04-15 17:19:03 -0400
commitbe05bd8168b0ea65d63dc0093a5c8781a2528500 (patch)
treed45ed24579c4d084c73884da9589da25b8dcf7d8 /compiler/codeGen
parented94d3450cbb6ec7a31d9aa37efb7fe93d0559cf (diff)
downloadhaskell-be05bd8168b0ea65d63dc0093a5c8781a2528500.tar.gz
asm-emit-time IND_STATIC elimination
When a new closure identifier is being established to a local or exported closure already emitted into the same module, refrain from adding an IND_STATIC closure, and instead emit an assembly-language alias. Inter-module IND_STATIC objects still remain, and need to be addressed by other measures. Binary-size savings on nofib are around 0.1%.
Diffstat (limited to 'compiler/codeGen')
-rw-r--r--compiler/codeGen/StgCmmBind.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/codeGen/StgCmmBind.hs b/compiler/codeGen/StgCmmBind.hs
index d134dfd677..f8bdc0d37e 100644
--- a/compiler/codeGen/StgCmmBind.hs
+++ b/compiler/codeGen/StgCmmBind.hs
@@ -78,7 +78,9 @@ cgTopRhsClosure dflags rec id ccs upd_flag args body =
-- closure pointing directly to the indirectee. This is exactly
-- what the CAF will eventually evaluate to anyway, we're just
-- shortcutting the whole process, and generating a lot less code
- -- (#7308)
+ -- (#7308). Eventually the IND_STATIC closure will be eliminated
+ -- by assembly '.equiv' directives, where possible (#15155).
+ -- See note [emit-time elimination of static indirections] in CLabel.
--
-- Note: we omit the optimisation when this binding is part of a
-- recursive group, because the optimisation would inhibit the black