-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Enable loop rotate when the header is exiting #79198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@swift-ci test |
6e027b5
to
0a1f79b
Compare
@swift-ci test |
@swift-ci build toolchain |
@swift-ci apple silicon benchmark |
0a1f79b
to
18c3d1c
Compare
@swift-ci test |
18c3d1c
to
38062b0
Compare
@swift-ci test |
Thank you! Yes, this is an important case. |
@swift-ci test windows platform |
@swift-ci test linux platform |
Did the benchmarks show any significant regressions? |
@eeckstein benchmark results - https://ci.swift.org/view/Pull%20Requests/job/swift-PR-macos-perf-apple-silicon/421/console
|
Hm, the code size regressions are about the improvements I saw when I added the restriction. |
I have not looked at this pass at all recently, but one strategy is to limit rotation to only hoist branches that are likely loop invariant, meaning the rotated condition will dominate the same loop condition. |
This was recently disabled but turns out to be an important case for loops with early exits.
Also fix a LoopRotate bug in ossa where an instruction producing an ownership result was hoisted, but its destroys were duplicated causing ownership errors.