[PATCH] D143311: [MLGO] Add BB Profile Dump Pass for Regalloc Case

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 6 15:48:42 PST 2023


mtrofin added inline comments.


================
Comment at: llvm/lib/CodeGen/MBBProfileDump.cpp:26
+
+namespace llvm {
+class MBBProfileDump : public MachineFunctionPass {
----------------
anonymous namespace; then just define outside that, fully qualified, the createXYZPass function (i.e. `llvm::createMBBProfileDumpPass`) see `llvm/lib/Target/X86/X86DiscriminateMemOps.cpp` for example.


================
Comment at: llvm/lib/CodeGen/MBBProfileDump.cpp:73
+    MachineBlockFrequencyInfo &MBFI = getAnalysis<MachineBlockFrequencyInfo>();
+    for (auto &MBB : MF) {
+      *FileOutput.get() << MF.getName() << "," << MBB.getNumber() << ","
----------------
nit: const auto &MBB


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