diff options
author | John Criswell <criswell@uiuc.edu> | 2005-11-02 18:05:50 +0000 |
---|---|---|
committer | John Criswell <criswell@uiuc.edu> | 2005-11-02 18:05:50 +0000 |
commit | cfa435f79bf39fead32263a8b71c9ae440b55214 (patch) | |
tree | 2f1ef0a4c3fb5549b8bbb014891f92866d46e042 /lib/Target/SparcV9/MachineCodeForInstruction.h |
Mark these as failing on sparc instead of sparcv9.
The configure script no longer tells us that we're configuring for SparcV9
specifically.
2004-06-17-UnorderedCompares may work on SparcV8, but it's experiental
anyway.
2005-02-20-AggregateSAVEEXPR should fail on any Solaris machine, as Solaris
doesn't provide complex number support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_16@24155 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9/MachineCodeForInstruction.h')
-rw-r--r-- | lib/Target/SparcV9/MachineCodeForInstruction.h | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/lib/Target/SparcV9/MachineCodeForInstruction.h b/lib/Target/SparcV9/MachineCodeForInstruction.h new file mode 100644 index 0000000000..d961723450 --- /dev/null +++ b/lib/Target/SparcV9/MachineCodeForInstruction.h @@ -0,0 +1,97 @@ +//===-- MachineCodeForInstruction.h -----------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by the LLVM research group and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// FIXME: This file is SparcV9 specific. Do not rely on this class for new +// targets, it will go away in the future. +// +// 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 MACHINECODE_FOR_INSTRUCTION_H +#define MACHINECODE_FOR_INSTRUCTION_H + +#include <vector> + +namespace llvm { + +class MachineInstr; +class Instruction; +class Value; +class CallArgsDescriptor; + + class MachineCodeForInstruction { + 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() : callArgsDesc(NULL) {} + ~MachineCodeForInstruction(); + + static MachineCodeForInstruction &get(const Instruction *I); + static void destroy(const Instruction *I); + + // Access to underlying machine instructions... + typedef std::vector<MachineInstr*>::iterator iterator; + typedef std::vector<MachineInstr*>::const_iterator const_iterator; + + unsigned size() const { return Contents.size(); } + bool empty() const { return Contents.empty(); } + MachineInstr *front() const { return Contents.front(); } + MachineInstr *back() const { return Contents.back(); } + MachineInstr *&operator[](unsigned i) { return Contents[i]; } + MachineInstr *operator[](unsigned i) const { return Contents[i]; } + void pop_back() { Contents.pop_back(); } + + iterator begin() { return Contents.begin(); } + iterator end() { return Contents.end(); } + const_iterator begin() const { return Contents.begin(); } + const_iterator end() const { return Contents.end(); } + + template<class InIt> + void insert(iterator where, InIt first, InIt last) { + Contents.insert(where, first, last); + } + iterator erase(iterator where) { return Contents.erase(where); } + iterator erase(iterator s, iterator e) { return Contents.erase(s, e); } + + + // 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 + // these hidden instructions, before the values of a method are freed. + // + void dropAllReferences(); + + const std::vector<Value*> &getTempValues() const { return tempVec; } + std::vector<Value*> &getTempValues() { return tempVec; } + + MachineCodeForInstruction &addTemp(Value *tmp) { + tempVec.push_back(tmp); + return *this; + } + + void setCallArgsDescriptor(CallArgsDescriptor* desc) { callArgsDesc = desc; } + CallArgsDescriptor* getCallArgsDescriptor() const { return callArgsDesc; } +}; + +} // End llvm namespace + +#endif |