...
1
2
3
4
5 package ssa
6
7 import "cmd/compile/internal/logopt"
8
9
10
11
12
13 func checkbce(f *Func) {
14 if f.pass.debug <= 0 && !logopt.Enabled() {
15 return
16 }
17
18 for _, b := range f.Blocks {
19 for _, v := range b.Values {
20 if v.Op == OpIsInBounds || v.Op == OpIsSliceInBounds {
21 if f.pass.debug > 0 {
22 f.Warnl(v.Pos, "Found %v", v.Op)
23 }
24 if logopt.Enabled() {
25 if v.Op == OpIsInBounds {
26 logopt.LogOpt(v.Pos, "isInBounds", "checkbce", f.Name)
27 }
28 if v.Op == OpIsSliceInBounds {
29 logopt.LogOpt(v.Pos, "isSliceInBounds", "checkbce", f.Name)
30 }
31 }
32 }
33 }
34 }
35 }
36
View as plain text