David Chase has uploaded this change for review.
cmd/compile: enable CSE of pure calls.
Change-Id: Ifbd2c42d08e6a11fae93b355dd858685a7745084
---
M src/cmd/compile/internal/ssa/cse.go
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/cmd/compile/internal/ssa/cse.go b/src/cmd/compile/internal/ssa/cse.go
index d649797..53f315d 100644
--- a/src/cmd/compile/internal/ssa/cse.go
+++ b/src/cmd/compile/internal/ssa/cse.go
@@ -310,7 +310,16 @@
}
}
- if v.Aux != w.Aux {
+ if v.Op == OpPureLECall {
+ va := v.Aux.(*AuxCall)
+ wa := w.Aux.(*AuxCall)
+ if va.Fn.Name != wa.Fn.Name {
+ if va.Fn.Name < wa.Fn.Name {
+ return types.CMPlt
+ }
+ return types.CMPgt
+ }
+ } else if v.Aux != w.Aux {
if v.Aux == nil {
return types.CMPlt
}
To view, visit change 533266. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: David Chase, Keith Randall, Martin Möhrmann.
David Chase uploaded patch set #2 to this change.
The following approvals got outdated and were removed: Run-TryBot+1 by David Chase, TryBot-Result-1 by Gopher Robot
cmd/compile: enable CSE of const calls.
Change-Id: Ifbd2c42d08e6a11fae93b355dd858685a7745084
---
M src/cmd/compile/internal/ssa/cse.go
1 file changed, 10 insertions(+), 1 deletion(-)
To view, visit change 533266. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: David Chase, Martin Möhrmann.
Patch set 2:Code-Review +2
Attention is currently required from: David Chase, Martin Möhrmann.
Patch set 3:Code-Review +1
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |