[llvm] [FunctionAttrs] deduce attr `cold` on functions if all CG paths call a `cold` function (PR #101298)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 04:00:57 PDT 2024


https://github.com/nikic approved this pull request.

LGTM

I looked at some cases where code size increases with this patch, and the effect is basically that we don't inline an error handling path, and that reduces the size of a function below the inlining threshold, so it gets inlined (a lot more) in turn. Overall effect is undesirable, but the decisions are all locally reasonable.

https://github.com/llvm/llvm-project/pull/101298


More information about the llvm-commits mailing list