|
21 | 21 | #include "llvm/Support/MathExtras.h" |
22 | 22 |
|
23 | 23 | #include "llvm/Support/Debug.h" |
| 24 | +#include "llvm/Support/DebugLog.h" |
24 | 25 | #include <numeric> |
25 | 26 | #include <optional> |
26 | 27 |
|
@@ -548,19 +549,19 @@ bool mlir::affine::isTilingValid(ArrayRef<AffineForOp> loops) { |
548 | 549 | // Check whether there is any negative direction vector in the |
549 | 550 | // dependence components found above, which means that dependence is |
550 | 551 | // violated by the default hyper-rect tiling method. |
551 | | - LLVM_DEBUG(llvm::dbgs() << "Checking whether tiling legality violated " |
552 | | - "for dependence at depth: " |
553 | | - << Twine(d) << " between:\n";); |
554 | | - LLVM_DEBUG(srcAccess.opInst->dump()); |
555 | | - LLVM_DEBUG(dstAccess.opInst->dump()); |
| 552 | + LDBG() << "Checking whether tiling legality violated " |
| 553 | + << "for dependence at depth: " << Twine(d) << " between:" |
| 554 | + << OpWithFlags(srcAccess.opInst, OpPrintingFlags().skipRegions()) |
| 555 | + << "\nand:\n" |
| 556 | + << OpWithFlags(dstAccess.opInst, |
| 557 | + OpPrintingFlags().skipRegions()); |
556 | 558 | for (const DependenceComponent &depComp : depComps) { |
557 | 559 | if (depComp.lb.has_value() && depComp.ub.has_value() && |
558 | 560 | *depComp.lb < *depComp.ub && *depComp.ub < 0) { |
559 | | - LLVM_DEBUG(llvm::dbgs() |
560 | | - << "Dependence component lb = " << Twine(*depComp.lb) |
561 | | - << " ub = " << Twine(*depComp.ub) |
562 | | - << " is negative at depth: " << Twine(d) |
563 | | - << " and thus violates the legality rule.\n"); |
| 561 | + LDBG() << "Dependence component lb = " << Twine(*depComp.lb) |
| 562 | + << " ub = " << Twine(*depComp.ub) |
| 563 | + << " is negative at depth: " << Twine(d) |
| 564 | + << " and thus violates the legality rule."; |
564 | 565 | return false; |
565 | 566 | } |
566 | 567 | } |
|
0 commit comments