aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/shortcircuit.go
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2017-03-17 16:04:46 -0700
committerJosh Bleecher Snyder <josharian@gmail.com>2017-03-19 00:21:23 +0000
commitaea3aff66911e31cba9eddd93c02eb591ae483bf (patch)
tree62e215c0d47ab16717a8d8512f1d2a36425f9fe2 /src/cmd/compile/internal/ssa/shortcircuit.go
parent2c397c7a753963494ce5dd5d7eda471354074698 (diff)
downloadgo-aea3aff66911e31cba9eddd93c02eb591ae483bf.tar.gz
go-aea3aff66911e31cba9eddd93c02eb591ae483bf.zip
cmd/compile: separate ssa.Frontend and ssa.TypeSource
Prior to this CL, the ssa.Frontend field was responsible for providing types to the backend during compilation. However, the types needed by the backend are few and static. It makes more sense to use a struct for them and to hang that struct off the ssa.Config, which is the correct home for readonly data. Now that Types is a struct, we can clean up the names a bit as well. This has the added benefit of allowing early construction of all types needed by the backend. This will be useful for concurrent backend compilation. Passes toolstash-check -all. No compiler performance change. Updates #15756 Change-Id: I021658c8cf2836d6a22bbc20cc828ac38c7da08a Reviewed-on: https://go-review.googlesource.com/38336 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/shortcircuit.go')
-rw-r--r--src/cmd/compile/internal/ssa/shortcircuit.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/ssa/shortcircuit.go b/src/cmd/compile/internal/ssa/shortcircuit.go
index d5dfdefbb8..54e186980d 100644
--- a/src/cmd/compile/internal/ssa/shortcircuit.go
+++ b/src/cmd/compile/internal/ssa/shortcircuit.go
@@ -17,8 +17,8 @@ func shortcircuit(f *Func) {
// x = phi(a, ...)
//
// We can replace the "a" in the phi with the constant true.
- ct := f.ConstBool(f.Entry.Pos, f.fe.TypeBool(), true)
- cf := f.ConstBool(f.Entry.Pos, f.fe.TypeBool(), false)
+ ct := f.ConstBool(f.Entry.Pos, f.Config.Types.Bool, true)
+ cf := f.ConstBool(f.Entry.Pos, f.Config.Types.Bool, false)
for _, b := range f.Blocks {
for _, v := range b.Values {
if v.Op != OpPhi {