[llvm-dev] [RFC] Add IR level interprocedural outliner for code size.

Sean Silva via llvm-dev llvm-dev at lists.llvm.org
Mon Jul 24 21:54:36 PDT 2017


On Sun, Jul 23, 2017 at 12:43 AM, via llvm-dev <llvm-dev at lists.llvm.org>
wrote:

> River,
>
> Thanks for the reply!
>
> > 23 июля 2017 г., в 1:05, River Riddle <riddleriver at gmail.com>
> написал(а):
> >
> > - The explanation as to why the improvements can vary between the IR and
> MIR outliner mainly boil down to the level of abstraction that each are
> working at. The MIR level has very accurate heuristics and is effectively
> the last post ISel target independent code gen pass. The IR outliner on the
> other hand has more estimation in the cost model, and can affect the
> decisions of function simplification passes, instruction selection, RA,
> etc. Taking this into account can lead to different results.
> To clarify, I'm surprised not with % differences (this is understandable),
> but with differences in what benchmarks got improved. It seems odd that MO,
> working on lower abstraction level, managed to find redundancies (say, in
> libquantum) that EO+LO missed.


When I looked at this, most of the code size saving from the machine
outliner is from outlining 2-3 instruction sequences (often the same
sequence is outlined for each of many permutations of register
assignments). Think of sequences like "TEST; SETCC" (and many different
register assignments thereof).

-- Sean Silva


> But indeed -- perhaps EO+LO cost model just considered these cases to be
> non-profitable. It would be interesting to know precisely.
>
> Yours,
> Andrey
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170724/f773ba03/attachment.html>


More information about the llvm-dev mailing list