projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e35f1e
)
[DAG] Avoid redundant chain transversal in store merge cycle check. NFCI.
author
Nirav Dave
<niravd@google.com>
Tue, 14 Aug 2018 16:20:43 +0000
(16:20 +0000)
committer
Nirav Dave
<niravd@google.com>
Tue, 14 Aug 2018 16:20:43 +0000
(16:20 +0000)
Patch by Henric Karlsson.
llvm-svn: 339688
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index aaff88ab5ea4a90113439f6c10ac538985f226a3..5405f794b084f3738dd26f997463a5a95f335135 100644
(file)
--- a/
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@
-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.