implement uncond branch insertion for sparc to fix regressions from last night

due to branchfolding

llvm-svn: 31157
This commit is contained in:
Chris Lattner 2006-10-24 16:39:19 +00:00
parent f054003ba7
commit b7267bd034
2 changed files with 13 additions and 0 deletions

View File

@ -96,3 +96,11 @@ unsigned SparcInstrInfo::isStoreToStackSlot(MachineInstr *MI,
}
return 0;
}
void SparcInstrInfo::InsertBranch(MachineBasicBlock &MBB,MachineBasicBlock *TBB,
MachineBasicBlock *FBB,
const std::vector<MachineOperand> &Cond)const{
// Can only insert uncond branches so far.
assert(Cond.empty() && !FBB && TBB && "Can only handle uncond branches!");
BuildMI(&MBB, SP::BA, 1).addMBB(TBB);
}

View File

@ -61,6 +61,11 @@ public:
/// not, return 0. This predicate must return 0 if the instruction has
/// any side effects other than storing to the stack slot.
virtual unsigned isStoreToStackSlot(MachineInstr *MI, int &FrameIndex) const;
virtual void InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
MachineBasicBlock *FBB,
const std::vector<MachineOperand> &Cond) const;
};
}