summaryrefslogtreecommitdiff
path: root/src/cmd/8c/peep.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2012-05-02 16:22:56 -0400
committerRuss Cox <rsc@golang.org>2012-05-02 16:22:56 -0400
commit3211f96b14cdebfc6988c9d8b56d4e9c9a8b849e (patch)
tree86d169d576d4c0cc873be6c8dd5a13e242495663 /src/cmd/8c/peep.c
parent047f2682ed40839fb88158f57c1db0518ffa5310 (diff)
downloadgo-3211f96b14cdebfc6988c9d8b56d4e9c9a8b849e.tar.gz
cmd/cc: add PREFETCH built-in (like SET, USED)
This makes it possible to inline the prefetch of upcoming memory addresses during garbage collection, instead of needing to flush registers, make a function call, and reload registers. On garbage collection-heavy workloads, this results in a 5% speedup. Fixes issue 3493. R=dvyukov, ken, r, dave CC=golang-dev http://codereview.appspot.com/5990066
Diffstat (limited to 'src/cmd/8c/peep.c')
-rw-r--r--src/cmd/8c/peep.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cmd/8c/peep.c b/src/cmd/8c/peep.c
index 9511a5579..9c3e9a5af 100644
--- a/src/cmd/8c/peep.c
+++ b/src/cmd/8c/peep.c
@@ -602,6 +602,12 @@ copyu(Prog *p, Adr *v, Adr *s)
case ACMPL: /* read only */
case ACMPW:
case ACMPB:
+
+ case APREFETCHT0:
+ case APREFETCHT1:
+ case APREFETCHT2:
+ case APREFETCHNTA:
+
case AFCOMB:
case AFCOMBP: