cmd/compile: try and access last argument first in rulegen
This reduces the number of extra bounds check hints we need to insert. For example, rather than producing: _ = v.Args[2] x := v.Args[0] y := v.Args[1] z := v.Args[2] We now produce: z := v.Args[2] x := v.Args[0] y := v.Args[1] This gets rid of about 7000 lines of code from the rewrite rules. Change-Id: I1291cf0f82e8d035a6d65bce7dee6cedee04cbcd Reviewed-on: https://go-review.googlesource.com/c/go/+/167397Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Showing
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment