[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
Tue Jul 23 12:11:02 PDT 2019


efriedma added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineBlockPlacement.cpp:2738
+        // only one unconditonal branch or TBB has only one predecessor. We can
+        // do the tail duplication for ChainBB and remove TBB.
+        MachineFunction::iterator I(TBB);
----------------
English grammar here is wrong; the first sentence is a fragment... and even if you fixed that it's hard to understand.  Maybe something like the following: "Try to merge ChainBB and TBB.  This is legal under the following conditions: 1. "...


================
Comment at: llvm/test/CodeGen/PowerPC/block-placement-1.mir:303
+  ; CHECK:        successors: %bb.3(0x00000800)
+  ; CHECK-NOT:        B %bb.2
 
----------------
I don't like the use of CHECK-NOT here; it's really easy for negative checks to fall out of sync with the actual expected output.  Usually you can use "CHECK-NEXT" and "CHECK-EMPTY" more aggressively, instead.


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

https://reviews.llvm.org/D63972





More information about the llvm-commits mailing list