This patch factor out the function hasViableTopFallthrough from rotateLoop. It is also enhanced. Original code checks only if there is a block can be placed before current loop top. This patch also checks if the loop top is the most possible successor of its predecessor. The attached test case shows its effect.
Details
Details
Diff Detail
Diff Detail
Event Timeline
lib/CodeGen/MachineBlockPlacement.cpp | ||
---|---|---|
2008 | What is the purpose of the check 'Succ == *SuccChain->begin() ? |
lib/CodeGen/MachineBlockPlacement.cpp | ||
---|---|---|
2008 | !SuccChain means Succ has not been layout in any chain. |
lib/CodeGen/MachineBlockPlacement.cpp | ||
---|---|---|
2008 | please add a comment there |
What is the purpose of the check 'Succ == *SuccChain->begin() ?