mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-08 19:25:47 +00:00
Fix some simple bugs. StrongPHIElimination now does not crash on 164.gzip.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45773 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -178,7 +178,6 @@ public:
|
|||||||
else if (preorder[ABlock] > preorder[BBlock])
|
else if (preorder[ABlock] > preorder[BBlock])
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
assert(0 && "Error sorting by dominance!");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -208,8 +207,9 @@ StrongPHIElimination::computeDomForest(std::set<unsigned>& regs) {
|
|||||||
for (std::vector<unsigned>::iterator I = worklist.begin(), E = worklist.end();
|
for (std::vector<unsigned>::iterator I = worklist.begin(), E = worklist.end();
|
||||||
I != E; ++I) {
|
I != E; ++I) {
|
||||||
unsigned pre = preorder[LV.getVarInfo(*I).DefInst->getParent()];
|
unsigned pre = preorder[LV.getVarInfo(*I).DefInst->getParent()];
|
||||||
MachineBasicBlock* parentBlock =
|
MachineBasicBlock* parentBlock = CurrentParent->getReg() ?
|
||||||
LV.getVarInfo(CurrentParent->getReg()).DefInst->getParent();
|
LV.getVarInfo(CurrentParent->getReg()).DefInst->getParent() :
|
||||||
|
0;
|
||||||
|
|
||||||
while (pre > maxpreorder[parentBlock]) {
|
while (pre > maxpreorder[parentBlock]) {
|
||||||
stack.pop_back();
|
stack.pop_back();
|
||||||
|
Reference in New Issue
Block a user