This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: darwin specific: enable inlining of global functions
- From: Dale Johannesen <dalej at apple dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Dale Johannesen <dalej at apple dot com>
- Date: Thu, 6 Mar 2003 15:57:25 -0800
- Subject: 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