diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-05-18 00:05:48 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-05-18 00:05:48 +0000 |
commit | b5cdaa257e167a08a8a54ea9249d847ccc415ce0 (patch) | |
tree | eb8bcd2531e39b2725150f6001c1ed31ccfa07d8 /include/llvm/Target/TargetInstrInfo.h | |
parent | f48ae4630bdf5c58dfca8f4d82a1ee1a88c3a767 (diff) | |
download | external_llvm-b5cdaa257e167a08a8a54ea9249d847ccc415ce0.zip external_llvm-b5cdaa257e167a08a8a54ea9249d847ccc415ce0.tar.gz external_llvm-b5cdaa257e167a08a8a54ea9249d847ccc415ce0.tar.bz2 |
RemoveBranch() and InsertBranch() now returns number of instructions deleted / inserted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37192 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetInstrInfo.h')
-rw-r--r-- | include/llvm/Target/TargetInstrInfo.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h index 00a0556..731a0ee 100644 --- a/include/llvm/Target/TargetInstrInfo.h +++ b/include/llvm/Target/TargetInstrInfo.h @@ -350,20 +350,24 @@ public: } /// RemoveBranch - Remove the branching code at the end of the specific MBB. - /// this is only invoked in cases where AnalyzeBranch returns success. - virtual void RemoveBranch(MachineBasicBlock &MBB) const { + /// this is only invoked in cases where AnalyzeBranch returns success. It + /// returns the number of instructions that were removed. + virtual unsigned RemoveBranch(MachineBasicBlock &MBB) const { assert(0 && "Target didn't implement TargetInstrInfo::RemoveBranch!"); + return 0; } /// InsertBranch - Insert a branch into the end of the specified /// MachineBasicBlock. This operands to this method are the same as those /// returned by AnalyzeBranch. This is invoked in cases where AnalyzeBranch /// returns success and when an unconditional branch (TBB is non-null, FBB is - /// null, Cond is empty) needs to be inserted. - virtual void InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, + /// null, Cond is empty) needs to be inserted. It returns the number of + /// instructions inserted. + virtual unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, const std::vector<MachineOperand> &Cond) const { assert(0 && "Target didn't implement TargetInstrInfo::InsertBranch!"); + return 0; } /// BlockHasNoFallThrough - Return true if the specified block does not |