This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch: always_inline attribute
- From: Jason Merrill <jason at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: Richard Henderson <rth at redhat dot com>,"Joseph S. Myers" <jsm28 at cam dot ac dot uk>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 21 Mar 2002 08:18:42 +0000
- Subject: Re: patch: always_inline attribute
- References: <877DF7FA-2667-11D6-BCEB-000393750C1E@redhat.com><wvlwux42lht.fsf@prospero.cambridge.redhat.com><20020321021010.GA8489@redhat.com>
>>>>> "Aldy" == Aldy Hernandez <aldyh@redhat.com> writes:
> On Sat, Feb 23, 2002 at 04:47:42PM +0000, Jason Merrill wrote:
> finally...
>> > + if (optimize == 0
>> > + && lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) == NULL)
>> > + return 1;
>>
>> Woops, looks like my earlier mail came too late. Please conditionalize
>> this stuff on a flag other than optimize, so that -O1 -fno-inline still
>> works. You'll probably have to add Yet Another inlining flag. While
> i don't understand why we clobber flag_no_inline to 1 inside
> c_common_post_options:
> if (! flag_instrument_function_entry_exit)
> {
> if (!flag_no_inline)
> flag_no_inline = 1;
Because if we're doing tree inlining, we don't need to do RTL inlining.
>> While you're at it, you might as well make -O0 -finline work.
> what were the issues?
Just history. The RTL inliner doesn't work at -O0. The tree inliner works
fine. Or would, if it were possible to enable it.
> perhaps in another patch i can remove the code disabling inlining at -O0,
> and change the documentation accordingly?
That's what I was suggesting. Or rather, not remove it, but set
flag_really_no_inline from flag_no_inline befor we get to that code.
Thanks,
Jason