-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[opt] promote stack alloc_ref to object #30743
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
[opt] promote stack alloc_ref to object #30743
Conversation
…th current behavior
@swift-ci please benchmark |
As said in the summary, I don't expect any performance improvements. That's just to check for regressions (which shouldn't be possible because stack |
Build failed before running benchmark. |
@swift-ci please benchmark |
Performance: -O
Code size: -O
Performance: -Osize
Code size: -OsizePerformance: -Onone
Code size: -swiftlibsHow to read the dataThe tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.If you see any unexpected regressions, you should consider fixing the Noise: Sometimes the performance results (not code size!) contain false Hardware Overview
|
See my comment in #30736 |
Based on #30736. This patch updates
StackPromotion
to promotealloc_ref
s on the stack toobject
instructions. Given that there's currently no support forobject
instructions in the optimizer, this pass shouldn't have many (if any) performance improvements. It just lays the groundwork for future performance improvements.In the future, the promotion could probably be more aggressive but, as of now, it will only promote stack
alloc_ref
s so there shouldn't be any regression.