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: [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/


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