diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-10-29 19:38:46 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-10-29 19:38:46 +0000 |
commit | db6596e551ffd42326964b8e93dccb1dafd80d93 (patch) | |
tree | 2172a75a4456fa9f67e7a0399ec8c4fd19c0fe01 | |
parent | ea0d174f1a84123c57a669408e955093e271483d (diff) | |
download | bcm5719-llvm-db6596e551ffd42326964b8e93dccb1dafd80d93.tar.gz bcm5719-llvm-db6596e551ffd42326964b8e93dccb1dafd80d93.zip |
Move CallArgsDescriptor into this class instead of making it an
annotation on the machine instruction.
llvm-svn: 4398
-rw-r--r-- | llvm/include/llvm/CodeGen/MachineCodeForInstruction.h | 9 | ||||
-rw-r--r-- | llvm/lib/CodeGen/MachineCodeForInstruction.cpp | 5 |
2 files changed, 12 insertions, 2 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineCodeForInstruction.h b/llvm/include/llvm/CodeGen/MachineCodeForInstruction.h index 2193a80e529..f4ec42dbf3d 100644 --- a/llvm/include/llvm/CodeGen/MachineCodeForInstruction.h +++ b/llvm/include/llvm/CodeGen/MachineCodeForInstruction.h @@ -23,12 +23,14 @@ class MachineInstr; class Instruction; class Value; +class CallArgsDescriptor; extern AnnotationID MCFI_AID; class MachineCodeForInstruction : public Annotation { - std::vector<Value*> tempVec; // used by m/c instr but not VM instr - std::vector<MachineInstr*> Contents; + std::vector<Value*> tempVec; // used by m/c instr but not VM instr + std::vector<MachineInstr*> Contents; // the machine instr for this VM instr + CallArgsDescriptor* callArgsDesc; // only used for CALL instructions public: MachineCodeForInstruction() : Annotation(MCFI_AID) {} ~MachineCodeForInstruction(); @@ -81,6 +83,9 @@ public: tempVec.push_back(tmp); return *this; } + + void setCallArgsDescriptor(CallArgsDescriptor* desc) { callArgsDesc = desc; } + CallArgsDescriptor* getCallArgsDescriptor() const { return callArgsDesc; } }; #endif diff --git a/llvm/lib/CodeGen/MachineCodeForInstruction.cpp b/llvm/lib/CodeGen/MachineCodeForInstruction.cpp index f3080628ee8..7b2fb75c653 100644 --- a/llvm/lib/CodeGen/MachineCodeForInstruction.cpp +++ b/llvm/lib/CodeGen/MachineCodeForInstruction.cpp @@ -17,6 +17,7 @@ #include "llvm/CodeGen/MachineCodeForInstruction.h" #include "llvm/CodeGen/MachineInstr.h" +#include "llvm/CodeGen/MachineInstrAnnot.h" #include "llvm/CodeGen/InstrSelection.h" AnnotationID MCFI_AID( @@ -55,4 +56,8 @@ MachineCodeForInstruction::~MachineCodeForInstruction() // Free the MachineInstr objects allocated, if any. for (unsigned i=0, N = size(); i < N; i++) delete (*this)[i]; + + // Free the CallArgsDescriptor if it exists. + if (callArgsDesc) + delete callArgsDesc; } |