]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: adjust Pos setting for "empty" blocks
authorDavid Chase <drchase@google.com>
Sun, 29 Oct 2017 15:53:18 +0000 (11:53 -0400)
committerDavid Chase <drchase@google.com>
Wed, 8 Nov 2017 22:39:49 +0000 (22:39 +0000)
commita042221cdb9eb8b11240311057ff274e26b53165
treeed99b9dbd6f95f1c1b265ed53a9592ab8b6813d2
parent96cd66b266a24d8ed1f66dfa10ddb86d88b50fca
cmd/compile: adjust Pos setting for "empty" blocks

Plain blocks that contain only uninteresting instructions
(that do not have reliable Pos information themselves)
need to have their Pos left unset so that they can
inherit it from their successors.  The "uninteresting"
test was not properly applied and not properly defined.
OpFwdRef does not appear in the ssa.html debugging output,
but at the time of the test these instructions did appear,
and it needs to be part of the test.

Fixes #22365.

Change-Id: I99e5b271acd8f6bcfe0f72395f905c7744ea9a02
Reviewed-on: https://go-review.googlesource.com/74252
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/ssa/block.go
src/cmd/compile/internal/ssa/testdata/hist.dbg-dlv.nexts
src/cmd/compile/internal/ssa/testdata/hist.dbg-gdb.nexts
src/cmd/compile/internal/ssa/testdata/hist.opt-gdb.nexts
src/cmd/compile/internal/ssa/value.go
test/fixedbugs/issue18902.go