[PATCH] D41634: Branch relaxation - non invertible condition

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 29 13:50:10 PST 2017


arsenm added inline comments.


================
Comment at: ../lib/CodeGen/BranchRelaxation.cpp:413-418
+  DEBUG(dbgs() << "  Insert cond B to the new BB " << printMBBReference(NewBB)
+               << "  Keep the exiting condition. \n");
+  DEBUG(dbgs() << "  Insert B to " << printMBBReference(*FBB) << "\n");
+  DEBUG(dbgs() << "  In the new BB: Insert B to "
+               << printMBBReference(*TBB) << "\n");
+
----------------
These can all be one DEBUG() block


================
Comment at: ../lib/CodeGen/BranchRelaxation.cpp:414
+  DEBUG(dbgs() << "  Insert cond B to the new BB " << printMBBReference(NewBB)
+               << "  Keep the exiting condition. \n");
+  DEBUG(dbgs() << "  Insert B to " << printMBBReference(*FBB) << "\n");
----------------
Prints trailing whitespace


================
Comment at: ../lib/CodeGen/BranchRelaxation.cpp:415
+               << "  Keep the exiting condition. \n");
+  DEBUG(dbgs() << "  Insert B to " << printMBBReference(*FBB) << "\n");
+  DEBUG(dbgs() << "  In the new BB: Insert B to "
----------------
'\n'


================
Comment at: ../lib/CodeGen/BranchRelaxation.cpp:423-438
   unsigned &MBBSize = BlockInfo[MBB->getNumber()].Size;
 
-  // Insert a new conditional branch and a new unconditional branch.
   int RemovedSize = 0;
-  TII->reverseBranchCondition(Cond);
   TII->removeBranch(*MBB, &RemovedSize);
   MBBSize -= RemovedSize;
 
   int AddedSize = 0;
----------------
This part is exactly the same as the other path above. Can you move this around to avoid duplicating it?


Repository:
  rL LLVM

https://reviews.llvm.org/D41634





More information about the llvm-commits mailing list