cmd/compile: allow OpVarXXX calls to be duplicated in writebarrier blocks
cmd/compile: allow OpVarXXX calls to be duplicated in writebarrier blocks

OpVarXXX Values don't generate instructions,
so there's no reason not to duplicate them,
and duplicating them generates better code
(fewer branches).

This requires changing the start/end accounting
to correctly handle the case in which we have run
of Values beginning with an OpVarXXX, e.g.
OpVarDef, OpZeroWB, OpMoveWB.
In that case, the sequence of values should begin
at the OpZeroWB, not the OpVarDef.

This also lays the groundwork for experimenting
with allowing duplication of some scalar stores.

Shrinks function text sizes a tiny amount:

name        old object-bytes  new object-bytes  delta
Template           381k ± 0%         381k ± 0%  -0.01%  (p=0.008 n=5+5)
Unicode            203k ± 0%         203k ± 0%  -0.04%  (p=0.008 n=5+5)
GoTypes           1.17M ± 0%        1.17M ± 0%  -0.01%  (p=0.008 n=5+5)
SSA               8.24M ± 0%        8.24M ± 0%  -0.00%  (p=0.008 n=5+5)
Flate              230k ± 0%         230k ± 0%    ~     (all equal)
GoParser           286k ± 0%         286k ± 0%    ~     (all equal)
Reflect           1.00M ± 0%        1.00M ± 0%    ~     (all equal)
Tar                189k ± 0%         189k ± 0%    ~     (all equal)
XML                415k ± 0%         415k ± 0%  -0.01%  (p=0.008 n=5+5)

Updates #19838

Change-Id: Ic5ef30855919f1468066eba08ae5c4bd9a01db27
Reviewed-on: https://go-review.googlesource.com/42011
Run-TryBot: Josh Bleecher Snyder <cdc248cc4d32e4fbfe04e45228163bcecd48a0b9@gmail.com>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Cherry Zhang <d62e63aa42ce272d7b6a5055d97e942b33a34679@google.com>

josharian/go,codestation/go,akutz/go,vsekhar/elastic-go,polyverse-security/go,ImJasonH/go,nawawi/go,akutz/go,derekmarcotte/go,akutz/go,Cofyc/go,akutz/go,nawawi/go,derekmarcotte/go,codestation/go,CAFxX/go,codestation/go,polyverse-security/go,cloudflare/go,cloudflare/go,cloudflare/go,cloudflare/go,josharian/go,codestation/go,Cofyc/go,codestation/go,vsekhar/elastic-go,derekmarcotte/go,nawawi/go,josharian/go,CAFxX/go,vsekhar/elastic-go,vsekhar/elastic-go,cloudflare/go,nawawi/go,CAFxX/go,CAFxX/go,polyverse-security/go,ImJasonH/go,codestation/go,golang/go,golang/go,nawawi/go,josharian/go,polyverse-security/go,christopher-henderson/Go,Cofyc/go,CAFxX/go,akutz/go,golang/go,nawawi/go,polyverse-security/go,derekmarcotte/go,Cofyc/go,CAFxX/go,derekmarcotte/go,vsekhar/elastic-go,golang/go,derekmarcotte/go,golang/go,Cofyc/go,ImJasonH/go,akutz/go,codestation/go,polyverse-security/go,derekmarcotte/go,ImJasonH/go,vsekhar/elastic-go,akutz/go,nawawi/go,josharian/go,golang/go,vsekhar/elastic-go,josharian/go,akutz/go,Cofyc/go,CAFxX/go,cloudflare/go,derekmarcotte/go,polyverse-security/go,codestation/go,vsekhar/elastic-go,ImJasonH/go,polyverse-security/go,cloudflare/go,ImJasonH/go,josharian/go,CAFxX/go,nawawi/go,josharian/go,Cofyc/go,golang/go,ImJasonH/go,Cofyc/go,golang/go,cloudflare/go,ImJasonH/go