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: [RFC] PR 12389


> On Sun, 19 Oct 2003 10:35:57 +0200, Jan Hubicka <jh@suse.cz> wrote:
> 
> >     else if (DECL_ABSTRACT (decl))
> >       {
> > !       if (DECL_DECLARED_INLINE_P (decl))
> >   	{
> > !           if (cgraph_function_possibly_inlined_p (decl))
> >   	    add_AT_unsigned (subr_die, DW_AT_inline, DW_INL_declared_inlined);
> >   	  else
> > ! 	    add_AT_unsigned (subr_die, DW_AT_inline, DW_INL_declared_not_inlined);
> >   	}
> > !       else if (cgraph_function_possibly_inlined_p (decl))
> > !         add_AT_unsigned (subr_die, DW_AT_inline, DW_INL_inlined);
> 
> Ah, you still need an unconditional 'else'.
> 
> else
>   add_AT_unsigned (subr_die, DW_AT_inline, DW_INL_not_inlined);
> 
> We could also abort, since we shouldn't be generating an abstract instance
> in this case.

OK, I will add the abort.
> 
> >         /* If we're emitting an out-of-line copy of an inline function,
> >   	 emit info for the abstract instance and set up to refer to it.  */
> > !       else if (DECL_INLINE (decl) && ! DECL_ABSTRACT (decl)
> >   	       && ! class_scope_p (context_die)
> >   	       /* dwarf2out_abstract_function won't emit a die if this is just
> >   		  a declaration.  We must avoid setting DECL_ABSTRACT_ORIGIN in
> > --- 11796,11802 ----
> >   
> >         /* If we're emitting an out-of-line copy of an inline function,
> >   	 emit info for the abstract instance and set up to refer to it.  */
> > !       else if (cgraph_function_possibly_inlined_p (decl) && ! DECL_ABSTRACT (decl)
> >   	       && ! class_scope_p (context_die)
> >   	       /* dwarf2out_abstract_function won't emit a die if this is just
> >   		  a declaration.  We must avoid setting DECL_ABSTRACT_ORIGIN in
> 
> As discussed in my last mail, we probably also want to do this if
> DECL_DECLARED_INLINE_P (decl) && flag_eliminate_dwarf2_dups.  But we should
> do some measurement with -feliminate-dwarf2-dups (if it still works) to
> make sure it's an improvement.

We use -feliminate-dwarf2-dups on hammer-branch compiler and it works at
least there.
Would be OK to apply the patch with the above two changes?
What kind of measurement of -feliminate-dwarf2-dups you do have in mind?

Honza
> 
> Jason


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