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

Aiden Grossman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 6 22:42:05 PST 2023


aidengrossman added inline comments.


================
Comment at: llvm/lib/CodeGen/MBBProfileDump.cpp:74
+    for (auto &MBB : MF) {
+      *FileOutput.get() << MF.getName() << "," << MBB.getNumber() << ","
+                        << MBFI.getBlockFreqRelativeToEntryBlock(&MBB) << "\n";
----------------
aidengrossman wrote:
> rahmanl wrote:
> > This won't be pretty in Thin-LTO mode which can spawn multiple threads to perform codegen across various modules. Is this intentional?
> Yes. We currently aren't supporting ThinLTO as when working with the MLGO infrastructure (where this is intended to fit in), ThinLTO is done at a previous stage during corpus collection where we won't be specifying this flag. I've added a note into the CLI flag help to note that it's not currently supported with ThinLTO.
Clarification: We aren't supporting in-process (ie multithreaded single process thinLTO) in the same compiler invocation with this flag, but all thinLTO cases should work with corpus collection, and distributed thinLTO should work as well since everything is per compiler invocation.


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