summaryrefslogtreecommitdiff
path: root/lib/Target/MSP430/MSP430InstrInfo.h
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2010-01-15 21:19:05 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2010-01-15 21:19:05 +0000
commit702adaba6d7442f180c6bc0bec3a2b19e1169ed9 (patch)
tree469b3918ad02587111e77ddcf306ea731e812726 /lib/Target/MSP430/MSP430InstrInfo.h
parent05011a8aba3a4e8f011ac92990423947f8cbb15b (diff)
downloadllvm-702adaba6d7442f180c6bc0bec3a2b19e1169ed9.tar.gz
llvm-702adaba6d7442f180c6bc0bec3a2b19e1169ed9.tar.bz2
llvm-702adaba6d7442f180c6bc0bec3a2b19e1169ed9.tar.xz
Add branch relaxation pass (shamelessly stolen from PPC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93554 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MSP430/MSP430InstrInfo.h')
-rw-r--r--lib/Target/MSP430/MSP430InstrInfo.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/Target/MSP430/MSP430InstrInfo.h b/lib/Target/MSP430/MSP430InstrInfo.h
index e4ceeb9ca7..6ef4b0a28a 100644
--- a/lib/Target/MSP430/MSP430InstrInfo.h
+++ b/lib/Target/MSP430/MSP430InstrInfo.h
@@ -21,6 +21,22 @@ namespace llvm {
class MSP430TargetMachine;
+/// MSP430II - This namespace holds all of the target specific flags that
+/// instruction info tracks.
+///
+namespace MSP430II {
+ enum {
+ SizeShift = 2,
+ SizeMask = 7 << SizeShift,
+
+ SizeUnknown = 0 << SizeShift,
+ SizeSpecial = 1 << SizeShift,
+ Size2Bytes = 2 << SizeShift,
+ Size4Bytes = 3 << SizeShift,
+ Size6Bytes = 4 << SizeShift
+ };
+}
+
class MSP430InstrInfo : public TargetInstrInfoImpl {
const MSP430RegisterInfo RI;
MSP430TargetMachine &TM;
@@ -59,6 +75,8 @@ public:
MachineBasicBlock::iterator MI,
const std::vector<CalleeSavedInfo> &CSI) const;
+ unsigned GetInstSizeInBytes(const MachineInstr *MI) const;
+
// Branch folding goodness
bool ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const;
bool isUnpredicatedTerminator(const MachineInstr *MI) const;