implement uncond branch insertion so alpha works work branchfolding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31158 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-10-24 16:41:36 +00:00
parent e87146ace8
commit 0476b28525
2 changed files with 11 additions and 0 deletions

View File

@ -83,3 +83,10 @@ AlphaInstrInfo::isStoreToStackSlot(MachineInstr *MI, int &FrameIndex) const {
return 0;
}
void AlphaInstrInfo::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, Alpha::BR, 1).addMBB(TBB);
}

View File

@ -38,6 +38,10 @@ public:
virtual unsigned isLoadFromStackSlot(MachineInstr *MI, int &FrameIndex) const;
virtual unsigned isStoreToStackSlot(MachineInstr *MI, int &FrameIndex) const;
virtual void InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
MachineBasicBlock *FBB,
const std::vector<MachineOperand> &Cond) const;
};
}