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]

Re: small cgraph cleanup


> On Sun, Sep 07, 2003 at 01:29:30AM +0200, Jan Hubicka wrote:
> > > +   /* If the user told us it is used, then it must be so.  */
> > > +   if (lookup_attribute ("used", DECL_ATTRIBUTES (decl)))
> > > +     return true;
> > 
> > Did you had any particular reason for adding this?  It should be
> > possible to add used flag even after function is defined so I would
> > preffer to have attribute hander to call mark_used
> 
> I didn't *add* anything.  I just rearranged it from two large
> conditionals.
> 
> > > +   /* ??? If the assembler name is set by hand, it is possible to assemble
> > > +      the name later after finalizing the function and the fact is noticed
> > > +      in assemble_name then.  This is arguably a bug.  */
> > > +   if (DECL_ASSEMBLER_NAME_SET_P (decl)
> > > +       && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
> > > +     return true;
> > 
> > Hmm, I don't quite understand here.  Do you have testcase?
> 
> You added that, not me.
Hmm, it must've been some early verisons.
I remember the DECL_ASSEMBLER_NAME_SET_P code copying from somewhere
(C++ frontend?) and I fixed used attribute afterwards.

Both should be redundant now when we do mark directly from varasm.c
Yours cleanups were obviously usefull so I can understand my code now
Thanks :)
Honza
> 
> 
> r~


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