]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: insert instrumentation more carefully in racewalk
authorDavid Chase <drchase@google.com>
Fri, 8 Apr 2016 17:33:43 +0000 (13:33 -0400)
committerDavid Chase <drchase@google.com>
Fri, 8 Apr 2016 21:06:39 +0000 (21:06 +0000)
commitc3b3e7b4ef9dff1fc0cc504f81465ded5663b4e4
treeedac194b41348cba0758e70007f08c7a2b9ab742
parent0fb7b4cccd02df10f239ed77d6d85566b6388b83
cmd/compile: insert instrumentation more carefully in racewalk

Be more careful about inserting instrumentation in racewalk.
If the node being instrumented is an OAS, and it has a non-
empty Ninit, then append instrumentation to the Ninit list
rather than letting it be inserted before the OAS (and the
compilation of its init list).  This deals with the case that
the Ninit list defines a variable used in the RHS of the OAS.

Fixes #15091.

Change-Id: Iac91696d9104d07f0bf1bd3499bbf56b2e1ef073
Reviewed-on: https://go-review.googlesource.com/21771
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: David Chase <drchase@google.com>
src/cmd/compile/internal/gc/fmt.go
src/cmd/compile/internal/gc/racewalk.go
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/ssa/regalloc.go
test/fixedbugs/issue15091.go [new file with mode: 0644]