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: [mep] don't inline VLIW code into non-VLIW routines


> Also, inline isn't forced inline it's suggested.  Forced inline is
> attribute((always_inline)).  And that said we generate errors elsewhere
> that always_inline functions can't be inlined, so why not for this one?

This is a little strange - you get a sorry(), *if* you enable
-Winline:

315410.c: In function 'fc':
315410.c:4:1: warning: inlining failed in call to 'ia': target specific option mismatch
315410.c:33:3: warning: called from here
315410.c:10:1: sorry, unimplemented: inlining failed in call to 'ib': recursive inlining
315410.c:34:3: sorry, unimplemented: called from here

The compilation fails at this point.  Without the -Winline, it
succeeds without comment, although it doesn't inline the always_inline
function.

Also, it reports "recursive inlining" as the reason for not inlining
an always_inline into a function with mismatched target attributes.


#include "intrinsics.h"

__inline void __attribute((vliw))
ia ()
{
  mep_c0nop ();
}

__inline void __attribute((vliw,always_inline))
ib ()
{
  mep_c0nop ();
}

void __attribute((vliw))
ic ()
{
  mep_c0nop ();
}

int __attribute((vliw))
fa ()
{
  ia();
  ib();
  ic();
  return 5;
}

int
fc ()
{
  ia();
  ib();
  ic();
  return 5;
}


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