mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-08 03:30:22 +00:00
* Inline destructor
* Remove MachineCodeForVMInstr support (it's now an annotation) * Remove dropAllReferences override (just use User's) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1633 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
17a5a1ea38
commit
b393466842
@ -10,23 +10,21 @@
|
|||||||
|
|
||||||
#include "llvm/User.h"
|
#include "llvm/User.h"
|
||||||
|
|
||||||
class Type;
|
|
||||||
class BasicBlock;
|
class BasicBlock;
|
||||||
class Method;
|
class Method;
|
||||||
class MachineInstr;
|
|
||||||
class MachineCodeForVMInstr;
|
|
||||||
|
|
||||||
class Instruction : public User {
|
class Instruction : public User {
|
||||||
BasicBlock *Parent;
|
BasicBlock *Parent;
|
||||||
|
|
||||||
MachineCodeForVMInstr* machineInstrVec;
|
|
||||||
friend class ValueHolder<Instruction,BasicBlock,Method>;
|
friend class ValueHolder<Instruction,BasicBlock,Method>;
|
||||||
inline void setParent(BasicBlock *P) { Parent = P; }
|
inline void setParent(BasicBlock *P) { Parent = P; }
|
||||||
protected:
|
protected:
|
||||||
unsigned iType; // InstructionType
|
unsigned iType; // InstructionType
|
||||||
public:
|
public:
|
||||||
Instruction(const Type *Ty, unsigned iType, const std::string &Name = "");
|
Instruction(const Type *Ty, unsigned iType, const std::string &Name = "");
|
||||||
virtual ~Instruction(); // Virtual dtor == good.
|
virtual ~Instruction() {
|
||||||
|
assert(Parent == 0 && "Instruction still embedded in basic block!");
|
||||||
|
}
|
||||||
|
|
||||||
// Specialize setName to handle symbol table majik...
|
// Specialize setName to handle symbol table majik...
|
||||||
virtual void setName(const std::string &name, SymbolTable *ST = 0);
|
virtual void setName(const std::string &name, SymbolTable *ST = 0);
|
||||||
@ -44,17 +42,6 @@ public:
|
|||||||
inline BasicBlock *getParent() { return Parent; }
|
inline BasicBlock *getParent() { return Parent; }
|
||||||
virtual bool hasSideEffects() const { return false; } // Memory & Call insts
|
virtual bool hasSideEffects() const { return false; } // Memory & Call insts
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// Machine code accessors...
|
|
||||||
//
|
|
||||||
inline MachineCodeForVMInstr &getMachineInstrVec() const {
|
|
||||||
return *machineInstrVec;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add a machine instruction used to implement this instruction
|
|
||||||
//
|
|
||||||
void addMachineInstruction(MachineInstr* minstr);
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Subclass classification... getInstType() returns a member of
|
// Subclass classification... getInstType() returns a member of
|
||||||
// one of the enums that is coming soon (down below)...
|
// one of the enums that is coming soon (down below)...
|
||||||
@ -76,14 +63,6 @@ public:
|
|||||||
return iType >= FirstBinaryOp && iType < NumBinaryOps;
|
return iType >= FirstBinaryOp && iType < NumBinaryOps;
|
||||||
}
|
}
|
||||||
|
|
||||||
// dropAllReferences() - This function is in charge of "letting go" of all
|
|
||||||
// objects that this Instruction refers to. This first lets go of all
|
|
||||||
// references to hidden values generated code for this instruction,
|
|
||||||
// and then drops all references to its operands.
|
|
||||||
//
|
|
||||||
void dropAllReferences();
|
|
||||||
|
|
||||||
|
|
||||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const Instruction *I) { return true; }
|
static inline bool classof(const Instruction *I) { return true; }
|
||||||
static inline bool classof(const Value *V) {
|
static inline bool classof(const Value *V) {
|
||||||
|
Loading…
Reference in New Issue
Block a user