[llvm-dev] [RFC] Turn the MachineOutliner on by default in AArch64 under -Oz

Jon Chesterfield via llvm-dev llvm-dev at lists.llvm.org
Fri Apr 20 19:33:29 PDT 2018


Teaching the back end about size optimization sounds great, even without
the exciting work on MachineOutliner. It would strip some nasty hacks from
an out of tree back end that cares about code size :)

Thank you


> The first patch is one that teaches the backend about size optimization
> levels. This is comparable to what's done in the inliner. Today, the only
> way to tell if something is optimizing for size is by looking at function
> attributes. This is fine for function passes, but insufficient for module
> passes like the MachineOutliner. The function attribute approach forces the
> outliner to iterate over every function in the module before deciding to
> take action. If -Oz isn't passed in, then the outliner will not find any
> functions worth outlining from. This would incur unnecessary compile-time
> overhead. Thus, we decided the best course of action is to teach the
> backend about size options.
>
> The second patch teaches llc to handle -Oz and -Os.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180421/bdb8b423/attachment.html>


More information about the llvm-dev mailing list