cmd/compile: merge sequential memory moves into bigger memory moves #25866
Labels
Milestone
Comments
We've tried this in https://go-review.googlesource.com/c/go/+/57130 but it caused performance regression #23424 and had to be reverted |
@TocarIP , probably, the CL must be restricted only to aligned load / store pairs as noted by @ulikunitz at #23424 (comment) ? Now we can avoid regressions from #23424 by testing the CL against benchmarks from the issue. |
/cc @josharian @mdempsky |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The issue
Go tip compiles the following code into the following assembly:
The assembly copies sequential stack arguments from
fff
toIndexByte
using the following instructions:These instructions may be substituted by shorter (and, probably, faster) assembly:
Solution
Add the corresponding arch-specific rewrite rules for merging sequential memory moves into bigger memory moves
cc'ing @randall77 and @TocarIP .
The text was updated successfully, but these errors were encountered: