diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1924,14 +1924,14 @@ OutStreamer->addBlankLine(); - // Output MBB numbers, function names, and frequencies if the flag to dump + // Output MBB ids, function names, and frequencies if the flag to dump // MBB profile information has been set if (MBBProfileDumpFileOutput) { MachineBlockFrequencyInfo &MBFI = getAnalysis().getBFI(); for (const auto &MBB : *MF) { *MBBProfileDumpFileOutput.get() - << MF->getName() << "," << MBB.getNumber() << "," + << MF->getName() << "," << MBB.getBBID() << "," << MBFI.getBlockFreqRelativeToEntryBlock(&MBB) << "\n"; } } diff --git a/llvm/test/CodeGen/MLRegalloc/bb-profile-dump.ll b/llvm/test/CodeGen/MLRegalloc/bb-profile-dump.ll --- a/llvm/test/CodeGen/MLRegalloc/bb-profile-dump.ll +++ b/llvm/test/CodeGen/MLRegalloc/bb-profile-dump.ll @@ -3,7 +3,7 @@ ; Check that the basic block profile dump outputs data and in the correct ; format. ; -; RUN: llc -mtriple=x86_64-linux-unknown -o /dev/null -mbb-profile-dump=- %s | FileCheck %s +; RUN: llc -mtriple=x86_64-linux-unknown -o /dev/null -basic-block-sections=list -mbb-profile-dump=- %s | FileCheck %s ; bb profile dump is not supported on NVPTX ; UNSUPPORTED: target=nvptx{{.*}}