mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-17 03:30:28 +00:00
LoopRotation: Check some invariants of the dominator updating code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163058 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8365e9bcc2
commit
64f30e3eed
@ -418,6 +418,9 @@ bool LoopRotate::rotateLoop(Loop *L) {
|
|||||||
for (unsigned I = 0, E = HeaderChildren.size(); I != E; ++I)
|
for (unsigned I = 0, E = HeaderChildren.size(); I != E; ++I)
|
||||||
DT->changeImmediateDominator(HeaderChildren[I], OrigPreheaderNode);
|
DT->changeImmediateDominator(HeaderChildren[I], OrigPreheaderNode);
|
||||||
|
|
||||||
|
assert(DT->getNode(Exit)->getIDom() == OrigPreheaderNode);
|
||||||
|
assert(DT->getNode(NewHeader)->getIDom() == OrigPreheaderNode);
|
||||||
|
|
||||||
// Update OrigHeader to be dominated by the new header block.
|
// Update OrigHeader to be dominated by the new header block.
|
||||||
DT->changeImmediateDominator(OrigHeader, OrigLatch);
|
DT->changeImmediateDominator(OrigHeader, OrigLatch);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user