aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-10-24 16:44:55 +0000
committerChris Lattner <sabre@nondot.org>2006-10-24 16:44:55 +0000
commit11533e2236b9d03bcccdc1d46f8648de4521dadb (patch)
tree5a691d331c534a58be9f81b858ddf35ac358e943
parent0476b2852541575cc1628685cdb1d02d38ba6f87 (diff)
implement uncond branch insertion for the branch folding pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31159 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/IA64/IA64InstrInfo.cpp7
-rw-r--r--lib/Target/IA64/IA64InstrInfo.h9
2 files changed, 11 insertions, 5 deletions
diff --git a/lib/Target/IA64/IA64InstrInfo.cpp b/lib/Target/IA64/IA64InstrInfo.cpp
index 81b3277ed6..a4cdbce6bf 100644
--- a/lib/Target/IA64/IA64InstrInfo.cpp
+++ b/lib/Target/IA64/IA64InstrInfo.cpp
@@ -46,3 +46,10 @@ bool IA64InstrInfo::isMoveInstr(const MachineInstr& MI,
// move instruction
}
+void IA64InstrInfo::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, IA64::BRL_NOTCALL, 1).addMBB(TBB);
+} \ No newline at end of file
diff --git a/lib/Target/IA64/IA64InstrInfo.h b/lib/Target/IA64/IA64InstrInfo.h
index 2e52a9683f..ceb5c29737 100644
--- a/lib/Target/IA64/IA64InstrInfo.h
+++ b/lib/Target/IA64/IA64InstrInfo.h
@@ -19,11 +19,7 @@
namespace llvm {
-/// IA64II - This namespace holds all of the target specific flags that
-/// instruction info tracks.
-/// FIXME: now gone!
-
- class IA64InstrInfo : public TargetInstrInfo {
+class IA64InstrInfo : public TargetInstrInfo {
const IA64RegisterInfo RI;
public:
IA64InstrInfo();
@@ -41,6 +37,9 @@ public:
virtual bool isMoveInstr(const MachineInstr& MI,
unsigned& sourceReg,
unsigned& destReg) const;
+ virtual void InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
+ MachineBasicBlock *FBB,
+ const std::vector<MachineOperand> &Cond) const;
};