summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorNirav Dave <niravd@google.com>2018-03-09 20:56:51 +0000
committerNirav Dave <niravd@google.com>2018-03-09 20:56:51 +0000
commit775f07d1210154756b9f0cb299517feaf9a8a7cb (patch)
treef33b242b2172a05484598193e963f54915f42616 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent43b055f8b1f4957a9d4b4196c34ff78fa8175985 (diff)
downloadbcm5719-llvm-775f07d1210154756b9f0cb299517feaf9a8a7cb.tar.gz
bcm5719-llvm-775f07d1210154756b9f0cb299517feaf9a8a7cb.zip
Make early exit hasPredecessorHelper return true. NFCI.
All uses conservatively assume in early exit case that it will be a predecessor. Changing default removes checking code in all uses. llvm-svn: 327169
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index ba06f6266ed..d0e2f918278 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -13102,14 +13102,10 @@ bool DAGCombiner::checkMergeStoreCandidatesForDependencies(
Worklist.push_back(n->getOperand(j).getNode());
}
// Search through DAG. We can stop early if we find a store node.
- for (unsigned i = 0; i < NumStores; ++i) {
+ for (unsigned i = 0; i < NumStores; ++i)
if (SDNode::hasPredecessorHelper(StoreNodes[i].MemNode, Visited, Worklist,
Max))
return false;
- // Check if we ended early, failing conservatively if so.
- if (Visited.size() >= Max)
- return false;
- }
return true;
}
OpenPOWER on IntegriCloud