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: eliminating debug info for symbols/types in unexpanded inlines


On Thu, 2009-05-07 at 12:30 +0200, Michael Matz wrote:
> PARM_DECL and RESULT_DECL never should be DECL_EXTERNAL_P.  

We never use the bit on PARM_DECL and RESULT_DECL, true, but it does get
set.  The original purpose of these comments is to avoid conflicting
uses for bits in the tree structure, so the fact that they are set means
that they need to be documented here to prevent someone from using the
bit for something else.

Unless you are suggesting that I should not be setting the bit?  That
would require adding an if-statement in the expr.c patch, and I would
prefer to avoid adding an otherwise unnecessary if-statement that would
slow down the compiler.  I think we should do that only if we actually
need this bit for some other conflicting purpose.

I suppose I could reword the comment to make it clearer.  Mention that
the bit is set but not used for PARM_DECL and RESULT_DECL.

> And why isn't 
> TREE_ASM_WRITTEN enough for external decls?  After all that's exactly what 
> you're trying to check: if there's something in the .o file about symbol S 
> (for whatever reason) you want to have debug info for it.

Good point.  Eric Botcazou asked the same question.  I don't recall if I
tried that or not.  The original patch was written a year ago and I
don't remember all of the development details.  I will have to
experiment to see if this can work.

Jim


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