diff --git a/llvm/lib/Analysis/ACPOBWModel.cpp b/llvm/lib/Analysis/ACPOBWModel.cpp index 28b6ab41be3bb30909e4a853b17bd945f00634de..4adde731b265dcd1660c4206797f30ca64452f87 100644 --- a/llvm/lib/Analysis/ACPOBWModel.cpp +++ b/llvm/lib/Analysis/ACPOBWModel.cpp @@ -38,7 +38,7 @@ std::unique_ptr ACPOBWModel::getAdviceML() { std::shared_ptr MLIF = getMLIF(); // Generate result. std::unique_ptr Advice = std::make_unique(); - assert(MLIR != nullptr); + assert(MLIF != nullptr); if (!MLIF->loadModel("") || !MLIF->initializeFeatures("BW", CustomFeatureValues)) { outs() << "Model not loaded or features not initialized. " diff --git a/llvm/lib/Transforms/Instrumentation/AI4CAnalysis.cpp b/llvm/lib/Transforms/Instrumentation/AI4CAnalysis.cpp index b74cb4a9fcfe027ac8e5c9a2ae7a6aa32b87eea7..e63b4e05b83e1285a0192ac0b329c8e8df71fdc1 100644 --- a/llvm/lib/Transforms/Instrumentation/AI4CAnalysis.cpp +++ b/llvm/lib/Transforms/Instrumentation/AI4CAnalysis.cpp @@ -103,7 +103,7 @@ static bool skipAnalysis(const Function &F) { PreservedAnalyses AI4CAnalysis::run(Module &M, ModuleAnalysisManager &MAM) { if (EnableAI4CFH) { - LLVM_DEBUG(dbgs << "Annotate function hotness by ACPO: "); + LLVM_DEBUG(dbgs() << "Annotate function hotness by ACPO: "); // Initialize Feature Data Collector std::error_code EC; raw_fd_ostream RawOS(AI4CDumpFile.getValue(), EC, sys::fs::CD_OpenAlways, @@ -128,7 +128,7 @@ PreservedAnalyses AI4CAnalysis::run(Module &M, ModuleAnalysisManager &MAM) { for (auto &F : HotFunctions) { F->addFnAttr(Attribute::AlwaysInline); - LLVM_DEBUG(dbgs << "Set inline attribute to function " << F->getName() + LLVM_DEBUG(dbgs() << "Set inline attribute to function " << F->getName() << "\n"); } for (auto &F : ColdFunctions) { diff --git a/llvm/lib/Transforms/Utils/ACPOBranchWeightModel.cpp b/llvm/lib/Transforms/Utils/ACPOBranchWeightModel.cpp index b54ab86637578d556dba901712bdd48673348ffa..3a844202b9373dda5b6a427f8f867e73f005a1ac 100644 --- a/llvm/lib/Transforms/Utils/ACPOBranchWeightModel.cpp +++ b/llvm/lib/Transforms/Utils/ACPOBranchWeightModel.cpp @@ -192,7 +192,7 @@ bool ACPOBranchWeightModelPass::applyBranchWeightUsingACPOModel(Module &M, Modul continue; } TI->setMetadata(LLVMContext::MD_prof, MDWeight); - LLVM_DEBUG(dbgs() << "Instruction after adding metadata" << *TI < "\n"); + LLVM_DEBUG(dbgs() << "Instruction after adding metadata" << *TI << "\n"); Changed = true; } }