Passes toolstash-check.
Change-Id: I3005210cc156d01a6ac1ccaafb4311c607681bf0
Reviewed-on: https://go-review.googlesource.com/c/go/+/229691
Reviewed-by: Keith Randall <khr@golang.org>
(Store {t5} (OffPtr <tt5> [o5] dst) d4
(Zero {t1} [n] dst mem)))))
-(StaticCall {sym} x) && needRaceCleanup(sym,v) -> x
+(StaticCall {sym} x) && needRaceCleanup(sym, v) => x
// Collapse moving A -> B -> C into just A -> C.
// Later passes (deadstore, elim unread auto) will remove the A -> B move, if possible.
}
// needRaceCleanup reports whether this call to racefuncenter/exit isn't needed.
-func needRaceCleanup(sym interface{}, v *Value) bool {
+func needRaceCleanup(sym Sym, v *Value) bool {
f := v.Block.Func
if !f.Config.Race {
return false
}
- if !isSameSym(sym, "runtime.racefuncenter") && !isSameSym(sym, "runtime.racefuncexit") {
+ if !symNamed(sym, "runtime.racefuncenter") && !symNamed(sym, "runtime.racefuncexit") {
return false
}
for _, b := range f.Blocks {
return true
}
// match: (StaticCall {sym} x)
- // cond: needRaceCleanup(sym,v)
+ // cond: needRaceCleanup(sym, v)
// result: x
for {
- sym := v.Aux
+ sym := auxToSym(v.Aux)
x := v_0
if !(needRaceCleanup(sym, v)) {
break