]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use existing instructions instead of nops for inline marks
authorKeith Randall <khr@google.com>
Tue, 15 Jan 2019 22:50:09 +0000 (14:50 -0800)
committerKeith Randall <khr@golang.org>
Mon, 25 Mar 2019 16:49:29 +0000 (16:49 +0000)
commit2034fbab5b1d11bc59cb476bc3f49ee1b344839d
tree3143f410b8c335b1cdac7b61bf1672183fdbbddb
parent88adc33827f1e01953a6a3f40d927a2b7efcce3e
cmd/compile: use existing instructions instead of nops for inline marks

Instead of always inserting a nop to use as the target of an inline
mark, see if we can instead find an instruction we're issuing anyway
with the correct line number, and use that instruction. That way, we
don't need to issue a nop.

Makes cmd/go 0.3% smaller.

Update #29571

Change-Id: If6cfc93ab3352ec2c6e0878f8074a3bf0786b2f8
Reviewed-on: https://go-review.googlesource.com/c/go/+/158021
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
misc/cgo/test/callback.go
src/cmd/compile/internal/gc/dwinl.go
src/cmd/compile/internal/gc/ssa.go
src/cmd/internal/src/pos.go
src/cmd/internal/src/xpos.go