[PATCH] D85368: [llvm][CodeGen] Machine Function Splitter

Snehasish Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 7 12:24:31 PDT 2020


snehasish marked 5 inline comments as done.
snehasish added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineFunctionSplitter.cpp:77
+
+  MF.RenumberBlocks();
+  MF.setBBSectionsType(BasicBlockSection::Preset);
----------------
tmsriram wrote:
> hiraditya wrote:
> > Do we need to renumber?
> Renumbering makes the sorting easy.  The sorting will preserve the basic block order for the blocks that are not split.
We need to ensure that the order is preserved so that we don't perturb the decisions made by prior passes such as MachineBlockPlacement. Renumbering simplifies the code that needs to be shared with the BasicBlockSections pass.


================
Comment at: llvm/lib/CodeGen/TargetPassConfig.cpp:218
+static cl::opt<bool> EnableMachineFunctionSplitter(
+    "enable-split-machine-functions", cl::Hidden,
+    cl::desc("Split out cold blocks from machine functions based on profile "
----------------
tmsriram wrote:
> Why not call this split-machine-functions too for consistency?
We can't register two options with the same string, i.e. "split-machine-functions". 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85368/new/

https://reviews.llvm.org/D85368



More information about the llvm-commits mailing list