[PATCH] D58393: [MBP] Factor out function hasViableTopFallthrough and enhancement

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 21 14:32:33 PST 2019


davidxl added inline comments.


================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:2008
+        BlockChain *SuccChain = BlockToChain[Succ];
+        if ((!SuccChain || Succ == *SuccChain->begin()) && SuccProb > TopProb) {
+          TopOK = false;
----------------
Carrot wrote:
> davidxl wrote:
> > What is the purpose of the check 'Succ == *SuccChain->begin() ?
> !SuccChain means Succ has not been layout in any chain.
> 'Succ == *SuccChain->begin()' means even Succ has been layout in some chain, the whole chain can still be layout after Pred if it is beneficial.
> So (!SuccChain || Succ == *SuccChain->begin()) means it is possible to put Succ after Pred.
please add a comment there


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58393/new/

https://reviews.llvm.org/D58393





More information about the llvm-commits mailing list