[llvm-dev] [RFC] Turn the MachineOutliner on by default in AArch64 under -Oz
Friedman, Eli via llvm-dev
llvm-dev at lists.llvm.org
Mon Apr 23 14:35:34 PDT 2018
On 4/23/2018 1:41 PM, Jessica Paquette wrote:
> Hi Eli,
>
>> I just tried some tests, and I'm seeing a bunch of failures on SPEC
>> at -O3; looks like mostly crashes at runtime. I can try to reduce a
>> testcase if you need it.
> If you could do that, that would be great. Our testing has been
> primarily for -Oz and -O2, so I haven’t looked at -O3 at all.
Okay, I'll try to come up with something soon.
>
>> I don't think this is really the right approach. With LTO, you can
>> have a mix of functions, some of which are minsize, and some of which
>> are not. Or with profile info, we might want to outline only cold
>> code (I guess this isn't implemented yet, but potentially future
>> work). Tying whether we run the outliner to a command-line flag
>> restricts the possible uses; either the entire module gets outlining,
>> or none of it does.
> I’m worried that walking the entire list of functions in the module
> when nothing has the minsize attribute would incur unnecessary
> compile-time overhead. If that’s a reasonable thing to do though, I’m
> fine with that approach. It’d be a less invasive change, and would
> give us the desired LTO behaviour for free.
Walking the list of functions is very cheap, relatively speaking; I'm
not concerned about the cost of that. The cost I'd be concerned about
is the cost of running a ModulePass at that point in the pipeline; IIRC
the last time someone tried it, there were bug reports about memory
usage (see https://bugs.llvm.org/show_bug.cgi?id=36123 .)
-Eli
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
More information about the llvm-dev
mailing list