From: Chris Lattner Date: Tue, 24 Oct 2006 16:39:19 +0000 (+0000) Subject: implement uncond branch insertion for sparc to fix regressions from last night X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e87146ace88464be4ea4f8869830642c40178f1f;p=oota-llvm.git implement uncond branch insertion for sparc to fix regressions from last night due to branchfolding git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31157 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/Sparc/SparcInstrInfo.cpp b/lib/Target/Sparc/SparcInstrInfo.cpp index 699c9d21d6e..6dbb5fe08c0 100644 --- a/lib/Target/Sparc/SparcInstrInfo.cpp +++ b/lib/Target/Sparc/SparcInstrInfo.cpp @@ -96,3 +96,11 @@ unsigned SparcInstrInfo::isStoreToStackSlot(MachineInstr *MI, } return 0; } + +void SparcInstrInfo::InsertBranch(MachineBasicBlock &MBB,MachineBasicBlock *TBB, + MachineBasicBlock *FBB, + const std::vector &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); +} \ No newline at end of file diff --git a/lib/Target/Sparc/SparcInstrInfo.h b/lib/Target/Sparc/SparcInstrInfo.h index 166793e2e04..9df9bad1205 100644 --- a/lib/Target/Sparc/SparcInstrInfo.h +++ b/lib/Target/Sparc/SparcInstrInfo.h @@ -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 &Cond) const; }; }