]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: adjust is-statement on Pos's to improve debugging
authorDavid Chase <drchase@google.com>
Sat, 3 Mar 2018 01:33:15 +0000 (20:33 -0500)
committerDavid Chase <drchase@google.com>
Wed, 4 Apr 2018 22:14:59 +0000 (22:14 +0000)
commitb9a365681f57c8705bccbd6d3744afb9dc42eebb
treef90956e8d7367cc3393230b0f9e238d780793520
parentdead03b7947c79112ef6c2a91843d7b10e5ebcfe
cmd/compile: adjust is-statement on Pos's to improve debugging

Stores to auto tmp variables can be hoisted to places
where the line numbers make debugging look "jumpy".
Turning those instructions into ones with is_stmt = 0 in
the DWARF (accomplished by marking ssa nodes with NotStmt)
makes debugging look better while still attributing the
instructions with the correct line number.

The same is true for certain register allocator spills and
reloads.

Change-Id: I97a394eb522d4911cc40b4bf5bf76d3d7221f6c0
Reviewed-on: https://go-review.googlesource.com/98415
Run-TryBot: David Chase <drchase@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/ssa/regalloc.go
src/cmd/compile/internal/ssa/testdata/hist.gdb-opt.nexts
src/cmd/compile/internal/ssa/testdata/scopes.gdb-opt.nexts