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

Sriraman Tallam via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 7 17:32:19 PDT 2020


tmsriram added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineFunctionSplitter.cpp:77
+
+  MF.RenumberBlocks();
+  MF.setBBSectionsType(BasicBlockSection::Preset);
----------------
hiraditya wrote:
> snehasish wrote:
> > 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.
> I see we are renumbering both in MachineFunctionSplitter and BasicBlockSections
The "bbsections-prepare" pass and the machine function splitter pass are intentionally made mutually exclusive.  If bbsections is explicitly requested, machine function splitter does not apply.   Please see the change in TargetPassConfig.cpp


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