mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-19 01:34:32 +00:00
Add support for TargetGlobalAddress nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22938 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7ef330478f
commit
aaaa0b67dd
@ -255,6 +255,9 @@ void SelectionDAG::RemoveNodeFromCSEMaps(SDNode *N) {
|
|||||||
case ISD::GlobalAddress:
|
case ISD::GlobalAddress:
|
||||||
GlobalValues.erase(cast<GlobalAddressSDNode>(N)->getGlobal());
|
GlobalValues.erase(cast<GlobalAddressSDNode>(N)->getGlobal());
|
||||||
break;
|
break;
|
||||||
|
case ISD::TargetGlobalAddress:
|
||||||
|
TargetGlobalValues.erase(cast<GlobalAddressSDNode>(N)->getGlobal());
|
||||||
|
break;
|
||||||
case ISD::FrameIndex:
|
case ISD::FrameIndex:
|
||||||
FrameIndices.erase(cast<FrameIndexSDNode>(N)->getIndex());
|
FrameIndices.erase(cast<FrameIndexSDNode>(N)->getIndex());
|
||||||
break;
|
break;
|
||||||
@ -413,7 +416,16 @@ SDOperand SelectionDAG::getGlobalAddress(const GlobalValue *GV,
|
|||||||
MVT::ValueType VT) {
|
MVT::ValueType VT) {
|
||||||
SDNode *&N = GlobalValues[GV];
|
SDNode *&N = GlobalValues[GV];
|
||||||
if (N) return SDOperand(N, 0);
|
if (N) return SDOperand(N, 0);
|
||||||
N = new GlobalAddressSDNode(GV,VT);
|
N = new GlobalAddressSDNode(false, GV, VT);
|
||||||
|
AllNodes.push_back(N);
|
||||||
|
return SDOperand(N, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
SDOperand SelectionDAG::getTargetGlobalAddress(const GlobalValue *GV,
|
||||||
|
MVT::ValueType VT) {
|
||||||
|
SDNode *&N = TargetGlobalValues[GV];
|
||||||
|
if (N) return SDOperand(N, 0);
|
||||||
|
N = new GlobalAddressSDNode(true, GV, VT);
|
||||||
AllNodes.push_back(N);
|
AllNodes.push_back(N);
|
||||||
return SDOperand(N, 0);
|
return SDOperand(N, 0);
|
||||||
}
|
}
|
||||||
@ -1907,6 +1919,7 @@ const char *SDNode::getOperationName(const SelectionDAG *G) const {
|
|||||||
case ISD::TargetConstant: return "TargetConstant";
|
case ISD::TargetConstant: return "TargetConstant";
|
||||||
case ISD::ConstantFP: return "ConstantFP";
|
case ISD::ConstantFP: return "ConstantFP";
|
||||||
case ISD::GlobalAddress: return "GlobalAddress";
|
case ISD::GlobalAddress: return "GlobalAddress";
|
||||||
|
case ISD::TargetGlobalAddress: return "TargetGlobalAddress";
|
||||||
case ISD::FrameIndex: return "FrameIndex";
|
case ISD::FrameIndex: return "FrameIndex";
|
||||||
case ISD::BasicBlock: return "BasicBlock";
|
case ISD::BasicBlock: return "BasicBlock";
|
||||||
case ISD::Register: return "Register";
|
case ISD::Register: return "Register";
|
||||||
|
Loading…
Reference in New Issue
Block a user