mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.ssa] cmd/compile: store bools in AuxInt
Store bools in AuxInt to reduce allocations. Change-Id: Ibd26db67fca5e1e2803f53d7ef094897968b704b Reviewed-on: https://go-review.googlesource.com/14276 Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
d9f2cafb50
commit
991036aef3
10 changed files with 156 additions and 151 deletions
|
|
@ -17,7 +17,7 @@ func TestDeadLoop(t *testing.T) {
|
|||
// dead loop
|
||||
Bloc("deadblock",
|
||||
// dead value in dead block
|
||||
Valu("deadval", OpConstBool, TypeBool, 0, true),
|
||||
Valu("deadval", OpConstBool, TypeBool, 1, nil),
|
||||
If("deadval", "deadblock", "exit")))
|
||||
|
||||
CheckFunc(fun.f)
|
||||
|
|
@ -63,7 +63,7 @@ func TestNeverTaken(t *testing.T) {
|
|||
c := testConfig(t)
|
||||
fun := Fun(c, "entry",
|
||||
Bloc("entry",
|
||||
Valu("cond", OpConstBool, TypeBool, 0, false),
|
||||
Valu("cond", OpConstBool, TypeBool, 0, nil),
|
||||
Valu("mem", OpArg, TypeMem, 0, ".mem"),
|
||||
If("cond", "then", "else")),
|
||||
Bloc("then",
|
||||
|
|
@ -99,7 +99,7 @@ func TestNestedDeadBlocks(t *testing.T) {
|
|||
fun := Fun(c, "entry",
|
||||
Bloc("entry",
|
||||
Valu("mem", OpArg, TypeMem, 0, ".mem"),
|
||||
Valu("cond", OpConstBool, TypeBool, 0, false),
|
||||
Valu("cond", OpConstBool, TypeBool, 0, nil),
|
||||
If("cond", "b2", "b4")),
|
||||
Bloc("b2",
|
||||
If("cond", "b3", "b4")),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue