diff options
Diffstat (limited to 'llvm/lib/Target/Mips')
-rw-r--r-- | llvm/lib/Target/Mips/MipsInstrInfo.cpp | 9 | ||||
-rw-r--r-- | llvm/lib/Target/Mips/MipsInstrInfo.h | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/llvm/lib/Target/Mips/MipsInstrInfo.cpp b/llvm/lib/Target/Mips/MipsInstrInfo.cpp index 1332258912a..c73698b6b3f 100644 --- a/llvm/lib/Target/Mips/MipsInstrInfo.cpp +++ b/llvm/lib/Target/Mips/MipsInstrInfo.cpp @@ -117,9 +117,11 @@ unsigned MipsInstrInfo::InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef<MachineOperand> Cond, - const DebugLoc &DL) const { + const DebugLoc &DL, + int *BytesAdded) const { // Shouldn't be a fall through. assert(TBB && "InsertBranch must not be told to insert a fallthrough"); + assert(!BytesAdded && "code size not handled"); // # of condition operands: // Unconditional branches: 0 @@ -145,7 +147,10 @@ unsigned MipsInstrInfo::InsertBranch(MachineBasicBlock &MBB, return 1; } -unsigned MipsInstrInfo::RemoveBranch(MachineBasicBlock &MBB) const { +unsigned MipsInstrInfo::RemoveBranch(MachineBasicBlock &MBB, + int *BytesRemoved) const { + assert(!BytesRemoved && "code size not handled"); + MachineBasicBlock::reverse_iterator I = MBB.rbegin(), REnd = MBB.rend(); unsigned removed; diff --git a/llvm/lib/Target/Mips/MipsInstrInfo.h b/llvm/lib/Target/Mips/MipsInstrInfo.h index 876e9f96c06..de242b84a6a 100644 --- a/llvm/lib/Target/Mips/MipsInstrInfo.h +++ b/llvm/lib/Target/Mips/MipsInstrInfo.h @@ -55,11 +55,13 @@ public: SmallVectorImpl<MachineOperand> &Cond, bool AllowModify) const override; - unsigned RemoveBranch(MachineBasicBlock &MBB) const override; + unsigned RemoveBranch(MachineBasicBlock &MBB, + int *BytesRemoved = nullptr) const override; unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef<MachineOperand> Cond, - const DebugLoc &DL) const override; + const DebugLoc &DL, + int *BytesAdded = nullptr) const override; bool ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const override; |