[PATCH] D34271: [MBP] do not rotate loop if it creates extra branch
Serguei Katkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 19 20:30:54 PDT 2017
skatkov added inline comments.
================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:1941
}
}
----------------
iteratee wrote:
> How is your test different from the test above?
The test above checks whether Bottom block has a fallthrough out of the loop. If it has than there is no reason to make a loop rotation due to it will introduce a branch to that out of loop basic block.
My check is described in the summary. It checks the creation of extra branch inside a loop in case of loop rotation. Simply if Exit Candidate has a fallthrough BB and Bottom does not fallthrough (potentially) to Top then rotation will not create a fallthrough from Bottom to Top but will create a branch from Exit Candidate to next block in a chain (which will become the first block in a chain).
https://reviews.llvm.org/D34271
More information about the llvm-commits
mailing list