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

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 28 16:21:24 PDT 2016


tejohnson added a comment.

In https://reviews.llvm.org/D24976#556151, @Prazek wrote:

> I have some initial results. It looks like because inliner doesn't know how to inline hot callsites, then most of the SPEC benchmarks have the same binary as current trunk (with hot heuristic).
>  But on the google branch with smarter inliner there is clear win in povray, about +0.5% compared to current trunk with hot heuristic, over all other benchmarks that produced different binary are not much different.
>
> So the question is - should I temporary set the hot-evolution-factor to the same as normal evolution factor? So this way We won't import more functions that inliner won't inline, and then when new inliner will make it to trunk, to switch it to 1.0


Can you enable your importing stats to see how many extra funcs we import in trunk?


================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:275
@@ -267,3 +274,3 @@
 
-using EdgeInfo = std::pair<const FunctionSummary *, unsigned /* Threshold */>;
+using EdgeInfo = std::tuple<const FunctionSummary *, unsigned /* Threshold */>;
 
----------------
Change not needed now

================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:295
@@ -287,1 +294,3 @@
 
+    const bool IsHotCallsite =
+        Edge.second.Hotness == CalleeInfo::HotnessType::Hot;
----------------
These few lines no longer need changing

================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:391
@@ -373,1 +390,3 @@
+  // Process the newly imported functions and add callees to the worklist.
   while (!Worklist.empty()) {
+    const FunctionSummary *Summary;
----------------
No need to change these lines, just remove the threshold adjustment (makes the actual functional change clearer without other changes).


https://reviews.llvm.org/D24976





More information about the llvm-commits mailing list