diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-10-29 19:41:18 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-10-29 19:41:18 +0000 |
commit | a2bae305fb5a870c4ef753ed290a7ddea73ec82b (patch) | |
tree | 84184c336ae242e515ce858a7d128da5524523ff /lib/Target/SparcV9 | |
parent | e68a3435ee6a695f1fd4b80c3d482e396001e0f5 (diff) | |
download | external_llvm-a2bae305fb5a870c4ef753ed290a7ddea73ec82b.zip external_llvm-a2bae305fb5a870c4ef753ed290a7ddea73ec82b.tar.gz external_llvm-a2bae305fb5a870c4ef753ed290a7ddea73ec82b.tar.bz2 |
Remove separate vector of implicit refs from MachineInstr, and
instead record them as extra operands in the operands[] vector.
Also, move CallArgsDescriptor into this class instead of making it an
annotation on the machine instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4399 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9')
-rw-r--r-- | lib/Target/SparcV9/MachineInstrAnnot.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/Target/SparcV9/MachineInstrAnnot.h b/lib/Target/SparcV9/MachineInstrAnnot.h index be3aaac..d206c6b 100644 --- a/lib/Target/SparcV9/MachineInstrAnnot.h +++ b/lib/Target/SparcV9/MachineInstrAnnot.h @@ -7,7 +7,6 @@ #ifndef MACHINE_INSTR_ANNOT_h #define MACHINE_INSTR_ANNOT_h -#include "llvm/Annotation.h" #include "llvm/CodeGen/MachineInstr.h" class Value; @@ -50,8 +49,8 @@ public: }; -class CallArgsDescriptor: public Annotation { // Annotation for a MachineInstr - static AnnotationID AID; // AnnotationID for this class +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 @@ -68,18 +67,16 @@ 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; } 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. - static inline CallArgsDescriptor *get(const MachineInstr* MI) { - return (CallArgsDescriptor *) MI->getAnnotation(AID); - } + // Mechanism to get the descriptor for a CALL MachineInstr. + // + static CallArgsDescriptor *get(const MachineInstr* MI); }; |