* Use the MachineConstantPool for storing constants instead of a hash_set;
[oota-llvm.git] / lib / Target / SparcV9 / MachineInstrAnnot.h
index b7e22d8138349840cb589011b81b822c794751d5..98dde590b8d01d6417d46b90eafbf4da9e740235 100644 (file)
@@ -1,4 +1,11 @@
 //===-- llvm/CodeGen/MachineInstrAnnot.h ------------------------*- C++ -*-===//
+// 
+//                     The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// 
+//===----------------------------------------------------------------------===//
 //
 //  Annotations used to pass information between code generation phases.
 // 
@@ -10,8 +17,6 @@
 #include "llvm/CodeGen/MachineInstr.h"
 #include "llvm/Target/TargetRegInfo.h"
 
-#include <assert.h>
-
 class Value;
 class TmpInstruction;
 class CallInst;
@@ -22,14 +27,14 @@ class CallArgInfo {
   static const unsigned char FPArgReg  = 0x2;
   static const unsigned char StackSlot = 0x4;
   
-  const Value* argVal;          // this argument
-  int          argCopyReg;      // register used for second copy of arg. when
+  Value*        argVal;         // this argument
+  int           argCopyReg;     // register used for second copy of arg. when
                                 // multiple  copies must be passed in registers
   unsigned char passingMethod;  // flags recording passing methods
   
 public:
   // Constructors
-  CallArgInfo(const Value* _argVal)
+  CallArgInfo(Value* _argVal)
     : argVal(_argVal), argCopyReg(TargetRegInfo::getInvalidRegNum()),
       passingMethod(0x0) {}
   
@@ -38,14 +43,14 @@ public:
       passingMethod(obj.passingMethod) {}
   
   // Accessor methods
-  const Value*  getArgVal()       { return argVal; }
+  Value*        getArgVal()       { return argVal; }
   int           getArgCopy()      { return argCopyReg; }
   bool          usesIntArgReg()   { return (bool) (passingMethod & IntArgReg);} 
   bool          usesFPArgReg()    { return (bool) (passingMethod & FPArgReg); } 
   bool          usesStackSlot()   { return (bool) (passingMethod & StackSlot);} 
   
   // Modifier methods
-  void          replaceArgVal(const Value* newVal) { argVal = newVal; }
+  void          replaceArgVal(Value* newVal) { argVal = newVal; }
   void          setUseIntArgReg() { passingMethod |= IntArgReg; }
   void          setUseFPArgReg()  { passingMethod |= FPArgReg; }
   void          setUseStackSlot() { passingMethod |= StackSlot; }
@@ -56,14 +61,14 @@ public:
 class CallArgsDescriptor {
 
   std::vector<CallArgInfo> argInfoVec;  // Descriptor for each argument
-  const CallInst* callInstr;            // The call instruction == result value
-  const Value* funcPtr;                 // Pointer for indirect calls 
+  CallInst* callInstr;                  // The call instruction == result value
+  Value* funcPtr;                       // Pointer for indirect calls 
   TmpInstruction* retAddrReg;           // Tmp value for return address reg.
   bool isVarArgs;                       // Is this a varargs call?
   bool noPrototype;                     // Is this a call with no prototype?
   
 public:
-  CallArgsDescriptor(const CallInst* _callInstr, TmpInstruction* _retAddrReg,
+  CallArgsDescriptor(CallInst* _callInstr, TmpInstruction* _retAddrReg,
                      bool _isVarArgs, bool _noPrototype);
   
   // Accessor methods to retrieve information about the call
@@ -71,9 +76,9 @@ public:
   unsigned int    getNumArgs() const          { return argInfoVec.size(); }
   CallArgInfo&    getArgInfo(unsigned int op) { assert(op < argInfoVec.size());
                                                 return argInfoVec[op]; }
-  const CallInst* getCallInst() const         { return callInstr; }
-  const CallInst* getReturnValue() const;
-  const Value*    getIndirectFuncPtr() const  { return funcPtr; }
+  CallInst*       getCallInst() const         { return callInstr; }
+  CallInst*       getReturnValue() const;
+  Value*          getIndirectFuncPtr() const  { return funcPtr; }
   TmpInstruction* getReturnAddrReg() const    { return retAddrReg; }
   bool            isVarArgsFunc() const       { return isVarArgs; }
   bool            hasNoPrototype() const      { return noPrototype; }