[Polly] LLVM_DEBUG -> POLLY_DEBUG

This commit is contained in:
Michael Kruse 2026-02-03 21:04:41 +01:00
parent 1c5d702175
commit 0f88b5da06
2 changed files with 8 additions and 6 deletions

View File

@ -11,6 +11,7 @@
//===----------------------------------------------------------------------===//
#include "polly/Support/DumpFunctionPass.h"
#include "polly/Support/PollyDebug.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PassInstrumentation.h"
#include "llvm/Support/Debug.h"
@ -35,8 +36,8 @@ static void runDumpFunction(llvm::Function &F, StringRef Suffix) {
StringRef ModuleName = M->getName();
StringRef Stem = sys::path::stem(ModuleName);
std::string Dumpfile = (Twine(Stem) + "-" + FName + Suffix + ".ll").str();
LLVM_DEBUG(dbgs() << "Dumping function '" << FName << "' to '" << Dumpfile
<< "'...\n");
POLLY_DEBUG(dbgs() << "Dumping function '" << FName << "' to '" << Dumpfile
<< "'...\n");
ValueToValueMapTy VMap;
auto ShouldCloneDefinition = [&F](const GlobalValue *GV) -> bool {
@ -46,7 +47,7 @@ static void runDumpFunction(llvm::Function &F, StringRef Suffix) {
Function *NewF = cast<Function>(VMap.lookup(&F));
assert(NewF && "Expected selected function to be cloned");
LLVM_DEBUG(dbgs() << "Global DCE...\n");
POLLY_DEBUG(dbgs() << "Global DCE...\n");
// Stop F itself from being pruned
GlobalValue::LinkageTypes OrigLinkage = NewF->getLinkage();
@ -67,7 +68,7 @@ static void runDumpFunction(llvm::Function &F, StringRef Suffix) {
// Restore old linkage
NewF->setLinkage(OrigLinkage);
LLVM_DEBUG(dbgs() << "Write to file '" << Dumpfile << "'...\n");
POLLY_DEBUG(dbgs() << "Write to file '" << Dumpfile << "'...\n");
std::unique_ptr<ToolOutputFile> Out;
std::error_code EC;
@ -79,7 +80,7 @@ static void runDumpFunction(llvm::Function &F, StringRef Suffix) {
CM->print(Out->os(), nullptr);
Out->keep();
LLVM_DEBUG(dbgs() << "Dump file " << Dumpfile << " written successfully\n");
POLLY_DEBUG(dbgs() << "Dump file " << Dumpfile << " written successfully\n");
}
} // namespace

View File

@ -11,6 +11,7 @@
//===----------------------------------------------------------------------===//
#include "polly/Support/DumpModulePass.h"
#include "polly/Support/PollyDebug.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/FileSystem.h"
@ -33,7 +34,7 @@ static void runDumpModule(llvm::Module &M, StringRef Filename, bool IsSuffix) {
} else {
Dumpfile = Filename.str();
}
LLVM_DEBUG(dbgs() << "Dumping module to " << Dumpfile << '\n');
POLLY_DEBUG(dbgs() << "Dumping module to " << Dumpfile << '\n');
std::unique_ptr<ToolOutputFile> Out;
std::error_code EC;