aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/SelectionDAGNodes.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-09-01 16:28:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-09-01 16:28:56 +0000
commit26811f17f27f789694206ef60f82afc001da8e4a (patch)
tree44c2c31cde25dceb8fe8bacce1457d7dc345a0a2 /include/llvm/CodeGen/SelectionDAGNodes.h
parent5e529592b17880abebd71c233b1cb848c32abeb6 (diff)
downloadsrc-vendor/llvm/llvm-release_50-r312293.tar.gz
src-vendor/llvm/llvm-release_50-r312293.zip
Vendor import of llvm release_50 branch r312293:vendor/llvm/llvm-release_50-r312293
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGNodes.h')
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index 051c93601d3f..5fb69ae232af 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -801,7 +801,8 @@ public:
/// if DAG changes.
static bool hasPredecessorHelper(const SDNode *N,
SmallPtrSetImpl<const SDNode *> &Visited,
- SmallVectorImpl<const SDNode *> &Worklist) {
+ SmallVectorImpl<const SDNode *> &Worklist,
+ unsigned int MaxSteps = 0) {
if (Visited.count(N))
return true;
while (!Worklist.empty()) {
@@ -816,6 +817,8 @@ public:
}
if (Found)
return true;
+ if (MaxSteps != 0 && Visited.size() >= MaxSteps)
+ return false;
}
return false;
}