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/Target/AMDGPU/AMDGPULibCalls.cpp | |
| parent | cb4a407e5c2a8a5972781d2a3be362f437602fae (diff) | |
[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/Target/AMDGPU/AMDGPULibCalls.cpp')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp b/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp index 5c3abd9ce1e3..8767208d20ec 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp @@ -614,7 +614,7 @@ static bool isKnownIntegral(const Value *V, const DataLayout &DL, // Need to check int size cannot produce infinity, which computeKnownFPClass // knows how to do already. - return isKnownNeverInfinity(I, /*Depth=*/0, SimplifyQuery(DL)); + return isKnownNeverInfinity(I, SimplifyQuery(DL)); case Instruction::Call: { const CallInst *CI = cast<CallInst>(I); switch (CI->getIntrinsicID()) { @@ -626,7 +626,7 @@ static bool isKnownIntegral(const Value *V, const DataLayout &DL, case Intrinsic::round: case Intrinsic::roundeven: return (FMF.noInfs() && FMF.noNaNs()) || - isKnownNeverInfOrNaN(I, /*Depth=*/0, SimplifyQuery(DL)); + isKnownNeverInfOrNaN(I, SimplifyQuery(DL)); default: break; } @@ -764,7 +764,7 @@ bool AMDGPULibCalls::fold(CallInst *CI) { // TODO: Account for flags on current call if (PowrFunc && cannotBeOrderedLessThanZero( - FPOp->getOperand(0), /*Depth=*/0, + FPOp->getOperand(0), SimplifyQuery(M->getDataLayout(), TLInfo, DT, AC, Call))) { Call->setCalledFunction(PowrFunc); return fold_pow(FPOp, B, PowrInfo) || true; |
