summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2018-04-22 19:34:32 +0100
committerSimon Marlow <marlowsd@gmail.com>2018-05-16 13:36:13 +0100
commit838b69032566ce6ab3918d70e8d5e098d0bcee02 (patch)
treeac764fcb2dc421a13fd76fec1a1d6d01fd0b4f1c /includes
parent2b0918c9834be1873728176e4944bec26271234a (diff)
downloadhaskell-838b69032566ce6ab3918d70e8d5e098d0bcee02.tar.gz
Merge FUN_STATIC closure with its SRT
Summary: The idea here is to save a little code size and some work in the GC, by collapsing FUN_STATIC closures and their SRTs. This is (4) in a series; see D4632 for more details. There's a tradeoff here: more complexity in the compiler in exchange for a modest code size reduction (probably around 0.5%). Results: * GHC binary itself (statically linked) is 1% smaller * -0.2% binary sizes in nofib (-0.5% module sizes) Full nofib results comparing D4634 with this: P177 (ignore runtimes, these aren't stable on my laptop) Test Plan: validate, nofib Reviewers: bgamari, niteria, simonpj, erikd Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D4637
Diffstat (limited to 'includes')
-rw-r--r--includes/rts/storage/ClosureMacros.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/includes/rts/storage/ClosureMacros.h b/includes/rts/storage/ClosureMacros.h
index 7a3ecaa1d2..dcbc95b31b 100644
--- a/includes/rts/storage/ClosureMacros.h
+++ b/includes/rts/storage/ClosureMacros.h
@@ -172,7 +172,6 @@ INLINE_HEADER StgHalfWord GET_TAG(const StgClosure *con)
-------------------------------------------------------------------------- */
/* These are hard-coded. */
-#define FUN_STATIC_LINK(p) (&(p)->payload[0])
#define THUNK_STATIC_LINK(p) (&(p)->payload[1])
#define IND_STATIC_LINK(p) (&(p)->payload[1])
@@ -182,8 +181,6 @@ STATIC_LINK(const StgInfoTable *info, StgClosure *p)
switch (info->type) {
case THUNK_STATIC:
return THUNK_STATIC_LINK(p);
- case FUN_STATIC:
- return FUN_STATIC_LINK(p);
case IND_STATIC:
return IND_STATIC_LINK(p);
default: