[llvm-dev] [RFC] Machine Function Splitter - Split out cold blocks from machine functions using profile data

Snehasish Kumar via llvm-dev llvm-dev at lists.llvm.org
Wed Aug 12 11:55:26 PDT 2020


On Wed, Aug 12, 2020 at 10:24 AM aditya kumar <hiraditya at gmail.com> wrote:

> > Just chiming in about the outliner stuff. (In general, I think it's
> desirable to have multiple options for how early/late a pass runs.)
>
> I'm wondering if MachineOutliner can be augmented to add
> MachineFunctionSplitter functionalities as well. If the analysis part of
> MachineOutliner can allow single basic block outlining with some cost
> models.
>

The MachineOutliner and MachineFunctionSplitter target orthogonal use
cases. Namely, the MachineOutliner optimizes for binary size while the
MachineFunctionSplitter optimizes for performance. Attempting to reconcile
the differences to fully address the opportunity along both dimensions
doesn't seem like a fruitful goal. Furthermore, the key to better
performance is not only the timing of the MachineFunctionSplitter pass but
also the extraction methodology, i.e. using basic block sections. Basic
blocks sections is a nascent feature and needs more widespread use and
rigorous testing before being incorporated with a mature, more widely used
pass. Today, we only use basic block sections for x86 ELF targets.

There is an interesting follow on though -- can we use basicblock sections
as the extraction methodology in MachineOutliner, thus lowering the
overhead of outlining? This is something we can revisit once basic block
sections is more mature.

>
> Aditya Kumar
> Compiler Engineer
> https://bitsimplify.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200812/e3ae342c/attachment.html>


More information about the llvm-dev mailing list