[llvm] 384d5e3 - [SelectionDAG] Remove SelectionDAG::getTargetMemSDNode now that its not used.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 23 15:14:29 PST 2020
Author: Craig Topper
Date: 2020-02-23T15:13:50-08:00
New Revision: 384d5e33fe2ea0b40119b003b60cfa8b21e3fd15
URL: https://github.com/llvm/llvm-project/commit/384d5e33fe2ea0b40119b003b60cfa8b21e3fd15
DIFF: https://github.com/llvm/llvm-project/commit/384d5e33fe2ea0b40119b003b60cfa8b21e3fd15.diff
LOG: [SelectionDAG] Remove SelectionDAG::getTargetMemSDNode now that its not used.
Targets are expected to use getMemIntrinsicNode and not provide
their own subclasses. X86 was previously the only user.
Added:
Modified:
llvm/include/llvm/CodeGen/SelectionDAG.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/SelectionDAG.h b/llvm/include/llvm/CodeGen/SelectionDAG.h
index dc9b1caca139..d1b498c525ea 100644
--- a/llvm/include/llvm/CodeGen/SelectionDAG.h
+++ b/llvm/include/llvm/CodeGen/SelectionDAG.h
@@ -1209,13 +1209,6 @@ class SelectionDAG {
ArrayRef<SDValue> Ops, MachineMemOperand *MMO,
ISD::MemIndexType IndexType);
- /// Return (create a new or find existing) a target-specific node.
- /// TargetMemSDNode should be derived class from MemSDNode.
- template <class TargetMemSDNode>
- SDValue getTargetMemSDNode(SDVTList VTs, ArrayRef<SDValue> Ops,
- const SDLoc &dl, EVT MemVT,
- MachineMemOperand *MMO);
-
/// Construct a node to track a Value* through the backend.
SDValue getSrcValue(const Value *v);
@@ -1856,41 +1849,6 @@ template <> struct GraphTraits<SelectionDAG*> : public GraphTraits<SDNode*> {
}
};
-template <class TargetMemSDNode>
-SDValue SelectionDAG::getTargetMemSDNode(SDVTList VTs,
- ArrayRef<SDValue> Ops,
- const SDLoc &dl, EVT MemVT,
- MachineMemOperand *MMO) {
- /// Compose node ID and try to find an existing node.
- FoldingSetNodeID ID;
- unsigned Opcode =
- TargetMemSDNode(dl.getIROrder(), DebugLoc(), VTs, MemVT, MMO).getOpcode();
- ID.AddInteger(Opcode);
- ID.AddPointer(VTs.VTs);
- for (auto& Op : Ops) {
- ID.AddPointer(Op.getNode());
- ID.AddInteger(Op.getResNo());
- }
- ID.AddInteger(MemVT.getRawBits());
- ID.AddInteger(MMO->getPointerInfo().getAddrSpace());
- ID.AddInteger(getSyntheticNodeSubclassData<TargetMemSDNode>(
- dl.getIROrder(), VTs, MemVT, MMO));
-
- void *IP = nullptr;
- if (SDNode *E = FindNodeOrInsertPos(ID, dl, IP)) {
- cast<TargetMemSDNode>(E)->refineAlignment(MMO);
- return SDValue(E, 0);
- }
-
- /// Existing node was not found. Create a new one.
- auto *N = newSDNode<TargetMemSDNode>(dl.getIROrder(), dl.getDebugLoc(), VTs,
- MemVT, MMO);
- createOperands(N, Ops);
- CSEMap.InsertNode(N, IP);
- InsertNode(N);
- return SDValue(N, 0);
-}
-
} // end namespace llvm
#endif // LLVM_CODEGEN_SELECTIONDAG_H
More information about the llvm-commits
mailing list