[PATCH] D24940: [thinlto] Add cold-callsite import heuristic

Piotr Padlewski via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 28 21:20:35 PDT 2016


Prazek marked an inline comment as done.

================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:305
@@ -294,3 +304,3 @@
     if (!CalleeSummary) {
       DEBUG(dbgs() << "ignored! No qualifying callee with summary found.\n");
       continue;
----------------
mehdi_amini wrote:
> I agree... when there is an actual value to read these lines! Otherwise apply this principles means inlining the whole program as nested lambda into the main() :p
> So it is always a signal/noise ratio evaluation. Having a lambda means the code is available, but it means the body of the current function is longer.
> (Here I felt I can read and understand the code in the loop without the need to see the body of a function with a name GetBonusMultiplier)
The boilerplate is actually not that big, there is actually one line more (because I would have to declare a variable to store result ). 

I guess the real question is, should I hide implementation or not, because wrapping in the function/lambda is clearly win.

So if you think that function will be better then I will change it because both works for me, and I want to push it upstream before I will finish internship (Friday)


https://reviews.llvm.org/D24940





More information about the llvm-commits mailing list