[PATCH] D17584: Cleanup inline cost analysis code

Easwaran Raman via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 13 16:04:30 PDT 2016


eraman added inline comments.

================
Comment at: lib/Analysis/InlineCost.cpp:1323
@@ -1322,3 +1322,3 @@
     if (Cost > Threshold)
-      break;
+      return false;
 
----------------
davidxl wrote:
> does CA.Threshold needs to be readjusted? Probably not.
I don't think it matters. AFAICT, the only situation where we use CA.Threshold even if CA.analyzeCall returns false is in providing diagnostics (-Rpass-analysis=inline and others). It'll still show Cost > Threshold. If we readjust, it might show Cost is much greater than threshold if the bonuses were removed, but in any case Cost itself is not accurate when we bail out early. 

FYI, the second part I had already checked in has the same issue and I don't adjust the Threshold downwards.


http://reviews.llvm.org/D17584





More information about the llvm-commits mailing list