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

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 16:22:27 PDT 2020


efriedma added subscribers: serge-sans-paille, MaskRay.
efriedma added inline comments.


================
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 "
----------------
snehasish wrote:
> snehasish wrote:
> > efriedma wrote:
> > > snehasish wrote:
> > > > 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". 
> > > Why do we need two options to control the same thing?
> > In this patch we added two options
> > 1. An option in llvm/lib/CodeGen/CommandFlags.cpp "split-machine-functions" so that llc can be used to invoke it in the tests.
> > 2. We added a temporary option in llvm/lib/CodeGen/TargetPassConfig.cpp so that it can be invoked when running with clang or lld (for LTO).
> > 
> > AFAICT we cant use (2) for tests and having (1) makes it easy to compile things without an intermediate llc step. We plan on removing (2) in a future patch which will add appropriate options to clang (-fsplit-machine-functions) and lld (--lto-split-machine-functions).
> Correction: We can use (2) for tests by passing "-enable-split-machine-functions" to llc however since we plan to introduce clang and lld flags in the near future it seems cleaner to leave the llc flag in place and just remove (2) when that happens rather than reintroduce it. WDYT?
clang doesn't call RegisterCodeGenFlags?  That seems like something we should consider changing.


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