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/DemandedBits.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/DemandedBits.cpp')
-rw-r--r-- | llvm/lib/Analysis/DemandedBits.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/DemandedBits.cpp b/llvm/lib/Analysis/DemandedBits.cpp index b538e16..d7e2a3f 100644 --- a/llvm/lib/Analysis/DemandedBits.cpp +++ b/llvm/lib/Analysis/DemandedBits.cpp @@ -70,11 +70,11 @@ void DemandedBits::determineLiveOperandBits( const DataLayout &DL = UserI->getDataLayout(); Known = KnownBits(BitWidth); - computeKnownBits(V1, Known, DL, 0, &AC, UserI, &DT); + computeKnownBits(V1, Known, DL, &AC, UserI, &DT); if (V2) { Known2 = KnownBits(BitWidth); - computeKnownBits(V2, Known2, DL, 0, &AC, UserI, &DT); + computeKnownBits(V2, Known2, DL, &AC, UserI, &DT); } }; |