aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2021-05-14 11:35:02 +0100
committerSimon Pilgrim <llvm-dev@redking.me.uk>2021-05-14 11:42:51 +0100
commit78c8451cd7b1d789fdd81beac0d3f7172bdce31c (patch)
tree528123b44214076bd97e2b2b83dab51343138363 /llvm/lib/Transforms/Utils/Local.cpp
parent7ba0e99aec6e461f41ebad608893f8c280836165 (diff)
downloadllvm-78c8451cd7b1d789fdd81beac0d3f7172bdce31c.zip
llvm-78c8451cd7b1d789fdd81beac0d3f7172bdce31c.tar.gz
llvm-78c8451cd7b1d789fdd81beac0d3f7172bdce31c.tar.bz2
[Local] collectBitParts - reduce maximum recursion depth.
As noticed on D90170, the recursion depth for matching a maximum of a i128 bitwidth was too high. @lebedev.ri mentioned that we can probably do better by limiting the number of collected Values instead of just depth, but I'll look at that later.
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index ecabe21..1f0646d 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -111,8 +111,8 @@ static cl::opt<unsigned> PHICSENumPHISmallSize(
"perform a (faster!) exhaustive search instead of set-driven one."));
// Max recursion depth for collectBitParts used when detecting bswap and
-// bitreverse idioms
-static const unsigned BitPartRecursionMaxDepth = 64;
+// bitreverse idioms.
+static const unsigned BitPartRecursionMaxDepth = 48;
//===----------------------------------------------------------------------===//
// Local constant propagation.