[PATCH] D34919: [Inliner] Optimize shouldBeDeferred
Chandler Carruth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 4 13:13:13 PST 2019
chandlerc accepted this revision.
chandlerc added a comment.
This revision is now accepted and ready to land.
Nice, LGTM!
Does it make sense to add a (very early) assert that the thresholds are non-negative? I agree with you that it shouldn't be happening and it seems like a good invariant to enforce. Can of course be a follow-up patch.
================
Comment at: lib/Transforms/IPO/Inliner.cpp:340
+ // can apply a huge negative bonus to TotalSecondaryCost.
+ bool applyLastCallBonus = Caller->hasLocalLinkage() && !Caller->hasOneUse();
// This bool tracks what happens if we DO inline C into B.
----------------
Despite the old variable's name, this should be `ApplyLastCallBonus`.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D34919/new/
https://reviews.llvm.org/D34919
More information about the llvm-commits
mailing list