go/src/cmd/compile/internal/gc
Heschi Kreinick 0b6b5641d7 cmd/compile: use correct stack slots in location lists
When variables need to be spilled to the stack, they usually get their
own stack slot. Local variables have a slot allocated if they need one,
and arguments start out on the stack. Before this CL, the debug
information made the assumption that this was always the case, and so
didn't bother storing an actual stack offset during SSA analysis.

There's at least one case where this isn't true: variables that alias
arguments. Since the argument is the source of the variable, the
variable will begin its life on the stack in the argument's stack slot,
not its own. Therefore the debug info needs to track the actual stack
slot for each location entry.

No detectable performance change, despite the O(N) loop in getHomeSlot.

Change-Id: I2701adb7eddee17d4524336cb7aa6786e8f32b46
Reviewed-on: https://go-review.googlesource.com/67231
Reviewed-by: Alessandro Arzilli <alessandro.arzilli@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
2017-10-03 19:19:46 +00:00
..
builtin all: remove some double spaces from comments 2017-08-26 15:09:09 +00:00
testdata cmd/compile: fix regression in PPC64.rules move zero 2017-09-26 14:06:06 +00:00
alg.go cmd/compile: remove some unused params in gc 2017-08-09 22:29:19 +00:00
align.go cmd/compile: fix compiler crash on recursive types 2017-09-18 21:49:43 +00:00
asm_test.go cmd/compile: add s390x intrinsics for Ceil, Floor, Round and Trunc 2017-09-20 10:01:35 +00:00
bexport.go cmd/compile: simplify a few bits of the code 2017-09-28 20:40:17 +00:00
bimport.go cmd/compile: remove {Mark,Pop}dcl calls in bimport 2017-09-20 17:03:52 +00:00
bitset.go cmd/compile: minor cleanup 2017-04-26 18:01:14 +00:00
bootstrap.go cmd/compile: add mutex profiling support 2017-04-05 22:10:54 +00:00
builtin.go cmd/compile: generate makemap calls with int arguments 2017-08-22 20:28:21 +00:00
builtin_test.go all: use testing.GoToolPath instead of "go" 2016-08-30 22:49:11 +00:00
bv.go cmd/compile/internal/gc: unexport global constants 2017-09-23 20:11:30 +00:00
class_string.go cmd/compile: make Class a Stringer 2017-04-30 16:26:09 +00:00
closure.go cmd/compile: add Type.NumResults and friends 2017-08-28 22:42:57 +00:00
const.go cmd/compile: refactor some more gotos away 2017-09-25 06:51:53 +00:00
constFold_test.go cmd/compile: use std "DO NOT EDIT" comment for generated files 2017-03-31 18:50:40 +00:00
dcl.go cmd/compile: add intrinsic for reading caller's pc 2017-09-22 18:37:03 +00:00
esc.go cmd/compile/internal/gc: unexport global constants 2017-09-23 20:11:30 +00:00
export.go cmd/compile: remove global bout variable 2017-09-05 19:59:21 +00:00
fixedbugs_test.go cmd/compile: inline convT2{I,E} when result doesn't escape 2016-09-19 02:37:08 +00:00
float_test.go cmd/compile: test constant folded integer to/from float conversions 2017-09-16 09:17:58 +00:00
fmt.go cmd/compile: eliminate OXFALL 2017-09-19 18:08:50 +00:00
gen.go cmd/compile: merge tempnamel into tempAt 2017-08-28 22:46:30 +00:00
global_test.go all: use testing.GoToolPath instead of "go" 2016-08-30 22:49:11 +00:00
go.go cmd/compile/internal/gc: unexport global constants 2017-09-23 20:11:30 +00:00
gsubr.go cmd/compile: remove some redundant types in decls 2017-09-17 09:51:38 +00:00
iface_test.go cmd/compile: inline convT2{I,E} when result doesn't escape 2016-09-19 02:37:08 +00:00
init.go cmd/compile: add Type.NumResults and friends 2017-08-28 22:42:57 +00:00
inl.go cmd/compile/internal/gc: better inliner diagnostics 2017-09-20 21:38:06 +00:00
inl_test.go cmd/compile: add reflect to TestIntendedInlining 2017-09-28 21:09:46 +00:00
lex.go cmd/internal/objabi: extract shared functionality from obj 2017-04-19 00:00:09 +00:00
lex_test.go cmd/compile: provide line number for cgo directive error (fix a TODO) 2017-02-02 21:24:50 +00:00
logic_test.go cmd/compile: add tests for logical simplification rewrite rules 2016-05-26 22:16:52 +00:00
main.go all: prefer strings.IndexByte over strings.Index 2017-09-25 17:35:41 +00:00
mkbuiltin.go cmd/compile: factor out Pkg, Sym, and Type into package types 2017-04-07 03:04:00 +00:00
mpfloat.go cmd/compile: better errors for float constants with large exponents 2017-05-08 22:56:10 +00:00
mpint.go cmd/compile: use Fatalf for more internal errors 2017-03-14 17:58:38 +00:00
noder.go all: prefer strings.IndexByte over strings.Index 2017-09-25 17:35:41 +00:00
norace.go cmd/compile: randomize compilation order when race-enabled 2017-04-27 19:27:22 +00:00
obj.go cmd/compile,cmd/link: export int global consts to DWARF 2017-09-22 17:44:50 +00:00
opnames.go cmd/compile: eliminate OXFALL 2017-09-19 18:08:50 +00:00
order.go cmd/compile: eliminate OXFALL 2017-09-19 18:08:50 +00:00
pgen.go cmd/compile: use correct stack slots in location lists 2017-10-03 19:19:46 +00:00
pgen_test.go cmd/compile: move Used from gc.Node to gc.Name 2017-04-27 22:58:13 +00:00
phi.go cmd/compile: tweaks to unindent some code 2017-08-17 07:57:19 +00:00
plive.go all: prefer strings.IndexByte over strings.Index 2017-09-25 17:35:41 +00:00
pprof.go cmd/compile: add mutex profiling support 2017-04-05 22:10:54 +00:00
race.go cmd/compile: randomize compilation order when race-enabled 2017-04-27 19:27:22 +00:00
racewalk.go cmd/compile: refactor some more gotos away 2017-09-25 06:51:53 +00:00
range.go cmd/compile: improve single blank variable handling in walkrange 2017-09-12 05:50:54 +00:00
reflect.go cmd/compile: remove a few unnecessary gotos 2017-09-22 16:55:47 +00:00
reflect_test.go cmd/internal/obj: add SortSlice 2017-04-11 20:29:04 +00:00
reproduciblebuilds_test.go cmd/compile: make builds reproducible in presence of **byte and **int8 2017-05-09 21:15:12 +00:00
scope.go [dev.debug] cmd/compile: rename dwarf.Var.Offset to StackOffset 2017-07-25 19:33:14 +00:00
scope_test.go cmd/compile: fix lexical block of captured variables 2017-09-15 21:02:59 +00:00
select.go cmd/compile: move Node.Typecheck to flags 2017-04-26 01:27:28 +00:00
shift_test.go cmd/compile: test non-constant shifts 2016-06-01 00:06:00 +00:00
sinit.go cmd/compile: simplify a few bits of the code 2017-09-28 20:40:17 +00:00
sizeof_test.go [dev.debug] cmd/compile: better DWARF with optimizations on 2017-07-27 20:19:44 +00:00
ssa.go cmd/compile: fix merge rules for panic calls 2017-10-03 09:27:37 +00:00
ssa_test.go cmd/compile: fix s390x unsigned comparison constant merging rules 2017-04-13 18:35:11 +00:00
subr.go cmd/compile: remove a few unnecessary gotos 2017-09-22 16:55:47 +00:00
swt.go go/printer: fix formatting of three-index slice expression 2017-10-03 16:16:30 +00:00
swt_test.go cmd/compile: reduce reliance on implementation details of Mpint 2017-04-07 17:08:34 +00:00
syntax.go cmd/compile: cleanup toolstash pacifier from OXFALL removal 2017-09-19 18:20:29 +00:00
timings.go cmd/compile: add compiler phase timing 2016-08-17 17:27:04 +00:00
trace.go cmd/compile/internal/gc: add runtime/trace support 2016-10-12 13:57:26 +00:00
truncconst_test.go cmd/compile: diagnose constant division by complex zero 2017-04-12 17:29:28 +00:00
typecheck.go cmd/compile: simplify a few bits of the code 2017-09-28 20:40:17 +00:00
types.go cmd/compile/internal/types: remove Cmptmp 2017-04-07 22:11:36 +00:00
types_acc.go cmd/compile: factor out Pkg, Sym, and Type into package types 2017-04-07 03:04:00 +00:00
universe.go cmd/compile: simplify exporting universal 'error' type 2017-09-06 20:14:17 +00:00
unsafe.go cmd/compile: handle unsafe builtins like universal builtins 2016-10-18 22:34:44 +00:00
util.go cmd/compile: add mutex profiling support 2017-04-05 22:10:54 +00:00
walk.go cmd/compile: fix print/println when input is uint 2017-09-26 04:08:38 +00:00