[PATCH] D34109: [AArch64] Update successor probabilities after ccmp-conversion
    Matthew Simpson via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Jun 26 10:46:09 PDT 2017
    
    
  
mssimpso added a comment.
Thanks Mathias!
================
Comment at: lib/Target/AArch64/AArch64ConditionalCompares.cpp:590
+    BranchProbability Head2Tail = MBPI->getEdgeProbability(Head, Tail);
+    Head->setSuccProbability(Head->succ_begin(),
+                             Head2Tail + Head2CmpBB * CmpBB2Tail);
----------------
MatzeB wrote:
> mssimpso wrote:
> > MatzeB wrote:
> > > 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?
> > `Head` is required to have exactly two successors, `CmpBB` and `Tail` (see the beginning part of `canConvert`). `CmpBB` is removed as a successor of `Head` a few lines up (577), so `succ_begin()` can only point to `Tail` here.
> Ok, maybe check with an `assert()` to make life easier for readers?
Will do.
https://reviews.llvm.org/D34109
    
    
More information about the llvm-commits
mailing list