[Mlir-commits] [mlir] ca09dab - [MLIR][NFC] Fix/update debug messages for analysis utils and affine fusion

Uday Bondhugula llvmlistbot at llvm.org
Tue May 5 23:59:24 PDT 2020


Author: Uday Bondhugula
Date: 2020-05-06T12:27:59+05:30
New Revision: ca09dab303f4fd72343be10dbd362b60a5f91c45

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

LOG: [MLIR][NFC] Fix/update debug messages for analysis utils and affine fusion

Drop trailing period in debug messages. Add an extra line for fusion
debug info.

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

Added: 
    

Modified: 
    mlir/lib/Analysis/Utils.cpp
    mlir/lib/Transforms/LoopFusion.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Analysis/Utils.cpp b/mlir/lib/Analysis/Utils.cpp
index 8fc4accf2bbd..5151569d8067 100644
--- a/mlir/lib/Analysis/Utils.cpp
+++ b/mlir/lib/Analysis/Utils.cpp
@@ -571,7 +571,7 @@ LogicalResult mlir::computeSliceUnion(ArrayRef<Operation *> opsA,
       // Check if 'loopDepth' exceeds nesting depth of src/dst ops.
       if ((!isBackwardSlice && loopDepth > getNestingDepth(opsA[i])) ||
           (isBackwardSlice && loopDepth > getNestingDepth(opsB[j]))) {
-        LLVM_DEBUG(llvm::dbgs() << "Invalid loop depth\n.");
+        LLVM_DEBUG(llvm::dbgs() << "Invalid loop depth\n");
         return failure();
       }
 
@@ -584,7 +584,7 @@ LogicalResult mlir::computeSliceUnion(ArrayRef<Operation *> opsA,
           &dependenceConstraints, /*dependenceComponents=*/nullptr,
           /*allowRAR=*/readReadAccesses);
       if (result.value == DependenceResult::Failure) {
-        LLVM_DEBUG(llvm::dbgs() << "Dependence check failed\n.");
+        LLVM_DEBUG(llvm::dbgs() << "Dependence check failed\n");
         return failure();
       }
       if (result.value == DependenceResult::NoDependence)
@@ -601,7 +601,7 @@ LogicalResult mlir::computeSliceUnion(ArrayRef<Operation *> opsA,
         // Initialize 'sliceUnionCst' with the bounds computed in previous step.
         if (failed(tmpSliceState.getAsConstraints(&sliceUnionCst))) {
           LLVM_DEBUG(llvm::dbgs()
-                     << "Unable to compute slice bound constraints\n.");
+                     << "Unable to compute slice bound constraints\n");
           return failure();
         }
         assert(sliceUnionCst.getNumDimAndSymbolIds() > 0);
@@ -612,7 +612,7 @@ LogicalResult mlir::computeSliceUnion(ArrayRef<Operation *> opsA,
       FlatAffineConstraints tmpSliceCst;
       if (failed(tmpSliceState.getAsConstraints(&tmpSliceCst))) {
         LLVM_DEBUG(llvm::dbgs()
-                   << "Unable to compute slice bound constraints\n.");
+                   << "Unable to compute slice bound constraints\n");
         return failure();
       }
 
@@ -645,8 +645,7 @@ LogicalResult mlir::computeSliceUnion(ArrayRef<Operation *> opsA,
           tmpSliceCst.getNumLocalIds() > 0 ||
           failed(sliceUnionCst.unionBoundingBox(tmpSliceCst))) {
         LLVM_DEBUG(llvm::dbgs()
-                   << "Unable to compute union bounding box of slice bounds."
-                      "\n.");
+                   << "Unable to compute union bounding box of slice bounds\n");
         return failure();
       }
     }
@@ -665,7 +664,7 @@ LogicalResult mlir::computeSliceUnion(ArrayRef<Operation *> opsA,
   unsigned innermostCommonLoopDepth =
       getInnermostCommonLoopDepth(ops, surroundingLoops);
   if (loopDepth > innermostCommonLoopDepth) {
-    LLVM_DEBUG(llvm::dbgs() << "Exceeds max loop depth\n.");
+    LLVM_DEBUG(llvm::dbgs() << "Exceeds max loop depth\n");
     return failure();
   }
 

diff  --git a/mlir/lib/Transforms/LoopFusion.cpp b/mlir/lib/Transforms/LoopFusion.cpp
index 1340c25b817b..c8c33f345496 100644
--- a/mlir/lib/Transforms/LoopFusion.cpp
+++ b/mlir/lib/Transforms/LoopFusion.cpp
@@ -1063,8 +1063,8 @@ static bool isFusionProfitable(Operation *srcOpInst, Operation *srcStoreOpInst,
                                unsigned *dstLoopDepth, bool maximalFusion,
                                double computeToleranceThreshold) {
   LLVM_DEBUG({
-    llvm::dbgs() << "Checking whether fusion is profitable between:\n";
-    llvm::dbgs() << " " << *srcOpInst << " and \n";
+    llvm::dbgs() << "Checking whether fusion is profitable between src op:\n";
+    llvm::dbgs() << ' ' << *srcOpInst << " and destination op(s)\n";
     for (auto dstOpInst : dstLoadOpInsts) {
       llvm::dbgs() << " " << *dstOpInst << "\n";
     };


        


More information about the Mlir-commits mailing list