diff options
author | Ramkumar Ramachandra <ramkumar.ramachandra@codasip.com> | 2025-06-03 17:12:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-03 17:12:24 +0100 |
commit | b40e4ceaa61c5f14ca261e2952e7f85a066403e2 (patch) | |
tree | 22a01d10255678e3a57fae6fc962c3325bbebd00 /llvm/lib/Transforms/Utils/Local.cpp | |
parent | cb4a407e5c2a8a5972781d2a3be362f437602fae (diff) | |
download | llvm-b40e4ceaa61c5f14ca261e2952e7f85a066403e2.zip llvm-b40e4ceaa61c5f14ca261e2952e7f85a066403e2.tar.gz llvm-b40e4ceaa61c5f14ca261e2952e7f85a066403e2.tar.bz2 |
[ValueTracking] Make Depth last default arg (NFC) (#142384)
Having a finite Depth (or recursion limit) for computeKnownBits is very
limiting, but is currently a load-bearing necessity, as all KnownBits
are recomputed on each call and there is no caching. As a prerequisite
for an effort to remove the recursion limit altogether, either using a
clever caching technique, or writing a easily-invalidable KnownBits
analysis, make the Depth argument in APIs in ValueTracking uniformly the
last argument with a default value. This would aid in removing the
argument when the time comes, as many callers that currently pass 0
explicitly are now updated to omit the argument altogether.
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index a061872..be71cb6 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -1582,7 +1582,7 @@ Align llvm::getOrEnforceKnownAlignment(Value *V, MaybeAlign PrefAlign, assert(V->getType()->isPointerTy() && "getOrEnforceKnownAlignment expects a pointer!"); - KnownBits Known = computeKnownBits(V, DL, 0, AC, CxtI, DT); + KnownBits Known = computeKnownBits(V, DL, AC, CxtI, DT); unsigned TrailZ = Known.countMinTrailingZeros(); // Avoid trouble with ridiculously large TrailZ values, such as |