https://go-review.googlesource.com/37157 introduced a bug that caused some live φ-nodes to be removed from the CFG. The cause was that reachability traversal considered edges only among "new" φ-nodes (those introduced during SSA renaming) but not existing φ-nodes from && and || expressions. The fix is to mark existing phis, and thus other phis reachable from them, as live. We also clear the Phi.block field when eliminating a φ-node. Also, during reachability, we treat DebugRef instructions as roots like any other non-Phi instruction. This eliminates a related known bug whereby the operand of a DebugRef may be a dead φ. This change also adds a sanity check that all operands of an SSA value that are themselves instructions must belong to a block. The sanity check would fail 7 times on the standard library without the fix. Fixes golang/go#19622 Change-Id: If3a897a6a593a17bc3f0f8228d1edf483be7a3d0 Reviewed-on: https://go-review.googlesource.com/45832 Run-TryBot: Dominik Honnef <dominik@honnef.co> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dominik Honnef <dominik@honnef.co> |
||
|---|---|---|
| benchmark/parse | ||
| blog | ||
| cmd | ||
| container/intsets | ||
| cover | ||
| go | ||
| godoc | ||
| imports | ||
| playground | ||
| present | ||
| refactor | ||
| third_party | ||
| .gitattributes | ||
| .gitignore | ||
| AUTHORS | ||
| CONTRIBUTING.md | ||
| CONTRIBUTORS | ||
| LICENSE | ||
| PATENTS | ||
| README | ||
| codereview.cfg | ||
README
This subrepository holds the source for various packages and tools that support the Go programming language. Some of the tools, godoc and vet for example, are included in binary Go distributions. Others, including the Go guru and the test coverage tool, can be fetched with "go get". Packages include a type-checker for Go and an implementation of the Static Single Assignment form (SSA) representation for Go programs. To submit changes to this repository, see http://golang.org/doc/contribute.html.