[Mlir-commits] [mlir] 36fd729 - [mlir][Quasipolynomial] Fixed -Wunused-variable in GeneratorFunction.h (#76419)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Dec 26 17:29:08 PST 2023


Author: Balaji V. Iyer
Date: 2023-12-26T19:29:04-06:00
New Revision: 36fd7291cdd85b2820000950d3782758353d259e

URL: https://github.com/llvm/llvm-project/commit/36fd7291cdd85b2820000950d3782758353d259e
DIFF: https://github.com/llvm/llvm-project/commit/36fd7291cdd85b2820000950d3782758353d259e.diff

LOG: [mlir][Quasipolynomial] Fixed -Wunused-variable in GeneratorFunction.h (#76419)

```
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.
```

Added: 
    

Modified: 
    mlir/lib/Analysis/Presburger/GeneratingFunction.h

Removed: 
    


################################################################################
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; }


        


More information about the Mlir-commits mailing list