-// $Id$ -*-c++-*-
-//***************************************************************************
-// File:
-// MachineInstrAnnot.h
+//===-- llvm/CodeGen/MachineInstrAnnot.h ------------------------*- C++ -*-===//
+//
+// Annotations used to pass information between code generation phases.
//
-// Purpose:
-// Annotations used to pass information between code generation phases.
-//
-// History:
-// 5/10/02 - Vikram Adve - Created
-//**************************************************************************/
+//===----------------------------------------------------------------------===//
#ifndef MACHINE_INSTR_ANNOT_h
#define MACHINE_INSTR_ANNOT_h
#include "llvm/Annotation.h"
#include "llvm/CodeGen/MachineInstr.h"
-#include <vector>
class Value;
class TmpInstruction;
class CallInst;
-
class CallArgInfo {
-private:
// Flag values for different argument passing methods
static const unsigned char IntArgReg = 0x1;
static const unsigned char FPArgReg = 0x2;
class CallArgsDescriptor: public Annotation { // Annotation for a MachineInstr
-private:
static AnnotationID AID; // AnnotationID for this class
- std::vector<CallArgInfo> argInfoVec; // Descriptor for each argument
+ std::vector<CallArgInfo> argInfoVec; // Descriptor for each argument
const CallInst* callInstr; // The call instruction == result value
const Value* funcPtr; // Pointer for indirect calls
TmpInstruction* retAddrReg; // Tmp value for return address reg.
unsigned int getNumArgs() const { return argInfoVec.size(); }
CallArgInfo& getArgInfo(unsigned int op) { assert(op < argInfoVec.size());
return argInfoVec[op]; }
- const CallInst* getReturnValue() const { return callInstr; }
+ const CallInst* getReturnValue() const;
const Value* getIndirectFuncPtr() const { return funcPtr; }
TmpInstruction* getReturnAddrReg() const { return retAddrReg; }
bool isVarArgsFunc() const { return isVarArgs; }
bool hasNoPrototype() const { return noPrototype; }
-
+
// Annotation mechanism to annotate a MachineInstr with the descriptor.
// This is not demand-driven because annotations can only be created
// at restricted points during code generation.
};
-#endif MACHINE_INSTR_ANNOT_h
+#endif