mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-30 07:00:57 +00:00
Move CallArgsDescriptor into this class instead of making it an
annotation on the machine instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4398 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
aabb595c4f
commit
e68a3435ee
@ -23,12 +23,14 @@
|
|||||||
class MachineInstr;
|
class MachineInstr;
|
||||||
class Instruction;
|
class Instruction;
|
||||||
class Value;
|
class Value;
|
||||||
|
class CallArgsDescriptor;
|
||||||
|
|
||||||
extern AnnotationID MCFI_AID;
|
extern AnnotationID MCFI_AID;
|
||||||
|
|
||||||
class MachineCodeForInstruction : public Annotation {
|
class MachineCodeForInstruction : public Annotation {
|
||||||
std::vector<Value*> tempVec; // used by m/c instr but not VM instr
|
std::vector<Value*> tempVec; // used by m/c instr but not VM instr
|
||||||
std::vector<MachineInstr*> Contents;
|
std::vector<MachineInstr*> Contents; // the machine instr for this VM instr
|
||||||
|
CallArgsDescriptor* callArgsDesc; // only used for CALL instructions
|
||||||
public:
|
public:
|
||||||
MachineCodeForInstruction() : Annotation(MCFI_AID) {}
|
MachineCodeForInstruction() : Annotation(MCFI_AID) {}
|
||||||
~MachineCodeForInstruction();
|
~MachineCodeForInstruction();
|
||||||
@ -81,6 +83,9 @@ public:
|
|||||||
tempVec.push_back(tmp);
|
tempVec.push_back(tmp);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setCallArgsDescriptor(CallArgsDescriptor* desc) { callArgsDesc = desc; }
|
||||||
|
CallArgsDescriptor* getCallArgsDescriptor() const { return callArgsDesc; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
|
#include "llvm/CodeGen/MachineInstrAnnot.h"
|
||||||
#include "llvm/CodeGen/InstrSelection.h"
|
#include "llvm/CodeGen/InstrSelection.h"
|
||||||
|
|
||||||
AnnotationID MCFI_AID(
|
AnnotationID MCFI_AID(
|
||||||
@ -55,4 +56,8 @@ MachineCodeForInstruction::~MachineCodeForInstruction()
|
|||||||
// Free the MachineInstr objects allocated, if any.
|
// Free the MachineInstr objects allocated, if any.
|
||||||
for (unsigned i=0, N = size(); i < N; i++)
|
for (unsigned i=0, N = size(); i < N; i++)
|
||||||
delete (*this)[i];
|
delete (*this)[i];
|
||||||
|
|
||||||
|
// Free the CallArgsDescriptor if it exists.
|
||||||
|
if (callArgsDesc)
|
||||||
|
delete callArgsDesc;
|
||||||
}
|
}
|
||||||
|
@ -23,12 +23,14 @@
|
|||||||
class MachineInstr;
|
class MachineInstr;
|
||||||
class Instruction;
|
class Instruction;
|
||||||
class Value;
|
class Value;
|
||||||
|
class CallArgsDescriptor;
|
||||||
|
|
||||||
extern AnnotationID MCFI_AID;
|
extern AnnotationID MCFI_AID;
|
||||||
|
|
||||||
class MachineCodeForInstruction : public Annotation {
|
class MachineCodeForInstruction : public Annotation {
|
||||||
std::vector<Value*> tempVec; // used by m/c instr but not VM instr
|
std::vector<Value*> tempVec; // used by m/c instr but not VM instr
|
||||||
std::vector<MachineInstr*> Contents;
|
std::vector<MachineInstr*> Contents; // the machine instr for this VM instr
|
||||||
|
CallArgsDescriptor* callArgsDesc; // only used for CALL instructions
|
||||||
public:
|
public:
|
||||||
MachineCodeForInstruction() : Annotation(MCFI_AID) {}
|
MachineCodeForInstruction() : Annotation(MCFI_AID) {}
|
||||||
~MachineCodeForInstruction();
|
~MachineCodeForInstruction();
|
||||||
@ -81,6 +83,9 @@ public:
|
|||||||
tempVec.push_back(tmp);
|
tempVec.push_back(tmp);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setCallArgsDescriptor(CallArgsDescriptor* desc) { callArgsDesc = desc; }
|
||||||
|
CallArgsDescriptor* getCallArgsDescriptor() const { return callArgsDesc; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user