Try to factorize the specification of saturating add/subtract operations a bit,
[oota-llvm.git] / lib / Target / Blackfin / BlackfinRegisterInfo.h
index 8af65a3ef847708516295a1b1e186e90ddfb8fdc..68ef08acb72b724bbd1a3055b8ef1e5d01ba6189 100644 (file)
@@ -24,16 +24,6 @@ namespace llvm {
   class TargetInstrInfo;
   class Type;
 
-  template<unsigned N>
-  static inline bool isImm(int x) {
-    return x >= -(1<<(N-1)) && x < (1<<(N-1));
-  }
-
-  template<unsigned N>
-  static inline bool isUimm(unsigned x) {
-    return x < (1<<N);
-  }
-
   // Subregister indices, keep in sync with BlackfinRegisterInfo.td
   enum BfinSubregIdx {
     bfin_subreg_lo16 = 1,
@@ -62,7 +52,7 @@ namespace llvm {
     }
 
     const TargetRegisterClass *getPhysicalRegisterRegClass(unsigned reg,
-                                                           MVT VT) const;
+                                                           EVT VT) const;
 
     bool hasFP(const MachineFunction &MF) const;
 
@@ -74,8 +64,9 @@ namespace llvm {
                                        MachineBasicBlock &MBB,
                                        MachineBasicBlock::iterator I) const;
 
-    void eliminateFrameIndex(MachineBasicBlock::iterator II,
-                             int SPAdj, RegScavenger *RS = NULL) const;
+    unsigned eliminateFrameIndex(MachineBasicBlock::iterator II,
+                                 int SPAdj, int *Value = NULL,
+                                 RegScavenger *RS = NULL) const;
 
     void processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
                                               RegScavenger *RS) const;
@@ -85,8 +76,7 @@ namespace llvm {
     void emitPrologue(MachineFunction &MF) const;
     void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
 
-    unsigned getFrameRegister(MachineFunction &MF) const;
-    int getFrameIndexOffset(MachineFunction &MF, int FI) const;
+    unsigned getFrameRegister(const MachineFunction &MF) const;
     unsigned getRARegister() const;
 
     // Exception handling queries.