Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions mlir/lib/Dialect/Affine/Analysis/LoopAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "llvm/Support/MathExtras.h"

#include "llvm/Support/Debug.h"
#include "llvm/Support/DebugLog.h"
#include <numeric>
#include <optional>

Expand Down Expand Up @@ -548,19 +549,19 @@ bool mlir::affine::isTilingValid(ArrayRef<AffineForOp> loops) {
// Check whether there is any negative direction vector in the
// dependence components found above, which means that dependence is
// violated by the default hyper-rect tiling method.
LLVM_DEBUG(llvm::dbgs() << "Checking whether tiling legality violated "
"for dependence at depth: "
<< Twine(d) << " between:\n";);
LLVM_DEBUG(srcAccess.opInst->dump());
LLVM_DEBUG(dstAccess.opInst->dump());
LDBG() << "Checking whether tiling legality violated "
<< "for dependence at depth: " << Twine(d) << " between:"
<< OpWithFlags(srcAccess.opInst, OpPrintingFlags().skipRegions())
<< "\nand:\n"
<< OpWithFlags(dstAccess.opInst,
OpPrintingFlags().skipRegions());
for (const DependenceComponent &depComp : depComps) {
if (depComp.lb.has_value() && depComp.ub.has_value() &&
*depComp.lb < *depComp.ub && *depComp.ub < 0) {
LLVM_DEBUG(llvm::dbgs()
<< "Dependence component lb = " << Twine(*depComp.lb)
<< " ub = " << Twine(*depComp.ub)
<< " is negative at depth: " << Twine(d)
<< " and thus violates the legality rule.\n");
LDBG() << "Dependence component lb = " << Twine(*depComp.lb)
<< " ub = " << Twine(*depComp.ub)
<< " is negative at depth: " << Twine(d)
<< " and thus violates the legality rule.";
return false;
}
}
Expand Down