1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

[DAG] Avoid redundant chain transversal in store merge cycle check. NFCI.

Patch by Henric Karlsson.

llvm-svn: 339688
This commit is contained in:
Nirav Dave 2018-08-14 16:20:43 +00:00
parent 9b91648405
commit d7a762f343

View File

@ -13971,11 +13971,12 @@ bool DAGCombiner::checkMergeStoreCandidatesForDependencies(
Worklist.push_back(RootNode);
while (!Worklist.empty()) {
auto N = Worklist.pop_back_val();
if (!Visited.insert(N).second)
continue; // Already present in Visited.
if (N->getOpcode() == ISD::TokenFactor) {
for (SDValue Op : N->ops())
Worklist.push_back(Op.getNode());
}
Visited.insert(N);
}
// Don't count pruning nodes towards max.