[PATCH] D24976: [thinlto] Don't decay threshold for hot callsites

Piotr Padlewski via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 28 10:55:10 PDT 2016


Prazek added inline comments.

================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:350
@@ -341,3 +349,3 @@
     // Insert the newly imported function to the worklist.
-    Worklist.push_back(std::make_pair(ResolvedCalleeSummary, Threshold));
+    Worklist.emplace_back(ResolvedCalleeSummary, Threshold, IsHotCallsite);
   }
----------------
mehdi_amini wrote:
> As mentioned in D24638, you could achieve the same result by adjusting the Threshold when pushing on the stack instead of passing more context to the next iteration and delaying the adjustment.
> 
> 
just to make sure - you want to apply the threshold: lines
  if (IsHotCallsite)
      Threshold = Threshold * ImportHotInstrFactor;
  else
      Threshold = Threshold * ImportInstrFactor;

here, and don't do any threshold changes in the while loop? (So worklist will only contain FunctionSummary - because threshold and my bool won't be needed)

If so, then it seems like a good idea!


https://reviews.llvm.org/D24976





More information about the llvm-commits mailing list