summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-05-18 00:18:17 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-05-18 00:18:17 +0000
commite20dd92792440f0791eeb619bfa39665fffe0419 (patch)
treeea650264bd553bf779bf11ec2fefb3f489620d36 /llvm/lib/Target/Sparc
parent99be49dd9b3685399f85fc9e46ad010dc8c84887 (diff)
downloadbcm5719-llvm-e20dd92792440f0791eeb619bfa39665fffe0419.tar.gz
bcm5719-llvm-e20dd92792440f0791eeb619bfa39665fffe0419.zip
RemoveBranch() and InsertBranch() now returns number of instructions deleted / inserted.
llvm-svn: 37193
Diffstat (limited to 'llvm/lib/Target/Sparc')
-rw-r--r--llvm/lib/Target/Sparc/SparcInstrInfo.cpp8
-rw-r--r--llvm/lib/Target/Sparc/SparcInstrInfo.h6
2 files changed, 8 insertions, 6 deletions
diff --git a/llvm/lib/Target/Sparc/SparcInstrInfo.cpp b/llvm/lib/Target/Sparc/SparcInstrInfo.cpp
index a5774bdd778..a8c822ae9ae 100644
--- a/llvm/lib/Target/Sparc/SparcInstrInfo.cpp
+++ b/llvm/lib/Target/Sparc/SparcInstrInfo.cpp
@@ -97,10 +97,12 @@ unsigned SparcInstrInfo::isStoreToStackSlot(MachineInstr *MI,
return 0;
}
-void SparcInstrInfo::InsertBranch(MachineBasicBlock &MBB,MachineBasicBlock *TBB,
- MachineBasicBlock *FBB,
- const std::vector<MachineOperand> &Cond)const{
+unsigned
+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, get(SP::BA)).addMBB(TBB);
+ return 1;
}
diff --git a/llvm/lib/Target/Sparc/SparcInstrInfo.h b/llvm/lib/Target/Sparc/SparcInstrInfo.h
index 9df9bad1205..3fb50ff92ea 100644
--- a/llvm/lib/Target/Sparc/SparcInstrInfo.h
+++ b/llvm/lib/Target/Sparc/SparcInstrInfo.h
@@ -63,9 +63,9 @@ public:
virtual unsigned isStoreToStackSlot(MachineInstr *MI, int &FrameIndex) const;
- virtual void InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
- MachineBasicBlock *FBB,
- const std::vector<MachineOperand> &Cond) const;
+ virtual unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
+ MachineBasicBlock *FBB,
+ const std::vector<MachineOperand> &Cond) const;
};
}
OpenPOWER on IntegriCloud