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:00:39 +0200, Jan Hubicka <hubicka@ucw.cz> wrote:
> 
> > Perhaps we want to use DECL_DECLARED_INLINE here?
> > in case function should get DW_INL_declared_inlined iff it has been
> > declared inline and actually inlining happent and
> > DW_INL_declared_not_inlined iff it has been declared inline and inlining
> > did't happen It would make more sense to do this:
> >
> >       if (DECL_DECLARED_INLINE (decl)
> > 	{
> > 	  if (cgrpah_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_possibly_inlined_p (decl)
> >         add_AT_unsigned (subr_die, DW_AT_inline, DW_INL_inlined);
> 
> Yes, that looks good.  I think this code predates DECL_DECLARED_INLINE.
OK, I will prepare updated patch with his.
> 
> > Also what about COMDAT functions?  I guess the debug info should be
> > conservative then and always claim that function has been inlined as it
> > may be inlined in the other compilation unit, right?
> 
> I don't see what COMDAT has to do with this.  If the function is inlined in
> another translation unit, it will have debug info there.

So the debug info above is generated for each inline copy of the given
fnction separately?  How we can end up with DW_INL_declared_not_inlined
then?

In the case it is generated just once, I would expect commonized
functions after linking to also commonize the debug info so it should be
conservative?

Honza
> 
> Jason


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