Update threshold based on callee's hotness only when BFI is not available. Otherwise use only callsite's hotness. This makes it easier to reason about hotness related threshold updates.
Details
Diff Detail
Event Timeline
It would be good in the patch description to maybe clarify the intent / motivation here? I assume the goal is to simplify reasoning about which thresholds are triggered in which cases when the new PM is available? At least, that is my guess based on our in-person conversations.
Anyways, feel free to submit, just seems good to provide context to others reading.
test/Transforms/Inline/inline-hot-callsite.ll | ||
---|---|---|
2 | ; without ; without -> ; without |
Turns out that this change is incorrect. When sample profile is used, we use callsite hotness even without BFI. In a separate patch, I plan to add a method in ProfileSummaryInfo to determine if the module has sample profile. Then I can fix this patch by using callsite hotness either when sample profile is used or when BFI is available.
(Just marking this as no longer ready to go so it shows back up in my queue...)
Good catch!!!
; without ; without -> ; without