summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-10-19 18:26:16 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-10-19 18:26:16 +0000
commit2002aadaadcf28f669a9bacea85973afea812cda (patch)
treef55b417075bd36325937a95d8885d6fafff678d8 /llvm/lib/CodeGen
parent80fee77e758566356834141f71d694c638790404 (diff)
downloadbcm5719-llvm-2002aadaadcf28f669a9bacea85973afea812cda.tar.gz
bcm5719-llvm-2002aadaadcf28f669a9bacea85973afea812cda.zip
Put back SelectionDAG::getTargetIndex.
While technically this is untested dead code, it has out-of-tree users. This reverts a part of r250434. llvm-svn: 250717
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 8b03fe65d6c..bd948f5b5d0 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -1398,6 +1398,24 @@ SDValue SelectionDAG::getConstantPool(MachineConstantPoolValue *C, EVT VT,
return SDValue(N, 0);
}
+SDValue SelectionDAG::getTargetIndex(int Index, EVT VT, int64_t Offset,
+ unsigned char TargetFlags) {
+ FoldingSetNodeID ID;
+ AddNodeIDNode(ID, ISD::TargetIndex, getVTList(VT), None);
+ ID.AddInteger(Index);
+ ID.AddInteger(Offset);
+ ID.AddInteger(TargetFlags);
+ void *IP = nullptr;
+ if (SDNode *E = FindNodeOrInsertPos(ID, IP))
+ return SDValue(E, 0);
+
+ SDNode *N =
+ new (NodeAllocator) TargetIndexSDNode(Index, VT, Offset, -TargetFlags);
+ CSEMap.InsertNode(N, IP);
+ InsertNode(N);
+ return SDValue(N, 0);
+}
+
SDValue SelectionDAG::getBasicBlock(MachineBasicBlock *MBB) {
FoldingSetNodeID ID;
AddNodeIDNode(ID, ISD::BasicBlock, getVTList(MVT::Other), None);
OpenPOWER on IntegriCloud