[PATCH] D63972: [PowerPC] Do the Early Return for the li and unconditional branch

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 15 13:31:47 PDT 2019


efriedma added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineBlockPlacement.cpp:2741
+        if (((TBB == &*F->begin()) || !std::prev(I)->isSuccessor(TBB)) &&
+             (TailDup.isSimpleBB(ChainBB) || (TBB->pred_size() == 1))) {
+          TII->removeBranch(*ChainBB);
----------------
If you have a block that ends in an unconditional branch, and the successor block has exactly one predecessor and no fallthrough successors, you can merge the two blocks; that's straightforward.  But I don't see how the isSimpleBB check is related to that, and the isSuccessor() check seems redundant.


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

https://reviews.llvm.org/D63972





More information about the llvm-commits mailing list