[llvm-branch-commits] [llvm] 37532c3 - [SDAG] Use DAG.getTokenFactor in more places (#210949)
Douglas Yung via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jul 22 06:59:48 PDT 2026
Author: David Green
Date: 2026-07-22T13:59:33Z
New Revision: 37532c319a905e75c6a9b028989da2d1b6073692
URL: https://github.com/llvm/llvm-project/commit/37532c319a905e75c6a9b028989da2d1b6073692
DIFF: https://github.com/llvm/llvm-project/commit/37532c319a905e75c6a9b028989da2d1b6073692.diff
LOG: [SDAG] Use DAG.getTokenFactor in more places (#210949)
This will cause the TokenFactor to be split into nodes of at most
SDNode::getMaxNumOperands() size.
This fixes #189161 but I have not added a test case as the output is
in excess of 160000 lines long.
(cherry picked from commit ba836590ffed1305a770fc18f4a3f676f9829df1)
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 9719d603e1869..584de3e1132ce 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -9563,7 +9563,7 @@ getMemcpyLoadsAndStores(SelectionDAG &DAG, const SDLoc &dl, SDValue Chain,
}
}
}
- return DAG.getNode(ISD::TokenFactor, dl, MVT::Other, OutChains);
+ return DAG.getTokenFactor(dl, OutChains);
}
static SDValue getMemmoveLoadsAndStores(
@@ -9674,7 +9674,7 @@ static SDValue getMemmoveLoadsAndStores(
LoadChains.push_back(Value.getValue(1));
SrcOff += VTSize;
}
- Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, LoadChains);
+ Chain = DAG.getTokenFactor(dl, LoadChains);
OutChains.clear();
uint64_t DstOff = 0;
for (unsigned i = 0; i < NumMemOps; i++) {
@@ -9716,7 +9716,7 @@ static SDValue getMemmoveLoadsAndStores(
DstOff += VTSize;
}
- return DAG.getNode(ISD::TokenFactor, dl, MVT::Other, OutChains);
+ return DAG.getTokenFactor(dl, OutChains);
}
/// Lower the call to 'memset' intrinsic function into a series of store
@@ -9871,7 +9871,7 @@ static SDValue getMemsetStores(SelectionDAG &DAG, const SDLoc &dl,
assert(Size == 0 && "Target's findOptimalMemOpLowering did not specify "
"stores that exactly cover the memset size");
- return DAG.getNode(ISD::TokenFactor, dl, MVT::Other, OutChains);
+ return DAG.getTokenFactor(dl, OutChains);
}
static void checkAddrSpaceIsValidForLibcall(const TargetLowering *TLI,
More information about the llvm-branch-commits
mailing list