aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/SparcV9/MachineCodeForInstruction.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-02-03 07:54:50 +0000
committerChris Lattner <sabre@nondot.org>2002-02-03 07:54:50 +0000
commitf2868ce228ca20f72d1c6fbe241de01975cfe609 (patch)
treeda152a11d3f66785dd821b8e452f3413fff565a0 /lib/Target/SparcV9/MachineCodeForInstruction.h
parentc8896771951d0cc769b6b40b27bcb420685cf718 (diff)
Code pulled out of MAchineInstr.(h|cpp)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1660 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9/MachineCodeForInstruction.h')
-rw-r--r--lib/Target/SparcV9/MachineCodeForInstruction.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/lib/Target/SparcV9/MachineCodeForInstruction.h b/lib/Target/SparcV9/MachineCodeForInstruction.h
new file mode 100644
index 0000000000..5d0cdd9133
--- /dev/null
+++ b/lib/Target/SparcV9/MachineCodeForInstruction.h
@@ -0,0 +1,48 @@
+//===-- llvm/CodeGen/MachineCodeForInstruction.h -----------------*- C++ -*--=//
+//
+// Representation of the sequence of machine instructions created
+// for a single VM instruction. Additionally records information
+// about hidden and implicit values used by the machine instructions:
+// about hidden values used by the machine instructions:
+//
+// "Temporary values" are intermediate values used in the machine
+// instruction sequence, but not in the VM instruction
+// Note that such values should be treated as pure SSA values with
+// no interpretation of their operands (i.e., as a TmpInstruction
+// object which actually represents such a value).
+//
+// (2) "Implicit uses" are values used in the VM instruction but not in
+// the machine instruction sequence
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CODEGEN_MACHINECODE_FOR_INSTRUCTION_H
+#define LLVM_CODEGEN_MACHINECODE_FOR_INSTRUCTION_H
+
+#include "llvm/Annotation.h"
+#include <vector>
+class MachineInstr;
+class Instruction;
+class Value;
+
+class MachineCodeForInstruction
+ : public Annotation, public std::vector<MachineInstr*> {
+ std::vector<Value*> tempVec; // used by m/c instr but not VM instr
+
+public:
+ MachineCodeForInstruction();
+ ~MachineCodeForInstruction();
+
+ static MachineCodeForInstruction &get(const Instruction *I);
+ static void destroy(const Instruction *I);
+
+ const std::vector<Value*> &getTempValues() const { return tempVec; }
+ std::vector<Value*> &getTempValues() { return tempVec; }
+
+ inline MachineCodeForInstruction &addTemp(Value *tmp) {
+ tempVec.push_back(tmp);
+ return *this;
+ }
+};
+
+#endif