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

Piotr Padlewski via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 27 13:25:56 PDT 2016


Prazek added inline comments.

================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:385
@@ -382,1 +384,3 @@
+    if (!IsHotCallsite)
+      Threshold = Threshold * ImportInstrFactor;
     computeImportForFunction(*Summary, Index, Threshold, DefinedGVSummaries,
----------------
mehdi_amini wrote:
> I rather express this differently: using different factors for the hotness.
>  (You current proposal would be using 1 as a factor for "hot" calls chains).
> 
ok I will add different Factor

================
Comment at: test/Transforms/FunctionImport/hotness_based_import.ll:38
@@ -33,1 +37,3 @@
+; for hot callsites the threshold doesn't decay, that's why it doesn't make difference if the import factor
+; is 0 or higher - calledFromHot's will be imported
 ; RUN: opt -function-import -summary-file %t3.thinlto.bc %t.bc -import-instr-limit=10 -import-hot-multiplier=0.0 --S | FileCheck %s --check-prefix=CHECK --check-prefix=HOT-ZERO
----------------
tejohnson wrote:
> Comment doesn't make much sense - we are checking that they aren't imported.
oh yea, I forgot to remove this.


https://reviews.llvm.org/D24976





More information about the llvm-commits mailing list