diff --git a/mlir/lib/IR/MLIRContext.cpp b/mlir/lib/IR/MLIRContext.cpp index 2d5381d43f863..8d78929c00731 100644 --- a/mlir/lib/IR/MLIRContext.cpp +++ b/mlir/lib/IR/MLIRContext.cpp @@ -30,7 +30,7 @@ #include "llvm/Support/Allocator.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Compiler.h" -#include "llvm/Support/Debug.h" +#include "llvm/Support/DebugLog.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/Mutex.h" #include "llvm/Support/RWMutex.h" @@ -455,8 +455,7 @@ MLIRContext::getOrLoadDialect(StringRef dialectNamespace, TypeID dialectID, auto dialectIt = impl.loadedDialects.try_emplace(dialectNamespace, nullptr); if (dialectIt.second) { - LLVM_DEBUG(llvm::dbgs() - << "Load new dialect in Context " << dialectNamespace << "\n"); + LDBG() << "Load new dialect in Context " << dialectNamespace; #ifndef NDEBUG if (impl.multiThreadedExecutionContext != 0) llvm::report_fatal_error( @@ -525,8 +524,7 @@ DynamicDialect *MLIRContext::getOrLoadDynamicDialect( "' has already been registered"); } - LLVM_DEBUG(llvm::dbgs() << "Load new dynamic dialect in Context " - << dialectNamespace << "\n"); + LDBG() << "Load new dynamic dialect in Context " << dialectNamespace; #ifndef NDEBUG if (impl.multiThreadedExecutionContext != 0) llvm::report_fatal_error( @@ -1192,11 +1190,10 @@ willBeValidAffineMap(unsigned dimCount, unsigned symbolCount, getMaxDimAndSymbol(ArrayRef>(results), maxDimPosition, maxSymbolPosition); if ((maxDimPosition >= dimCount) || (maxSymbolPosition >= symbolCount)) { - LLVM_DEBUG( - llvm::dbgs() + LDBG() << "maximum dimensional identifier position in result expression must " "be less than `dimCount` and maximum symbolic identifier position " - "in result expression must be less than `symbolCount`\n"); + "in result expression must be less than `symbolCount`"; return false; } return true;