[PATCH] D143311: [MLGO] Add BB Profile Dump Pass for Regalloc Case
Rahman Lavaee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 6 11:44:23 PST 2023
rahmanl added inline comments.
================
Comment at: llvm/lib/CodeGen/MLRegallocEvictAdvisor.cpp:1190
+ *FileOutput.get() << MF.getName() << ","
+ << MBB.getNumber() << ","
+ << MBFI.getBlockFreqRelativeToEntryBlock(&MBB) << "\n";
----------------
mtrofin wrote:
> @rahmanl this is where we wanna make sure we get it right: is this the right API that would ensure the output obtained here (so right before AsmPrint) matches the BB #s you get if you `-fbasic-block-sections=lables` and then `llvm-objdump --symbolize-operands` - I realize the latter outputs `BB<nr>`, but other than that (i.e. ignoring the "BB" prefix)
The BB symbols printed by `llvm-objdump` will match `getNumber()` here as long as this pass comes right before `AsmPrinter` and right after calls to `RenumberBlocks()` .`-fbasic-block-sections` will do this for you. But if you don't want to use the flag, you can renumber here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143311/new/
https://reviews.llvm.org/D143311
More information about the llvm-commits
mailing list