mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-14 23:29:51 +00:00
Add support for TargetConstantPool node
llvm-svn: 23040
This commit is contained in:
parent
3cbdac1edb
commit
70cb011425
@ -101,6 +101,7 @@ public:
|
||||
SDOperand getFrameIndex(int FI, MVT::ValueType VT);
|
||||
SDOperand getTargetFrameIndex(int FI, MVT::ValueType VT);
|
||||
SDOperand getConstantPool(unsigned CPIdx, MVT::ValueType VT);
|
||||
SDOperand getTargetConstantPool(unsigned CPIdx, MVT::ValueType VT);
|
||||
SDOperand getBasicBlock(MachineBasicBlock *MBB);
|
||||
SDOperand getExternalSymbol(const char *Sym, MVT::ValueType VT);
|
||||
SDOperand getValueType(MVT::ValueType);
|
||||
@ -309,7 +310,7 @@ private:
|
||||
std::map<std::pair<uint64_t, MVT::ValueType>, SDNode*> TargetConstants;
|
||||
std::map<std::pair<uint64_t, MVT::ValueType>, SDNode*> ConstantFPs;
|
||||
std::map<int, SDNode*> FrameIndices, TargetFrameIndices;
|
||||
std::map<unsigned, SDNode*> ConstantPoolIndices;
|
||||
std::map<unsigned, SDNode*> ConstantPoolIndices, TargetConstantPoolIndices;
|
||||
std::map<MachineBasicBlock *, SDNode*> BBNodes;
|
||||
std::vector<SDNode*> ValueTypeNodes;
|
||||
std::map<std::string, SDNode*> ExternalSymbols;
|
||||
|
@ -66,6 +66,7 @@ namespace ISD {
|
||||
// dag, turning into a GlobalAddress operand.
|
||||
TargetGlobalAddress,
|
||||
TargetFrameIndex,
|
||||
TargetConstantPool,
|
||||
|
||||
// CopyToReg - This node has three operands: a chain, a register number to
|
||||
// set to this value, and a value.
|
||||
@ -830,15 +831,17 @@ class ConstantPoolSDNode : public SDNode {
|
||||
unsigned CPI;
|
||||
protected:
|
||||
friend class SelectionDAG;
|
||||
ConstantPoolSDNode(unsigned cpi, MVT::ValueType VT)
|
||||
: SDNode(ISD::ConstantPool, VT), CPI(cpi) {}
|
||||
ConstantPoolSDNode(unsigned cpi, MVT::ValueType VT, bool isTarget)
|
||||
: SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, VT),
|
||||
CPI(cpi) {}
|
||||
public:
|
||||
|
||||
unsigned getIndex() const { return CPI; }
|
||||
|
||||
static bool classof(const ConstantPoolSDNode *) { return true; }
|
||||
static bool classof(const SDNode *N) {
|
||||
return N->getOpcode() == ISD::ConstantPool;
|
||||
return N->getOpcode() == ISD::ConstantPool ||
|
||||
N->getOpcode() == ISD::TargetConstantPool;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user