[MLIR] Update MLIRContext to use the LDBG() style debug macro (NFC) (#154619)

This commit is contained in:
Mehdi Amini 2025-08-20 23:30:11 +02:00 committed by GitHub
parent ffbc8da8b5
commit 6445a75c98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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<ArrayRef<AffineExpr>>(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;