aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/MachineInstr.h
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2001-10-01 00:18:12 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2001-10-01 00:18:12 +0000
commit2a97dd1fc335cb8fd87c1fe6fada5f64006712c8 (patch)
treec611fceb0dab37a2eddadc5a41a0b969ab87ad12 /include/llvm/CodeGen/MachineInstr.h
parent4cecdd206ec0f2f9f24bb4149b31a383f90d7802 (diff)
downloadexternal_llvm-2a97dd1fc335cb8fd87c1fe6fada5f64006712c8.zip
external_llvm-2a97dd1fc335cb8fd87c1fe6fada5f64006712c8.tar.gz
external_llvm-2a97dd1fc335cb8fd87c1fe6fada5f64006712c8.tar.bz2
Add vector `implicitUses' to class MachineCodeForVMInstr to hold values
that are used by the VM instruction but not explicit operands of the m/c instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@684 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r--include/llvm/CodeGen/MachineInstr.h31
1 files changed, 19 insertions, 12 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index fa96a53..c9c5c51 100644
--- a/include/llvm/CodeGen/MachineInstr.h
+++ b/include/llvm/CodeGen/MachineInstr.h
@@ -363,29 +363,36 @@ public:
//
// Purpose:
// Representation of the sequence of machine instructions created
-// for a single VM instruction. Additionally records any temporary
-// "values" used as intermediate values in this sequence.
-// 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).
+// for a single VM instruction. Additionally records information
+// about hidden and implicit values used by the machine instructions:
+//
+// (1) "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
//
//---------------------------------------------------------------------------
class MachineCodeForVMInstr: public vector<MachineInstr*>
{
private:
- vector<Value*> tempVec;
+ vector< Value*> tempVec; // used by m/c instr but not VM instr
+ vector<const Value*> implicitUses; // used by VM instr but not m/c instr
public:
/*ctor*/ MachineCodeForVMInstr () {}
/*ctor*/ ~MachineCodeForVMInstr ();
- const vector<Value*>&
- getTempValues () const { return tempVec; }
+ const vector< Value*>& getTempValues () const { return tempVec; }
+ const vector<const Value*>& getImplicitUses() const { return implicitUses; }
+
+ void addTempValue ( Value* val) { tempVec.push_back(val); }
+ void addImplicitUse(const Value* val) { implicitUses.push_back(val);}
- void addTempValue (Value* val)
- { tempVec.push_back(val); }
-
// dropAllReferences() - This function drops all references within
// temporary (hidden) instructions created in implementing the original
// VM intruction. This ensures there are no remaining "uses" within
@@ -396,7 +403,7 @@ public:
inline void dropAllReferences() {
for (unsigned i=0, N=tempVec.size(); i < N; i++)
if (Instruction *I = tempVec[i]->castInstruction())
- I->dropAllReferences();
+ I->dropAllReferences();
}
};