This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA] __attribute__((inline_everything)) 2nd try
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: Michael Matz <matz at suse dot de>, <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 15 May 2003 11:44:26 +0200 (CEST)
- Subject: Re: [RFA] __attribute__((inline_everything)) 2nd try
On 15 May 2003, Alexandre Oliva wrote:
> On May 15, 2003, Richard Guenther <rguenth@tat.physik.uni-tuebingen.de> wrote:
>
> > On 14 May 2003, Alexandre Oliva wrote:
> >> On May 14, 2003, Richard Guenther <rguenth@tat.physik.uni-tuebingen.de> wrote:
> >>
> >> > Ok, thanks - all lookup_attribute() calls deal with warnings only, so I
> >> > suppose I can ignore those. The inlining decision itself is done via
> >> > DECL_UNINLINABLE - I suppose setting this is enough. I'll try.
> >>
> >> Make sure to warn if you find this attribute after we already
> >> generated code for the function.
>
> > I dont understand this - as we're not inlining the function itself, the
> > attribute should be available at the time of code generation, no?
>
> inline void f() {}
> void g() { f(); }
> [...]
> void g() __attribute__((inline_everything)); // oops, too late
Ah, I see. How can I check this? I suppose its ok to check it inside
handle_inline_everything_attribute().
Shouldnt the noinline attribute check if the function was inlined before?
Or if it is declared inline?
void f() {}
void g() { f(); }
void f() __attribute__((noinline)); // whoops if compiled with -finline-functions
Richard.
--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/