mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.ssa] cmd/compile/internal/ssa: handle rewrite of Phis.
* Phis can have variable number of arguments, but rulegen assumed that
each operation has fixed number of arguments.
* Rewriting Phis is necessary to handle the following case:
func f1_ssa(a bool, x int) int {
v := 0
if a {
v = -1
} else {
v = -1
}
return x|v
}
Change-Id: Iff6bd411b854f3d1d6d3ce21934bf566757094f2
Reviewed-on: https://go-review.googlesource.com/19412
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
7f7f7cddec
commit
d0d04d2d6c
6 changed files with 140 additions and 2 deletions
|
|
@ -32,6 +32,7 @@ type opData struct {
|
|||
typ string // default result type
|
||||
aux string
|
||||
rematerializeable bool
|
||||
variableLength bool // if true the operation has a variable number of arguments
|
||||
}
|
||||
|
||||
type blockData struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue