This is the mail archive of the gcc@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: SRA and DECL_ABSTRACT_ORIGIN


Richard Henderson <rth@redhat.com> writes:

| On Sat, Jan 01, 2005 at 01:36:43PM +0100, Gabriel Dos Reis wrote:
| >   A question I have is why DECL_ABSTRACT_ORIGIN is not set for
| > "temporaries" created for the purpose of scalar replacement of
| > aggregates. I would think that is an obvious thing to do.  Why is it
| > not done?
| 
| Because DECL_ABSTRACT_ORIGIN applies to inlining, and not this.

Thanks.  I understand that DECL_ABSTRACT_ORIGIN was originally
introduced for inlining purpose, where DECLs are cloned; however, my
observation here is that SRA shares pretty much the same behaviour,
therefore it makes sense to set DECL_ABSTRACT_ORIGIN -- currently, it
does not seem to be set anywhere for SRA temporaries.

| > We should just pretty-print expressions designating those objects.
| > We have code to do that.  Why was it decided to do otherwise?
| 
| Because this is how we can emit meaningful debug information for stabs.
| And indeed how we've *always* emitted debug info for complex numbers
| in stabs.

I guess there is something I'm missing here.  It seems to me that we
have two things: names used for debug information and names used for
diagnostics.  The current code is trying to smash both of them in the
same bucket.  The net result is that we issue diagnostics with names
that are not in the program source.  That makes the diagnostics less
useful. 

-- Gaby


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