[Mlir-commits] [mlir] 3c94154 - [mlir] Fix -Wunused-variable in Barvinok.cpp (NFC)

Jie Fu llvmlistbot at llvm.org
Mon Jan 22 04:14:09 PST 2024


Author: Jie Fu
Date: 2024-01-22T20:12:39+08:00
New Revision: 3c94154c860ea9c2fdd5775bd6ad31ac1db0c261

URL: https://github.com/llvm/llvm-project/commit/3c94154c860ea9c2fdd5775bd6ad31ac1db0c261
DIFF: https://github.com/llvm/llvm-project/commit/3c94154c860ea9c2fdd5775bd6ad31ac1db0c261.diff

LOG: [mlir] Fix -Wunused-variable in Barvinok.cpp (NFC)

llvm-project/mlir/lib/Analysis/Presburger/Barvinok.cpp:262:21:
 error: unused variable 'd' [-Werror,-Wunused-variable]
  for (const Point &d : ds)
                    ^
1 error generated.

Added: 
    

Modified: 
    mlir/lib/Analysis/Presburger/Barvinok.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Analysis/Presburger/Barvinok.cpp b/mlir/lib/Analysis/Presburger/Barvinok.cpp
index e0fd0dd8caa4d31..d2752ded6b43f59 100644
--- a/mlir/lib/Analysis/Presburger/Barvinok.cpp
+++ b/mlir/lib/Analysis/Presburger/Barvinok.cpp
@@ -259,9 +259,11 @@ std::pair<QuasiPolynomial, std::vector<Fraction>>
 substituteMuInTerm(unsigned numParams, ParamPoint v, std::vector<Point> ds,
                    Point mu) {
   unsigned numDims = mu.size();
+#ifndef NDEBUG
   for (const Point &d : ds)
     assert(d.size() == numDims &&
            "μ has to have the same number of dimensions as the generators!");
+#endif
 
   // First, the exponent in the numerator becomes
   // - (μ • u_1) * (floor(first col of v))


        


More information about the Mlir-commits mailing list