]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/ssa: track stack-only vars
authorHeschi Kreinick <heschi@google.com>
Tue, 13 Mar 2018 20:14:52 +0000 (16:14 -0400)
committerDavid Chase <drchase@google.com>
Wed, 14 Mar 2018 20:52:29 +0000 (20:52 +0000)
commit44e65f2c94bbae463314382fd77ce690c81b413e
tree7fc4f552fe4a86637dec51aefb50e17fe73a2b54
parentaff222cd185d10400b9177fe26ec06eb647b092d
cmd/compile/internal/ssa: track stack-only vars

User variables that cannot be SSA'd, either because their addresses are
taken or because they are too large for the decomposition heuristic, do
not explicitly appear as operands of SSA values. Instead they are written
to directly via the stack pointer.

This hid them from the location list generation, which is only
interested in the named value table. Fortunately, the lifetime of
stack-only variables is delineated by VarDef/VarKill ops, and it's easy
enough to turn those into location list bounds.

One wrinkle: stack frame information is not explicitly available in the
SSA phases, because it's owned by the frontend in AllocFrame. It would
be easier if the set of live LocalSlots were returned by that, but this
is the minimal change to fix missing variables. Or VarDef/VarKills
could appear in NamedValues, which would make this change even easier.

Change-Id: Ice6654dad6f9babb0286e95c7ec28594561dc91f
Reviewed-on: https://go-review.googlesource.com/100458
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/ssa/debug.go