mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-24 06:30:19 +00:00
StrongPHIElim: Now with even fewer trivial bugs!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45775 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
719fef648d
commit
864e3a3762
@ -215,7 +215,9 @@ StrongPHIElimination::computeDomForest(std::set<unsigned>& regs) {
|
|||||||
stack.pop_back();
|
stack.pop_back();
|
||||||
CurrentParent = stack.back();
|
CurrentParent = stack.back();
|
||||||
|
|
||||||
parentBlock = LV.getVarInfo(CurrentParent->getReg()).DefInst->getParent();
|
parentBlock = CurrentParent->getReg() ?
|
||||||
|
LV.getVarInfo(CurrentParent->getReg()).DefInst->getParent() :
|
||||||
|
0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DomForestNode* child = new DomForestNode(*I, CurrentParent);
|
DomForestNode* child = new DomForestNode(*I, CurrentParent);
|
||||||
@ -361,7 +363,7 @@ void StrongPHIElimination::processBlock(MachineBasicBlock* MBB) {
|
|||||||
std::set<unsigned> ProcessedNames;
|
std::set<unsigned> ProcessedNames;
|
||||||
|
|
||||||
MachineBasicBlock::iterator P = MBB->begin();
|
MachineBasicBlock::iterator P = MBB->begin();
|
||||||
while (P->getOpcode() == TargetInstrInfo::PHI) {
|
while (P != MBB->end() && P->getOpcode() == TargetInstrInfo::PHI) {
|
||||||
LiveVariables::VarInfo& PHIInfo = LV.getVarInfo(P->getOperand(0).getReg());
|
LiveVariables::VarInfo& PHIInfo = LV.getVarInfo(P->getOperand(0).getReg());
|
||||||
|
|
||||||
unsigned DestReg = P->getOperand(0).getReg();
|
unsigned DestReg = P->getOperand(0).getReg();
|
||||||
|
Loading…
Reference in New Issue
Block a user