llvm-project
31f3cd66 - [CSPreInliner] Use always_inline/noinline attributes in pre-inliner

Commit
6 days ago
[CSPreInliner] Use always_inline/noinline attributes in pre-inliner Teach the CSSPGO pre-inliner to respect the always_inline and noinline attributes encoded in pseudo probe descriptors (-preinliner-use-inline-attributes, default off). The attributes are stamped onto the context profiles of each function. shouldInline() never inlines a noinline callee and always inlines an always_inline one, since the compiler enforces both whatever the plan says. An always_inline callee is not charged to the caller's size budget, and it is admitted even when that budget is exhausted: the budget loop used to stop before shouldInline() was reached, so the plan recorded the callee as not inlined while the compiler inlines it anyway. -preinliner-charge-always-inline-size (default off) charges an always_inline callee's size to the budget instead, so an always_inline subtree can crowd out ordinary candidates; the callee itself is still always inlined.
Author
Committer
Parents
Loading