]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: remember names of values
authorKeith Randall <khr@golang.org>
Thu, 22 Oct 2015 21:22:38 +0000 (14:22 -0700)
committerKeith Randall <khr@golang.org>
Wed, 28 Oct 2015 17:00:31 +0000 (17:00 +0000)
commitc24681ae2e1c96bd67c149cffa8f5ed394e68453
tree901661939332bae3a55be8102da790778f1161e8
parentd43f2e37edf4115e31a0c9218d87182d0aa1c4f0
[dev.ssa] cmd/compile: remember names of values

For debugging, spill values to named variables instead of autotmp_
variables if possible.  We do this by keeping a name -> value map
for each function, keep it up-to-date during deadcode elim, and use
it to override spill decisions in stackalloc.

It might even make stack frames a bit smaller, as it makes it easy
to identify a set of spills which are likely not to interfere.

This just works for one-word variables for now.  Strings/slices
will be a separate CL.

Change-Id: Ie89eba8cab16bcd41b311c479ec46dd7e64cdb67
Reviewed-on: https://go-review.googlesource.com/16336
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/gc/closure.go
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/ssa/config.go
src/cmd/compile/internal/ssa/deadcode.go
src/cmd/compile/internal/ssa/decompose.go
src/cmd/compile/internal/ssa/export_test.go
src/cmd/compile/internal/ssa/func.go
src/cmd/compile/internal/ssa/location.go
src/cmd/compile/internal/ssa/stackalloc.go
src/cmd/compile/internal/ssa/value.go