[Mlir-commits] [mlir] [mlir][Quasipolynomial] Fixed -Wunused-variable in GeneratorFunction.h (PR #76419)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Dec 26 16:30:14 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Balaji V. Iyer. (bviyer)
<details>
<summary>Changes</summary>
```
llvm-project/mlir/lib/Analysis/Presburger/GeneratingFunction.h:56:28:
error: unused variable 'term' [-Werror,-Wunused-variable]
56 | for (const ParamPoint &term : numerators)
| ^~~~
1 error generated.
```
---
Full diff: https://github.com/llvm/llvm-project/pull/76419.diff
1 Files Affected:
- (modified) mlir/lib/Analysis/Presburger/GeneratingFunction.h (+2)
``````````diff
diff --git a/mlir/lib/Analysis/Presburger/GeneratingFunction.h b/mlir/lib/Analysis/Presburger/GeneratingFunction.h
index dad9594f960d1b..f7deba921ea51e 100644
--- a/mlir/lib/Analysis/Presburger/GeneratingFunction.h
+++ b/mlir/lib/Analysis/Presburger/GeneratingFunction.h
@@ -53,10 +53,12 @@ class GeneratingFunction {
std::vector<ParamPoint> nums,
std::vector<std::vector<Point>> dens)
: numParam(numParam), signs(signs), numerators(nums), denominators(dens) {
+#ifndef NDEBUG
for (const ParamPoint &term : numerators)
assert(term.getNumColumns() == numParam + 1 &&
"dimensionality of numerator exponents does not match number of "
"parameters!");
+#endif // NDEBUG
}
unsigned getNumParams() { return numParam; }
``````````
</details>
https://github.com/llvm/llvm-project/pull/76419
More information about the Mlir-commits
mailing list