diff options
author | Josh Bleecher Snyder <josharian@gmail.com> | 2017-03-16 22:42:10 -0700 |
---|---|---|
committer | Josh Bleecher Snyder <josharian@gmail.com> | 2017-03-17 23:18:57 +0000 |
commit | 2cdb7f118ab86adb6fef5485d96831df3446b747 (patch) | |
tree | 646fbcb5434a3efd5ded903b36cef37c0c4ac3ad /src/cmd/compile/internal/ssa/phiopt.go | |
parent | 193510f2f6a0d01bb03595ba12dd2b05109980e3 (diff) | |
download | go-2cdb7f118ab86adb6fef5485d96831df3446b747.tar.gz go-2cdb7f118ab86adb6fef5485d96831df3446b747.zip |
cmd/compile: move Frontend field from ssa.Config to ssa.Func
Suggested by mdempsky in CL 38232.
This allows us to use the Frontend field
to associate frontend state and information
with a function.
See the following CL in the series for examples.
This is a giant CL, but it is almost entirely routine refactoring.
The ssa test API is starting to feel a bit unwieldy.
I will clean it up separately, once the dust has settled.
Passes toolstash -cmp.
Updates #15756
Change-Id: I71c573bd96ff7251935fce1391b06b1f133c3caf
Reviewed-on: https://go-review.googlesource.com/38327
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/phiopt.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/phiopt.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/compile/internal/ssa/phiopt.go b/src/cmd/compile/internal/ssa/phiopt.go index d1b7cd53dd..60c8e58bd2 100644 --- a/src/cmd/compile/internal/ssa/phiopt.go +++ b/src/cmd/compile/internal/ssa/phiopt.go @@ -81,7 +81,7 @@ func phiopt(f *Func) { v.reset(ops[v.Args[reverse].AuxInt]) v.AddArg(b0.Control) if f.pass.debug > 0 { - f.Config.Warnl(b.Pos, "converted OpPhi to %v", v.Op) + f.Warnl(b.Pos, "converted OpPhi to %v", v.Op) } continue } @@ -97,7 +97,7 @@ func phiopt(f *Func) { v.reset(OpOrB) v.SetArgs2(b0.Control, tmp) if f.pass.debug > 0 { - f.Config.Warnl(b.Pos, "converted OpPhi to %v", v.Op) + f.Warnl(b.Pos, "converted OpPhi to %v", v.Op) } continue } @@ -113,7 +113,7 @@ func phiopt(f *Func) { v.reset(OpAndB) v.SetArgs2(b0.Control, tmp) if f.pass.debug > 0 { - f.Config.Warnl(b.Pos, "converted OpPhi to %v", v.Op) + f.Warnl(b.Pos, "converted OpPhi to %v", v.Op) } continue } @@ -169,6 +169,6 @@ func phioptint(v *Value, b0 *Block, reverse int) { f := b0.Func if f.pass.debug > 0 { - f.Config.Warnl(v.Block.Pos, "converted OpPhi bool -> int%d", v.Type.Size()*8) + f.Warnl(v.Block.Pos, "converted OpPhi bool -> int%d", v.Type.Size()*8) } } |