[Mlir-commits] [mlir] [mlir][acc] Fix unused variable warning in non-asserts build (PR #175101)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Jan 8 16:54:39 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Aiden Grossman (boomanaiden154)
<details>
<summary>Changes</summary>
f79f50cd547d0582af15aebd3a0413136b9311ae added a pass that has an iteration variable that is only used behind a LLVM_DEBUG macro which are no-op in release builds, thus leaving the variable unused.
---
Full diff: https://github.com/llvm/llvm-project/pull/175101.diff
1 Files Affected:
- (modified) mlir/lib/Dialect/OpenACC/Transforms/OffloadLiveInValueCanonicalization.cpp (+1-1)
``````````diff
diff --git a/mlir/lib/Dialect/OpenACC/Transforms/OffloadLiveInValueCanonicalization.cpp b/mlir/lib/Dialect/OpenACC/Transforms/OffloadLiveInValueCanonicalization.cpp
index 1392bddb123d0..ea7ee715189e3 100644
--- a/mlir/lib/Dialect/OpenACC/Transforms/OffloadLiveInValueCanonicalization.cpp
+++ b/mlir/lib/Dialect/OpenACC/Transforms/OffloadLiveInValueCanonicalization.cpp
@@ -285,7 +285,7 @@ class OffloadLiveInValueCanonicalization
// Canonicalization of values changes live-in set.
// Rerun the algorithm until convergence.
bool changes = false;
- int iteration = 0;
+ [[maybe_unused]] int iteration = 0;
do {
LLVM_DEBUG(llvm::dbgs() << "\tIteration " << iteration++ << "\n");
changes = canonicalizeLiveInValues(op->getRegion(0), accSupport);
``````````
</details>
https://github.com/llvm/llvm-project/pull/175101
More information about the Mlir-commits
mailing list