[PATCH] D17584: Cleanup inline cost analysis code
Easwaran Raman via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 9 15:58:53 PST 2016
eraman added inline comments.
================
Comment at: lib/Analysis/InlineCost.cpp:1372
@@ -1375,3 +1371,3 @@
// Take off the bonus we applied to the threshold.
- Threshold -= SingleBBBonus;
+ Threshold = std::max(Threshold - SingleBBBonus, 0);
SingleBB = false;
----------------
reames wrote:
> This should be separated into it's own change. It isn't obvious to me that it's correct. (Not saying it isn't, just not obvious it is.) Separate this into it's own patch and add an assertion of the invariant you're asserting (i.e Threshold >= 0)
>
> (Actually, you do that below. Still separate and separately review please.)
Is this comment only for this subtraction of SingleBBBonus or do you want me to move all changes of the form Threshold -=X => Threshold = std::max(Threshold - X, 0) into a separate patch? I think you mean the latter, but please clarify
http://reviews.llvm.org/D17584
More information about the llvm-commits
mailing list