forked from OSchip/llvm-project
[DAG] Avoid redundant chain transversal in store merge cycle check. NFCI.
Patch by Henric Karlsson. llvm-svn: 339688
This commit is contained in:
parent
8e35f1e7cb
commit
fbfe2ad9e0
|
@ -13971,11 +13971,12 @@ bool DAGCombiner::checkMergeStoreCandidatesForDependencies(
|
||||||
Worklist.push_back(RootNode);
|
Worklist.push_back(RootNode);
|
||||||
while (!Worklist.empty()) {
|
while (!Worklist.empty()) {
|
||||||
auto N = Worklist.pop_back_val();
|
auto N = Worklist.pop_back_val();
|
||||||
|
if (!Visited.insert(N).second)
|
||||||
|
continue; // Already present in Visited.
|
||||||
if (N->getOpcode() == ISD::TokenFactor) {
|
if (N->getOpcode() == ISD::TokenFactor) {
|
||||||
for (SDValue Op : N->ops())
|
for (SDValue Op : N->ops())
|
||||||
Worklist.push_back(Op.getNode());
|
Worklist.push_back(Op.getNode());
|
||||||
}
|
}
|
||||||
Visited.insert(N);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't count pruning nodes towards max.
|
// Don't count pruning nodes towards max.
|
||||||
|
|
Loading…
Reference in New Issue