mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-27 14:34:58 +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:
parent
92b7c1d94e
commit
cb7d949a19
@ -178,7 +178,6 @@ public:
|
||||
else if (preorder[ABlock] > preorder[BBlock])
|
||||
return false;
|
||||
|
||||
assert(0 && "Error sorting by dominance!");
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@ -208,8 +207,9 @@ StrongPHIElimination::computeDomForest(std::set<unsigned>& regs) {
|
||||
for (std::vector<unsigned>::iterator I = worklist.begin(), E = worklist.end();
|
||||
I != E; ++I) {
|
||||
unsigned pre = preorder[LV.getVarInfo(*I).DefInst->getParent()];
|
||||
MachineBasicBlock* parentBlock =
|
||||
LV.getVarInfo(CurrentParent->getReg()).DefInst->getParent();
|
||||
MachineBasicBlock* parentBlock = CurrentParent->getReg() ?
|
||||
LV.getVarInfo(CurrentParent->getReg()).DefInst->getParent() :
|
||||
0;
|
||||
|
||||
while (pre > maxpreorder[parentBlock]) {
|
||||
stack.pop_back();
|
||||
|
Loading…
x
Reference in New Issue
Block a user