Added phi elimination code
[oota-llvm.git] / lib / Target / SparcV9 / SparcV9Internals.h
index ad04eb3ee73da68648bff2c469834903221d58ae..9b8fe177ef2753ca32638582630994477dbb5e65 100644 (file)
@@ -139,6 +139,15 @@ public:
                                            vector<MachineInstr*>& minstrVec,
                                            vector<TmpInstruction*>& tempVec,
                                            TargetMachine& target) const;
+
+ // create copy instruction(s)
+  virtual void
+  CreateCopyInstructionsByType(const TargetMachine& target,
+                             Value* src,
+                             Instruction* dest,
+                             vector<MachineInstr*>& minstrVec) const;
+
+
 };
 
 
@@ -271,6 +280,22 @@ class UltraSparcRegInfo : public MachineRegInfo
   }
 
 
+  int getRegType(int reg) const {
+    if( reg < 32 ) 
+      return IntRegType;
+    else if ( reg < (32 + 32) )
+      return FPSingleRegType;
+    else if ( reg < (64 + 32) )
+      return FPDoubleRegType;
+    else if( reg < (64+32+4) )
+      return FloatCCRegType;
+    else if( reg < (64+32+4+2) )  
+      return IntCCRegType;             
+    else 
+      assert(0 && "Invalid register number in getRegType");
+  }
+
+
 
   // ***TODO: See this method is necessary
 
@@ -284,8 +309,19 @@ class UltraSparcRegInfo : public MachineRegInfo
   MachineInstr * cpCCR2IntMI(const unsigned IntReg) const;
   MachineInstr * cpInt2CCRMI(const unsigned IntReg) const;
 
+
+
+  void moveInst2OrdVec(vector<MachineInstr *> &OrdVec, MachineInstr *UnordInst,
+                      PhyRegAlloc &PRA ) const;
+
   void OrderAddedInstrns( vector<MachineInstr *> &UnordVec, 
-                         vector<MachineInstr *> &OrdVec) const;
+                         vector<MachineInstr *> &OrdVec,
+                         PhyRegAlloc &PRA) const;
+
+
+
+
+
 
 
  public:
@@ -1251,7 +1287,7 @@ private:
   static const int MinStackFrameSize                       = 176;
   static const int NumFixedOutgoingArgs                    =   6;
   static const int SizeOfEachArgOnStack                    =   8;
-  static const int StaticAreaOffsetFromFP                  =  -1 + OFFSET;
+  static const int StaticAreaOffsetFromFP                  =  0 + OFFSET;
   static const int FirstIncomingArgOffsetFromFP            = 128 + OFFSET;
   static const int FirstOptionalIncomingArgOffsetFromFP    = 176 + OFFSET;
   static const int FirstOutgoingArgOffsetFromSP            = 128 + OFFSET;