-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Exclusivity] Make the performance inliner aware of exclusivity checks #19894
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
Conversation
@eeckstein Can you please review? |
5ad7b32
to
a626f4a
Compare
@swift-ci Please test |
@swift-ci Please test Linux |
@@ -407,6 +446,12 @@ bool SILPerformanceInliner::isProfitableToInline( | |||
} | |||
} | |||
|
|||
Weight EntryW = SPA->getWeight(CalleeEntry, CallerWeight); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you taking the weight of the entry block and not the weight of the block which contains the access(es)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we visit the block that contains the accesses we might not have visited the entire function / further block might change our decision. by the time we traverse all blocks we 'lost' which block(s) contain accesses. but I agree this is less than ideal - will think about changing it
16ab56d
to
1cdd6ba
Compare
@eeckstein I changed the benefit calculation per our off-line discussion |
1cdd6ba
to
9280b85
Compare
9280b85
to
2dc1015
Compare
@swift-ci Please smoke test and merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
radar rdar://problem/45283321