[PATCH] D18491: [PGO] Don't set the function hotness attribute when populating counters

David Li via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 26 09:39:35 PDT 2016


davidxl added a comment.

The logic to set InlineHint should be removed and handled by inline cost analysis (FE based pgo removed it already) -- but that is a separate patch.


================
Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:463
@@ +462,3 @@
+public:
+  PGOUseFunc(Function &Func, Module *Modu, BranchProbabilityInfo *BPI = nullptr,
+             BlockFrequencyInfo *BFI = nullptr)
----------------
Initialize FreqAttr to Normal

================
Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:481
@@ +480,3 @@
+  enum FuncFreqAttr {
+    FunctionFrequencyNormal,
+    FunctionFrequencyCold,
----------------
FFA_Normal,
FFA_Cold,
FFA_Hot

================
Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:519
@@ -489,1 +518,3 @@
 
+  FuncFreqAttr FreqAttr;
+
----------------
Move this closer to other private data members.


http://reviews.llvm.org/D18491





More information about the llvm-commits mailing list