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]

Re: [BUG/PATCH 2.95.3] [V3 also] rs6000.c tests TREE_ASM_WRITTEN too early.


> From: "Dave Korn" <davek-ml@ntlworld.com>
> Cc: "Mike Stump" <mrs@windriver.com>, "Geoff Keating" <geoffk@redhat.com>,
>         "David Edelsohn" <dje@watson.ibm.com>
> Date: Fri, 12 Jan 2001 03:36:43 -0000
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
> 
> 
> 
> > rs6000.h:ASM_DECLARE_FUNCTION_NAME() seems like a more logical
> > place to hook the assignment SYMBOL_REF_FLAG(sym_ref)=1 than
> > rs6000.c:output_prolog().
> 
>    Oops. Remember this?
> 
>   It turns out that neither output_prolog nor ASM_DECLARE_FUNCTION_NAME
> are brilliant places to put this assignment. That's because when the
> optimizer is on, function decls may be processed in one order (the order
> they occur in the source) by rs6000_encode_section_info, whereas when
> inlining is taken into account, outputting the body of the function
> doesn't necessarily take place until after it is known whether or not all
> occurrences of the function will be entirely inlined. So if a function is
> inlineable, it won't be output until the end of the file, and so we won't
> know until then that it is within range of a short call, so we'll end up
> trying to long call it all the time anyway.
> 
>   Now what? Anyone else got any ideas ? Do we need to set SYMBOL_REF_FLAG
> for any function that is stored for inlining ?

No, because not all functions that are stored for inlining are
necessarily output at all in this compilation (consider member
functions of C++ classes, when the object has a vtable they are output
in the same place as the vtable).

-- 
- Geoffrey Keating <geoffk@geoffk.org>

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