summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2002-05-19 15:30:21 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2002-05-19 15:30:21 +0000
commit1e45411a31572eb98a4f2cc0618203a533224197 (patch)
treec860ff2998fdc95d0c7f384f46d375347733f507 /llvm/lib/CodeGen
parent2780d2dacb28540e26bc1f9f80243ca4d991e9e0 (diff)
downloadbcm5719-llvm-1e45411a31572eb98a4f2cc0618203a533224197.tar.gz
bcm5719-llvm-1e45411a31572eb98a4f2cc0618203a533224197.zip
Annotation class for MachineInstr.
llvm-svn: 2643
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/MachineInstrAnnot.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineInstrAnnot.cpp b/llvm/lib/CodeGen/MachineInstrAnnot.cpp
new file mode 100644
index 00000000000..c5c0c3fe099
--- /dev/null
+++ b/llvm/lib/CodeGen/MachineInstrAnnot.cpp
@@ -0,0 +1,39 @@
+// $Id$ -*-c++-*-
+//***************************************************************************
+// File:
+// MachineInstrAnnot.cpp
+//
+// Purpose:
+// Annotations used to pass information between code generation phases.
+//
+// History:
+// 5/10/02 - Vikram Adve - Created
+//**************************************************************************/
+
+#include "llvm/CodeGen/MachineInstrAnnot.h"
+#include "llvm/Annotation.h"
+#include "llvm/iOther.h"
+#include <vector>
+
+
+AnnotationID CallArgsDescriptor::AID(AnnotationManager::
+ getID("CodeGen::CallArgsDescriptor"));
+
+CallArgsDescriptor::CallArgsDescriptor(const CallInst* _callInstr,
+ TmpInstruction* _retAddrReg,
+ bool _isVarArgs, bool _noPrototype)
+ : Annotation(AID),
+ callInstr(_callInstr),
+ funcPtr(isa<Function>(_callInstr->getCalledValue())
+ ? NULL : _callInstr->getCalledValue()),
+ retAddrReg(_retAddrReg),
+ isVarArgs(_isVarArgs),
+ noPrototype(_noPrototype)
+{
+ unsigned int numArgs = callInstr->getNumOperands();
+ argInfoVec.reserve(numArgs);
+ assert(callInstr->getOperand(0) == callInstr->getCalledValue()
+ && "Operand 0 is ignored in the loop below!");
+ for (unsigned int i=1; i < numArgs; ++i)
+ argInfoVec.push_back(CallArgInfo(callInstr->getOperand(i)));
+}
OpenPOWER on IntegriCloud