]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: factor out code to remove phi argument
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Sun, 24 Oct 2021 06:46:54 +0000 (13:46 +0700)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Mon, 25 Oct 2021 03:00:02 +0000 (03:00 +0000)
commit7b554575e46d1df9b68f71e051c8133aaf953fb7
tree460fbb466f8ef5bb385033a717995bd284d54bc6
parentf686f6a963cdfa66b6087993663f53a10272d262
cmd/compile: factor out code to remove phi argument

CL 358117 fixed a bug that Phi's argument wasn't updated correctly after
removing a predecessor of Block. This CL factor out the code that
updates phi argument into a Block's method, so it's easier to use,
maintain and hopefully prevent that kind of bug in the future.

Change-Id: Ie9741e19ea28f56860425089b6093a381aa10f5b
Reviewed-on: https://go-review.googlesource.com/c/go/+/357964
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/block.go
src/cmd/compile/internal/ssa/critical.go
src/cmd/compile/internal/ssa/deadcode.go
src/cmd/compile/internal/ssa/fuse_branchredirect.go
src/cmd/compile/internal/ssa/shortcircuit.go