diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2013-03-01 01:10:17 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2013-03-01 01:10:17 +0000 |
commit | d0a4b60df146b8c51555a752fed1530999ecbe64 (patch) | |
tree | 9966a53df739ca7e544ad64d3ac46ec3d4a9414f /lib/Target/Mips/MipsInstrInfo.h | |
parent | b8bc8cc3b0e0d2811b3326d49835e8a1edb1ef61 (diff) | |
download | llvm-d0a4b60df146b8c51555a752fed1530999ecbe64.tar.gz llvm-d0a4b60df146b8c51555a752fed1530999ecbe64.tar.bz2 llvm-d0a4b60df146b8c51555a752fed1530999ecbe64.tar.xz |
[mips] Define an overloaded version of function MipsInstrInfo::AnalyzeBranchAdd.
This function will be used later when the capability to search delay slot
filling instructions in successor blocks is added. No intended functionality
changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176325 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsInstrInfo.h')
-rw-r--r-- | lib/Target/Mips/MipsInstrInfo.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsInstrInfo.h b/lib/Target/Mips/MipsInstrInfo.h index aca2bc7ae9..3cd9088140 100644 --- a/lib/Target/Mips/MipsInstrInfo.h +++ b/lib/Target/Mips/MipsInstrInfo.h @@ -31,6 +31,15 @@ protected: unsigned UncondBrOpc; public: + enum BranchType { + BT_None, // Couldn't analyze branch. + BT_NoBranch, // No branches found. + BT_Uncond, // One unconditional branch. + BT_Cond, // One conditional branch. + BT_CondUncond, // A conditional branch followed by an unconditional branch. + BT_Indirect // One indirct branch. + }; + explicit MipsInstrInfo(MipsTargetMachine &TM, unsigned UncondBrOpc); static const MipsInstrInfo *create(MipsTargetMachine &TM); @@ -51,6 +60,12 @@ public: virtual bool ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const; + BranchType AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, + MachineBasicBlock *&FBB, + SmallVectorImpl<MachineOperand> &Cond, + bool AllowModify, + SmallVectorImpl<MachineInstr*> &BranchInstrs) const; + virtual MachineInstr* emitFrameIndexDebugValue(MachineFunction &MF, int FrameIx, uint64_t Offset, const MDNode *MDPtr, |