summaryrefslogtreecommitdiff
path: root/lib/Target/MSP430/MSP430InstrInfo.h
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-10-21 19:17:18 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-10-21 19:17:18 +0000
commit90593d2e1f31fd1c3be353b836b50280c3a6d243 (patch)
treec07e729f1a16a1c152e4fdec7df2601d37efcd84 /lib/Target/MSP430/MSP430InstrInfo.h
parent3926fb63c24ceeefc0215b8e14eb81c85403639e (diff)
downloadllvm-90593d2e1f31fd1c3be353b836b50280c3a6d243.tar.gz
llvm-90593d2e1f31fd1c3be353b836b50280c3a6d243.tar.bz2
llvm-90593d2e1f31fd1c3be353b836b50280c3a6d243.tar.xz
Implement branch folding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84774 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MSP430/MSP430InstrInfo.h')
-rw-r--r--lib/Target/MSP430/MSP430InstrInfo.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/Target/MSP430/MSP430InstrInfo.h b/lib/Target/MSP430/MSP430InstrInfo.h
index 06c0c71241..35e35db01c 100644
--- a/lib/Target/MSP430/MSP430InstrInfo.h
+++ b/lib/Target/MSP430/MSP430InstrInfo.h
@@ -59,9 +59,19 @@ public:
MachineBasicBlock::iterator MI,
const std::vector<CalleeSavedInfo> &CSI) const;
- virtual unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
- MachineBasicBlock *FBB,
- const SmallVectorImpl<MachineOperand> &Cond) const;
+ // Branch folding goodness
+ bool ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const;
+ bool BlockHasNoFallThrough(const MachineBasicBlock &MBB) const;
+ bool isUnpredicatedTerminator(const MachineInstr *MI) const;
+ bool AnalyzeBranch(MachineBasicBlock &MBB,
+ MachineBasicBlock *&TBB, MachineBasicBlock *&FBB,
+ SmallVectorImpl<MachineOperand> &Cond,
+ bool AllowModify) const;
+
+ unsigned RemoveBranch(MachineBasicBlock &MBB) const;
+ unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
+ MachineBasicBlock *FBB,
+ const SmallVectorImpl<MachineOperand> &Cond) const;
};