mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: use ISEL, cleanup use of zero & extensions
Abandoned earlier efforts to expose zero register, but left it in numbering to decrease squirrelyness of register allocator. ISELrelOp used in code generation of bool := x relOp y. Some patterns added to better elide zero case and some sign extension. Updates: #17109 Change-Id: Ida7839f0023ca8f0ffddc0545f0ac269e65b05d9 Reviewed-on: https://go-review.googlesource.com/29380 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
parent
dcbbd319e9
commit
cddddbc623
12 changed files with 826 additions and 543 deletions
|
|
@ -356,6 +356,15 @@ func clobber(v *Value) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
// noteRule is an easy way to track if a rule is matched when writing
|
||||
// new ones. Make the rule of interest also conditional on
|
||||
// noteRule("note to self: rule of interest matched")
|
||||
// and that message will print when the rule matches.
|
||||
func noteRule(s string) bool {
|
||||
println(s)
|
||||
return true
|
||||
}
|
||||
|
||||
// logRule logs the use of the rule s. This will only be enabled if
|
||||
// rewrite rules were generated with the -log option, see gen/rulegen.go.
|
||||
func logRule(s string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue