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]

Patch: darwin specific: enable inlining of global functions


Darwin's dynamic linker does not permit replacement of a callee
function within the same file at runtime, so such functions should
be considered as inlining candidates.  This does it.  Bootstrapped
on Darwin, and checked that global functions can be inlined.

2003-03-06 Dale Johannesen <dalej at apple dot com>

        * config/rs6000/rs6000.c (rs6000_binds_local_p):  Consider
        global functions for inlining on Darwin.


*************** rs6000_xcoff_encode_section_info (decl, *** 13320,13332 **** }

/* Cross-module name binding. For AIX and PPC64 Linux, which always are
! PIC, use private copy of flag_pic. */


  static bool
  rs6000_binds_local_p (decl)
       tree decl;
  {
!   return default_binds_local_p_1 (decl, flag_pic || rs6000_flag_pic);
  }

  /* Compute a (partial) cost for rtx X.  Return true if the complete
--- 13321,13335 ----
  }

/* Cross-module name binding. For AIX and PPC64 Linux, which always are
! PIC, use private copy of flag_pic. Darwin does not support overriding
! functions at dynamic-link time. */


  static bool
  rs6000_binds_local_p (decl)
       tree decl;
  {
!   return default_binds_local_p_1 (decl,
!       DEFAULT_ABI == ABI_DARWIN ? 0 : flag_pic || rs6000_flag_pic);
  }

/* Compute a (partial) cost for rtx X. Return true if the complete


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