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 Tue, Oct 21, 2003 at 10:38:11AM +0200, Jan Hubicka wrote:
> > My understanding is that the abstract DIE is usefull only when
> > referenced by something and we reference it only when procue debug
> > output for inline function.  Jason also seemed to agree with idea that
> > DW_INLI_declared_not_inlined is usefull unless you use
> > -feliminate-dwarf2-dups.
> > Now it is not clear for me at all how it is suefull there.  If we emit
> > DW_INL_declared_not_inlined it will surely not be shared with any other
> > compilation unit where the function really has been inlined.
> > 
> > Does this seem to make sense?
> 
> I understand your reasoning, but exactly because the outcome
> is that certain defined (by the DWARF standard) values will
> never be used - I get the feeling that we are not understanding
> the intend of that standard.  In this case I could imagine that
> a DW_INLI_declared_not_inlined is meant to signify that a
> function is declared inline.  If you short circuit the abstract
> instance tree and the (only) refering concrete instance tree,
> then you through away the information that a function was
> _declared_ inline.  Doing so would decrease the total size of
> the debug information of course - which is the reason you do
> so - but following that reasoning you might as well throw away
> more debug information :/.
> 
> In the 'industry review draft' of 1993 (http://www.eagercon.com/dwarf/dwarf-2.0.0.pdf)
> I find:
> 
> 3.3.8 Inline Subroutines
> 
> A declaration or a definition of an inlinable subroutine is represented by a debugging information
> entry with the tag DW_TAG_subprogram. The entry for a subroutine that is explicitly declared to be
>                                       -----------------------------------=========================
> available for inline expansion or that was expanded inline implicitly by the compiler has a
> ==============================                                                        =====
> DW_AT_inline attribute whose value is a constant.
> ======================--------------------------
> 
> This led me to conclude that just declaring a function inline is enough to warrant
> the abstract DIE (with the DW_AT_inline attribute).

It seems to be, however I am not sure whether the wording isn't just
inexact forumation.  I don't see any value in producing abstract DIE for
subroutine that is not inline, can be inlined (so it is inline
implicitly) but it never actually was inlined that still match wording
above.
I tought dwarf has different place to place full type information into
and the inline keyword would belong there.

Assuming the your conclusion to be valid, we should produce abstract
DIE with condtiional:
(DECL_DECLARED_INLINE_P (decl) || cgraph_possibly_inlined_p (decl))

Is there any value in expanding debug information this way?

If not, perhaps we should keep the test just
cgraph_possibly_inlined_p (decl) and add a comment to it and to testcase
that we may want to change mind in future if we find some use for this.

Jason?

Honza


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