[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcInstrInfo.cpp SparcInstrInfo.h
Chris Lattner
sabre at nondot.org
Tue Oct 24 09:39:33 PDT 2006
Changes in directory llvm/lib/Target/Sparc:
SparcInstrInfo.cpp updated: 1.13 -> 1.14
SparcInstrInfo.h updated: 1.9 -> 1.10
---
Log message:
implement uncond branch insertion for sparc to fix regressions from last night
due to branchfolding
---
Diffs of the changes: (+13 -0)
SparcInstrInfo.cpp | 8 ++++++++
SparcInstrInfo.h | 5 +++++
2 files changed, 13 insertions(+)
Index: llvm/lib/Target/Sparc/SparcInstrInfo.cpp
diff -u llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.13 llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.14
--- llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.13 Sat Feb 4 23:50:24 2006
+++ llvm/lib/Target/Sparc/SparcInstrInfo.cpp Tue Oct 24 11:39:19 2006
@@ -96,3 +96,11 @@
}
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);
+}
\ No newline at end of file
Index: llvm/lib/Target/Sparc/SparcInstrInfo.h
diff -u llvm/lib/Target/Sparc/SparcInstrInfo.h:1.9 llvm/lib/Target/Sparc/SparcInstrInfo.h:1.10
--- llvm/lib/Target/Sparc/SparcInstrInfo.h:1.9 Wed May 24 12:04:04 2006
+++ llvm/lib/Target/Sparc/SparcInstrInfo.h Tue Oct 24 11:39:19 2006
@@ -61,6 +61,11 @@
/// 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;
};
}
More information about the llvm-commits
mailing list