summaryrefslogtreecommitdiff
path: root/src/cmd/6l
diff options
context:
space:
mode:
authorCarl Shapiro <cshapiro@google.com>2013-12-05 17:35:22 -0800
committerCarl Shapiro <cshapiro@google.com>2013-12-05 17:35:22 -0800
commit950d5e501cfce748cb115e8a8491672850613cb2 (patch)
treeeef04c58ca814e0cecfb6fe7663439af10b7fbba /src/cmd/6l
parent89f7fae4071236c62ed6833c5e099a78f9b53721 (diff)
downloadgo-950d5e501cfce748cb115e8a8491672850613cb2.tar.gz
cmd/5g, cmd/5l, cmd/6g, cmd/6l, cmd/8g, cmd/8l, cmd/gc, runtime: generate pointer maps by liveness analysis
This change allows the garbage collector to examine stack slots that are determined as live and containing a pointer value by the garbage collector. This results in a mean reduction of 65% in the number of stack slots scanned during an invocation of "GOGC=1 all.bash". Unfortunately, this does not yet allow garbage collection to be precise for the stack slots computed as live. Pointers confound the determination of what definitions reach a given instruction. In general, this problem is not solvable without runtime cost but some advanced cooperation from the compiler might mitigate common cases. R=golang-dev, rsc, cshapiro CC=golang-dev https://codereview.appspot.com/14430048
Diffstat (limited to 'src/cmd/6l')
-rw-r--r--src/cmd/6l/6.out.h1
-rw-r--r--src/cmd/6l/optab.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/6l/6.out.h b/src/cmd/6l/6.out.h
index 5fa73a65b..64c8ac2fe 100644
--- a/src/cmd/6l/6.out.h
+++ b/src/cmd/6l/6.out.h
@@ -762,6 +762,7 @@ enum as
AFUNCDATA,
APCDATA,
ACHECKNIL,
+ AFATVARDEF,
ALAST
};
diff --git a/src/cmd/6l/optab.c b/src/cmd/6l/optab.c
index 46603ad45..f48c6c329 100644
--- a/src/cmd/6l/optab.c
+++ b/src/cmd/6l/optab.c
@@ -1352,8 +1352,11 @@ Optab optab[] =
{ APCLMULQDQ, yxshuf, Pq, 0x3a,0x44,0 },
{ AUSEFIELD, ynop, Px, 0,0 },
+ { ATYPE },
{ AFUNCDATA, yfuncdata, Px, 0,0 },
{ APCDATA, ypcdata, Px, 0,0 },
+ { ACHECKNIL },
+ { AFATVARDEF },
{ AEND },
0