]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: don't emit write barriers for *tmp if tmp=&PAUTO
authorDmitry Vyukov <dvyukov@google.com>
Mon, 26 Jan 2015 14:19:00 +0000 (17:19 +0300)
committerDmitry Vyukov <dvyukov@google.com>
Tue, 27 Jan 2015 18:09:29 +0000 (18:09 +0000)
commita7bb393628cbd6c5934e4bc34a45e1f0eabc908e
treef1d476a3680bf654965c0d11a2dbe765d7cf9aa1
parent9a36beb2afa7291d705213cdee4e8aa6c5b6aeb7
cmd/gc: don't emit write barriers for *tmp if tmp=&PAUTO

This is another case where we can say that the address refers to stack.
We create such temps for OSTRUCTLIT initialization.

This eliminates a handful of write barriers today.
But this come up a prerequisite for another change (capturing vars by value),
otherwise we emit writebarriers in writebarrier itself when
capture writebarrier arguments by value.

Change-Id: Ibba93acd0f5431c5a4c3d90ef1e622cb9a7ff50e
Reviewed-on: https://go-review.googlesource.com/3285
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/gc/typecheck.c
src/cmd/gc/walk.c