[PATCH] D34109: [AArch64] Update successor probabilities after ccmp-conversion

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 19 11:17:10 PDT 2017


MatzeB added inline comments.


================
Comment at: lib/Target/AArch64/AArch64ConditionalCompares.cpp:143
   MachineRegisterInfo *MRI;
+  const MachineBranchProbabilityInfo *MBPI;
 
----------------
Huh, we can use a const instance of this to change the probabilities... Looking at MachineBranchProbabilityInfo I wonder why this was implemented as a pass and not just a set of utility functions. Anyway just wanted to write this down, it isn't really relevant for the review at hand.


================
Comment at: lib/Target/AArch64/AArch64ConditionalCompares.cpp:590
+    BranchProbability Head2Tail = MBPI->getEdgeProbability(Head, Tail);
+    Head->setSuccProbability(Head->succ_begin(),
+                             Head2Tail + Head2CmpBB * CmpBB2Tail);
----------------
I cannot convince myself right now that it is always `succ_begin()` that points to `Tail`. Wouldn't we need to search for the right successor?


https://reviews.llvm.org/D34109





More information about the llvm-commits mailing list