This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Force rtl templates to be inlined


On Tue, Sep 2, 2014 at 6:52 PM, Andi Kleen <ak@linux.intel.com> wrote:
>> Or we simply should make -finline work at -O0 (I suppose it might already
>> work?) and use it.
>
> Yes that's probably better. There are more hot inlines in the stage 1 profile
> (like wi::storage_ref or vec::length)
> I suspect with the ongoing C++'ification that will get worse.

Like with this (untested apart from on a small testcase).  Of course it
usually won't help bootstrap because your host compiler doesn't support
-O0 -finline yet.  Also it might not help that much because while it certainly
removes call overhead it will still not optimize anything else.  Also
inline analysis correctly assumes that no stmts go away so you
only have the call overhead as room to allow inlining (so with checking
enabled the is_a/as_a stuff is probably too large - didn't check).

It may also negatively affect debugging (no var-tracking at -O0).

Anyway, removing !optimize checks in favor of flag_no_inline checks
and initializing that properly is a cleanup as well.

Now to see how to best test this ...

Richard.

> -Andi
>
> --
> ak@linux.intel.com -- Speaking for myself only

Attachment: make-inlining-work-at-O0
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]