This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: i386 PIC improvement for static functions.
- To: law at cygnus dot com
- Subject: Re: i386 PIC improvement for static functions.
- From: john at feith dot com (John Wehle)
- Date: Thu, 25 Jun 1998 14:35:45 -0400
- cc: egcs-patches at cygnus dot com, wilson at cygnus dot com, rth at cygnus dot com
> I'm also not sure you need a new tree flag -- I think TREE_ADDRESSABLE
> does what you want.
TREE_ADDRESSABLE appears to be set in some situations which don't
require loading the pic register. For example expand_call has:
else if (! TREE_ADDRESSABLE (fndecl))
{
/* In case this function later becomes inlinable,
record that there was already a non-inline call to it.
Use abstraction instead of setting TREE_ADDRESSABLE
directly. */
if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline
&& optimize > 0)
{
warning_with_decl (fndecl, "can't inline call to `%s'");
warning ("called from here");
}
mark_addressable (fndecl);
}
and:
/* If inlining failed, mark FNDECL as needing to be compiled
separately after all. If function was declared inline,
give a warning. */
if (DECL_INLINE (fndecl) && warn_inline && !flag_no_inline
&& optimize > 0 && ! TREE_ADDRESSABLE (fndecl))
{
warning_with_decl (fndecl, "inlining failed in call to `%s'");
warning ("called from here");
}
mark_addressable (fndecl);
-- John
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------