Added machine-independent value for INVALID_MACHINE_OPCODE.
authorVikram S. Adve <vadve@cs.uiuc.edu>
Mon, 18 Mar 2002 03:19:38 +0000 (03:19 +0000)
committerVikram S. Adve <vadve@cs.uiuc.edu>
Mon, 18 Mar 2002 03:19:38 +0000 (03:19 +0000)
Just cosmetic changes otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1898 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/MachineInstrInfo.h
include/llvm/Target/TargetInstrInfo.h

index ea623760488f05dbc22b2c1aa3c070feb3f7a220..b21d4c80e4366f4d4467a16ce7ad9d042b1b4893 100644 (file)
@@ -28,6 +28,9 @@ typedef int MachineOpCode;
 typedef int OpCodeMask;
 typedef int InstrSchedClass;
 
+const MachineOpCode INVALID_MACHINE_OPCODE = -1;
+
+
 // Global variable holding an array of descriptors for machine instructions.
 // The actual object needs to be created separately for each target machine.
 // This variable is initialized and reset by class MachineInstrInfo.
@@ -182,17 +185,10 @@ public:
   bool isDummyPhiInstr(const MachineOpCode opCode) const {
     return getDescriptor(opCode).iclass & M_DUMMY_PHI_FLAG;
   }
-
-
-  // delete this later *******
-  bool isPhi(const MachineOpCode opCode) const 
-  { return isDummyPhiInstr(opCode); }  
-  
   bool isPseudoInstr(const MachineOpCode opCode) const {
     return getDescriptor(opCode).iclass & M_PSEUDO_FLAG;
   }
-
-
+  
   // Check if an instruction can be issued before its operands are ready,
   // or if a subsequent instruction that uses its result can be issued
   // before the results are ready.
@@ -220,7 +216,7 @@ public:
   //
   // Which operand holds an immediate constant?  Returns -1 if none
   // 
-  virtual int getImmmedConstantPos(MachineOpCode opCode) const {
+  virtual int getImmedConstantPos(MachineOpCode opCode) const {
     return -1; // immediate position is machine specific, so say -1 == "none"
   }
   
@@ -252,7 +248,8 @@ public:
   // The generated instructions are returned in `minstrVec'.
   // Any temp. registers (TmpInstruction) created are returned in `tempVec'.
   // 
-  virtual void  CreateCodeToLoadConst(Value* val,
+  virtual void  CreateCodeToLoadConst(Method* method,
+                                      Value* val,
                                       Instruction* dest,
                                       std::vector<MachineInstr*>& minstrVec,
                                       std::vector<TmpInstruction*> &) const = 0;
@@ -283,11 +280,12 @@ public:
 
 
   // create copy instruction(s)
-  virtual void
-  CreateCopyInstructionsByType(const TargetMachine& target,
-                              Value* src,
-                              Instruction* dest,
-                              std::vector<MachineInstr*>& minstrVec) const = 0;
+  virtual void CreateCopyInstructionsByType(const TargetMachine& target,
+                                            Method* method,
+                                            Value* src,
+                                            Instruction* dest,
+                                            std::vector<MachineInstr*>& minstrVec)
+                                                                    const = 0;
 };
 
 #endif
index ea623760488f05dbc22b2c1aa3c070feb3f7a220..b21d4c80e4366f4d4467a16ce7ad9d042b1b4893 100644 (file)
@@ -28,6 +28,9 @@ typedef int MachineOpCode;
 typedef int OpCodeMask;
 typedef int InstrSchedClass;
 
+const MachineOpCode INVALID_MACHINE_OPCODE = -1;
+
+
 // Global variable holding an array of descriptors for machine instructions.
 // The actual object needs to be created separately for each target machine.
 // This variable is initialized and reset by class MachineInstrInfo.
@@ -182,17 +185,10 @@ public:
   bool isDummyPhiInstr(const MachineOpCode opCode) const {
     return getDescriptor(opCode).iclass & M_DUMMY_PHI_FLAG;
   }
-
-
-  // delete this later *******
-  bool isPhi(const MachineOpCode opCode) const 
-  { return isDummyPhiInstr(opCode); }  
-  
   bool isPseudoInstr(const MachineOpCode opCode) const {
     return getDescriptor(opCode).iclass & M_PSEUDO_FLAG;
   }
-
-
+  
   // Check if an instruction can be issued before its operands are ready,
   // or if a subsequent instruction that uses its result can be issued
   // before the results are ready.
@@ -220,7 +216,7 @@ public:
   //
   // Which operand holds an immediate constant?  Returns -1 if none
   // 
-  virtual int getImmmedConstantPos(MachineOpCode opCode) const {
+  virtual int getImmedConstantPos(MachineOpCode opCode) const {
     return -1; // immediate position is machine specific, so say -1 == "none"
   }
   
@@ -252,7 +248,8 @@ public:
   // The generated instructions are returned in `minstrVec'.
   // Any temp. registers (TmpInstruction) created are returned in `tempVec'.
   // 
-  virtual void  CreateCodeToLoadConst(Value* val,
+  virtual void  CreateCodeToLoadConst(Method* method,
+                                      Value* val,
                                       Instruction* dest,
                                       std::vector<MachineInstr*>& minstrVec,
                                       std::vector<TmpInstruction*> &) const = 0;
@@ -283,11 +280,12 @@ public:
 
 
   // create copy instruction(s)
-  virtual void
-  CreateCopyInstructionsByType(const TargetMachine& target,
-                              Value* src,
-                              Instruction* dest,
-                              std::vector<MachineInstr*>& minstrVec) const = 0;
+  virtual void CreateCopyInstructionsByType(const TargetMachine& target,
+                                            Method* method,
+                                            Value* src,
+                                            Instruction* dest,
+                                            std::vector<MachineInstr*>& minstrVec)
+                                                                    const = 0;
 };
 
 #endif