[NFC] Wrap MLIR addAffineForOpDomain warning with LLVM_DEBUG
authorTharindu Rusira <tharindurusira@gmail.com>
Thu, 23 Sep 2021 07:24:24 +0000 (12:54 +0530)
committerShivam Gupta <shivam98.tkg@gmail.com>
Thu, 23 Sep 2021 07:50:16 +0000 (13:20 +0530)
Current warning message in method `addAffineForOpDomain` of mlir/lib/Analysis/AffineStructures.cpp is being printed to the stdout/stderr.
This patch redirects the warning with LLVM_DEBUG following standard llvm practice.

Reviewed By: bondhugula

Differential Revision: https://reviews.llvm.org/D108340

mlir/lib/Analysis/AffineStructures.cpp

index d170421..69b0aa7 100644 (file)
@@ -628,7 +628,7 @@ FlatAffineValueConstraints::addAffineForOpDomain(AffineForOp forOp) {
   int64_t step = forOp.getStep();
   if (step != 1) {
     if (!forOp.hasConstantLowerBound())
-      forOp.emitWarning("domain conservatively approximated");
+      LLVM_DEBUG(forOp.emitWarning("domain conservatively approximated"));
     else {
       // Add constraints for the stride.
       // (iv - lb) % step = 0 can be written as: