[PATCH] D23222: Changed sign of LastCallToStaticBouns

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 5 13:31:03 PDT 2016


mehdi_amini added inline comments.

================
Comment at: include/llvm/Analysis/InlineCost.h:37
@@ -36,3 +36,3 @@
   const int ColdccPenalty = 2000;
   const int NoreturnPenalty = 10000;
   /// Do not inline functions which allocate this many bytes on the stack
----------------
It made more sense to me before: now "Bonus" and "Penalty" are both positive.

================
Comment at: lib/Analysis/InlineCost.cpp:1266
@@ -1265,3 +1265,3 @@
   if (F.getCallingConv() == CallingConv::Cold)
     Cost += InlineConstants::ColdccPenalty;
 
----------------
Here is also `+=`, I feel you're creating some inconsistency


https://reviews.llvm.org/D23222





More information about the llvm-commits mailing list