1
0
mirror of https://github.com/golang/go synced 2024-10-05 07:21:25 -06:00
go/src/cmd
Keith Randall 7d9f1067d1 [dev.ssa] cmd/compile: better register allocator
Reorder how register & stack allocation is done.  We used to allocate
registers, then fix up merge edges, then allocate stack slots.  This
lead to lots of unnecessary copies on merge edges:

v2 = LoadReg v1
v3 = StoreReg v2

If v1 and v3 are allocated to the same stack slot, then this code is
unnecessary.  But at regalloc time we didn't know the homes of v1 and
v3.

To fix this problem, allocate all the stack slots before fixing up the
merge edges.  That way, we know what stack slots values use so we know
what copies are required.

Use a good technique for shuffling values around on merge edges.

Improves performance of the go1 TimeParse benchmark by ~12%

Change-Id: I731f43e4ff1a7e0dc4cd4aa428fcdb97812b86fa
Reviewed-on: https://go-review.googlesource.com/17915
Reviewed-by: David Chase <drchase@google.com>
2015-12-21 23:12:05 +00:00
..
addr2line
api net/http: enable automatic HTTP/2 if TLSNextProto is nil 2015-10-14 23:21:57 +00:00
asm cmd/asm: added support for GOARCH=mips64{,le} 2015-11-12 04:43:42 +00:00
cgo cmd/cgo: added support for GOARCH=mips64{,le} 2015-11-12 04:45:54 +00:00
compile [dev.ssa] cmd/compile: better register allocator 2015-12-21 23:12:05 +00:00
cover
dist [dev.ssa] Merge remote-tracking branch 'origin/master' into mergebranch 2015-11-16 17:19:42 -08:00
doc cmd/doc: fix pretty printing of paths 2015-09-29 02:18:57 +00:00
fix cmd/fix: add gotypes module 2015-07-17 01:47:14 +00:00
go cmd/go: set buildmode=pie default for android/arm64. 2015-11-16 18:32:57 +00:00
gofmt go/format: handle whitespace-only input correctly 2015-09-30 16:39:43 +00:00
internal [dev.ssa] Merge remote-tracking branch 'origin/master' into mergebranch 2015-11-16 17:19:42 -08:00
link cmd/link: work around arm64 linker bugs with GOT relocations against local symbols 2015-11-15 23:40:59 +00:00
newlink cmd/internal/obj/mips: added support for GOARCH=mips64{,le} 2015-11-12 04:42:44 +00:00
nm
objdump cmd/objdump: skip TestDisasm* for mips64{,le} 2015-09-10 18:27:09 +00:00
pack
pprof cmd/pprof: fix race between viewer and web command 2015-07-23 03:51:39 +00:00
trace cmd/trace: don't fail when no browser is available 2015-08-21 20:02:23 +00:00
vendor cmd/vendor/golang.org/x/arch: import arm/armasm and x86/x86asm 2015-08-28 16:34:30 +00:00
vet cmd/vet: use testenv 2015-11-04 15:59:10 +00:00
yacc cmd/yacc: fix copying action code when line comment is disabled 2015-10-04 01:36:03 +00:00