This is the mail archive of the gcc@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: Optimizations on long long multiply/divide on PowerPC32 don't


> No, even in C++ GCC does not inline functions without optimization.

Same thing for Ada, although a GNAT specific pragma named
Inline_Always exists, my reading of gigi code implies that it still
requires optimizations to be active for the inlining to occur:

gcc/ada/trans.c
<<
static void
process_inlined_subprograms (gnat_node)
     Node_Id gnat_node;
{
  Entity_Id gnat_entity;
  Node_Id gnat_body;

  /* If we can inline, generate RTL for all the inlined subprograms.
     Define the entity first so we set DECL_EXTERNAL.  */
  if (optimize > 0 && ! flag_no_inline)
>>

gcc/ada/gnat_rm.texi
<<
@findex Inline_Always
@item pragma Inline_Always
@noindent
Syntax:

@smallexample
pragma Inline_Always (NAME [, NAME]);
@end smallexample

@noindent
Similar to pragma  @code{Inline} except that inlining is not subject to
the use of option @code{-gnatn} for inter-unit inlining.
>>

Should I provide a patch to mention explicitely that optimization
needs to be on for inlining to occur with Inline_Always?

-- 
Laurent Guerby <guerby@acm.org>


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