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/Analysis/BasicAliasAnalysis.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/Analysis/BasicAliasAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/BasicAliasAnalysis.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp index bcc9a71..b110c20 100644 --- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp +++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp @@ -1261,8 +1261,7 @@ AliasResult BasicAAResult::aliasGEP( ConstantRange CR = computeConstantRange(Index.Val.V, /* ForSigned */ false, true, &AC, Index.CxtI); - KnownBits Known = - computeKnownBits(Index.Val.V, DL, 0, &AC, Index.CxtI, DT); + KnownBits Known = computeKnownBits(Index.Val.V, DL, &AC, Index.CxtI, DT); CR = CR.intersectWith( ConstantRange::fromKnownBits(Known, /* Signed */ true), ConstantRange::Signed); |