[PATCH] D121084: [NewPM][Inliner] Make inlined calls to functions in same SCC as callee exponentially expensive
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 7 09:59:57 PST 2022
nikic resigned from this revision.
nikic added a subscriber: davidxl.
nikic added a comment.
I've not tested this as extensively, but this variant is also performance neutral on my side, and does seem to address the issue in practice.
This approach is a bit more ad-hoc than D120584 <https://reviews.llvm.org/D120584>, and it wouldn't be my first choice, unless we had evidence that it actually performs better than D120584 <https://reviews.llvm.org/D120584> in some real-world instance. However, if this approach is more appealing to @davidxl, then I'm also fine with it as a compromise solution.
================
Comment at: llvm/lib/Analysis/InlineCost.cpp:912
+ if (Optional<int> AttrCostMult = getStringFnAttrAsInt(
+ CandidateCall, "function-inline-cost-multiplier"))
+ Cost *= *AttrCostMult;
----------------
We should probably export this string so it's not repeated three times.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121084/new/
https://reviews.llvm.org/D121084
More information about the llvm-commits
mailing list