[PATCH] D12778: Change the probability to check if a hot successor has a more important predecessor in block-placement.

David Li via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 12:36:00 PDT 2015


davidxl added inline comments.

================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:354
@@ -353,3 +353,3 @@
                                            const BlockFilterSet *BlockFilter) {
   const BranchProbability HotProb(4, 5); // 80%
 
----------------
This value should be tuned when PGO is on to follow a clear cost model. I would like to see a separate patch for that.

================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:423
@@ -418,1 +422,3 @@
+      // This is why we use 25% instead of 20% as the cold probability below.
+      const BranchProbability ColdProb(1, 4); // 25%
       BlockFrequency CandidateEdgeFreq =
----------------
For global conflict detection, do we know why we need to apply the multiplier on the successor edge frequency and then compare with the conflicting incoming edge in the first place? 


http://reviews.llvm.org/D12778





More information about the llvm-commits mailing list