[all-commits] [llvm/llvm-project] 5275e7: [InlineOrder] Fix assertion failure in CostBenefit...
Kazu Hirata via All-commits
all-commits at lists.llvm.org
Mon May 4 14:38:29 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5275e727e9ecec0bed3423a3045993481915c631
https://github.com/llvm/llvm-project/commit/5275e727e9ecec0bed3423a3045993481915c631
Author: Kazu Hirata <kazu at google.com>
Date: 2026-05-04 (Mon, 04 May 2026)
Changed paths:
M llvm/lib/Analysis/InlineOrder.cpp
A llvm/test/Transforms/Inline/module-inliner-cba-crash.ll
Log Message:
-----------
[InlineOrder] Fix assertion failure in CostBenefitPriority (#195564)
InlineCost::getStaticBonusApplied() triggers an assertion failure
if the CostBenefitPriority constructor calls it when
IC.isVariable() is false. This is because
getStaticBonusApplied() expects isVariable() to be true.
Unconditionally populating CostBenefit also incorrectly prioritizes
a NeverInline candidate with a cost-benefit pair over other
valid variable-cost sites.
This patch fixes the crash and the sorting issue by calling
getStaticBonusApplied() and populating CostBenefit only when
IC.isVariable() is true. For AlwaysInline and NeverInline costs,
CostBenefit is explicitly set to std::nullopt.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list