[PATCH] D24338: [InlineCost] Remove CallPenalty and change MinSizeThreshold to 5

Easwaran Raman via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 1 15:25:20 PDT 2016


eraman added a comment.

I agree that having a call penalty in addition to argument set up cost  skews inline cost computation.  Some high level comments:

- This patch has two changes : removing the call penalty and reduce MinSizeThreshold.  It is preferable to separate them.
- The call penalty change doesn't affect just the code size, so it is important to measure the performance impact of this change.
- Could you generate the patch with a large -U value to get full context?



================
Comment at: lib/Analysis/InlineCost.cpp:1112
           hasSoftFloatAttr)
-        Cost += InlineConstants::CallPenalty;
+        Cost += InlineConstants::InstrCost;
     }
----------------
This needs more justification. The instruction gets its cost in the visitor. In addition you're adding InstrCost. Is this to simulate the effect of call with one argument or something else? Comments will be helpful.


Repository:
  rL LLVM

https://reviews.llvm.org/D24338





More information about the llvm-commits mailing list