[PATCH] D34271: [MBP] do not rotate loop if it creates extra branch
Kyle Butt via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 23 11:39:51 PDT 2017
iteratee accepted this revision.
iteratee added a comment.
This revision is now accepted and ready to land.
Approved with the changes I've marked.
================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:1957
+ // Break of fallthrough to B1 is compensated by a fallthrough from Bk.
+ // If we had a fallthrough Bk -> Bk+1 it is borken now.
+ // It might be compensated by fallthrough Bn -> B1.
----------------
*broken now*
================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:1963
+ // There was fallthrough from chosen exit block (Bk) to next one (Bk+1)
+ // There is no fallthrough from bottom (Bn) to top (B1).
+ if (ViableTopFallthrough) {
----------------
This is really good. Thank you.
Could you add one more sentence, that we know there is no exit fallthrough from Bn because of the check above?
================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:1972
+
+ DEBUG(dbgs() << "Do loop rotation with new exit block "
+ << getBlockName(ExitingBB) << "\n");
----------------
"Rotating loop to put exit " ... " at bottom.\n"
https://reviews.llvm.org/D34271
More information about the llvm-commits
mailing list