public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* var_tracking question
@ 2005-07-01  1:26 DJ Delorie
  2005-07-01  9:50 ` Jakub Jelinek
  0 siblings, 1 reply; 4+ messages in thread
From: DJ Delorie @ 2005-07-01  1:26 UTC (permalink / raw)
  To: gcc


My m32c port is generating tracking notes that look like this:

(var_location 0x2a95758dd0 (parallel [
            (expr_list:REG_DEP_TRUE (reg/v:SI 0 r0 [orig:123 remainder_size ] [123])
                (const_int 0 [0x0]))
            (expr_list:REG_DEP_TRUE (reg:HI 1 r2 [ remainder_size+2 ])
                (const_int 2 [0x2]))
        ]))

Note that registers are HI natively, and r2 is the upper half of the
[r2:r0] pair.  In other words, the location given above describes an
overlap between the two pieces.  The code itself refers to the
variable in both SI (full) and HI (part) modes.

The dwarf2 location lists generated from this are bogus.

So, my question is - is the var_location correct?  Do I need to debug
the var tracking code, or the dwarf2 output code?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: var_tracking question
  2005-07-01  1:26 var_tracking question DJ Delorie
@ 2005-07-01  9:50 ` Jakub Jelinek
  2005-07-01 14:03   ` Daniel Berlin
  2005-07-01 14:13   ` DJ Delorie
  0 siblings, 2 replies; 4+ messages in thread
From: Jakub Jelinek @ 2005-07-01  9:50 UTC (permalink / raw)
  To: DJ Delorie; +Cc: gcc

On Thu, Jun 30, 2005 at 09:25:47PM -0400, DJ Delorie wrote:
> 
> My m32c port is generating tracking notes that look like this:
> 
> (var_location 0x2a95758dd0 (parallel [
>             (expr_list:REG_DEP_TRUE (reg/v:SI 0 r0 [orig:123 remainder_size ] [123])
>                 (const_int 0 [0x0]))
>             (expr_list:REG_DEP_TRUE (reg:HI 1 r2 [ remainder_size+2 ])
>                 (const_int 2 [0x2]))
>         ]))
> 
> Note that registers are HI natively, and r2 is the upper half of the
> [r2:r0] pair.  In other words, the location given above describes an
> overlap between the two pieces.  The code itself refers to the
> variable in both SI (full) and HI (part) modes.
> 
> The dwarf2 location lists generated from this are bogus.

Even on mainline?  See PR debug/21946 and
http://gcc.gnu.org/ml/gcc-patches/2005-06/msg00312.html.
Var-tracking is very broken in that it doesn't care about register modes,
but what I have comitted should at least prevent bogus dwarf2 location
list generation.

	Jakub

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: var_tracking question
  2005-07-01  9:50 ` Jakub Jelinek
@ 2005-07-01 14:03   ` Daniel Berlin
  2005-07-01 14:13   ` DJ Delorie
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Berlin @ 2005-07-01 14:03 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: DJ Delorie, gcc

On Fri, 2005-07-01 at 11:50 +0200, Jakub Jelinek wrote:
> On Thu, Jun 30, 2005 at 09:25:47PM -0400, DJ Delorie wrote:
> > 
> > My m32c port is generating tracking notes that look like this:
> > 
> > (var_location 0x2a95758dd0 (parallel [
> >             (expr_list:REG_DEP_TRUE (reg/v:SI 0 r0 [orig:123 remainder_size ] [123])
> >                 (const_int 0 [0x0]))
> >             (expr_list:REG_DEP_TRUE (reg:HI 1 r2 [ remainder_size+2 ])
> >                 (const_int 2 [0x2]))
> >         ]))
> > 
> > Note that registers are HI natively, and r2 is the upper half of the
> > [r2:r0] pair.  In other words, the location given above describes an
> > overlap between the two pieces.  The code itself refers to the
> > variable in both SI (full) and HI (part) modes.
> > 
> > The dwarf2 location lists generated from this are bogus.
> 
> Even on mainline?  See PR debug/21946 and
> http://gcc.gnu.org/ml/gcc-patches/2005-06/msg00312.html.
> Var-tracking is very broken in that it doesn't care about register modes,
> but what I have comitted should at least prevent bogus dwarf2 location
> list generation.

It's not so much broken as "much more inaccurate than it could be".
:)

Remember that we are just trying to divine what has happened in the
optimizations using a simple dataflow equation.  Sometimes you get the
right answers, sometimes you don't.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: var_tracking question
  2005-07-01  9:50 ` Jakub Jelinek
  2005-07-01 14:03   ` Daniel Berlin
@ 2005-07-01 14:13   ` DJ Delorie
  1 sibling, 0 replies; 4+ messages in thread
From: DJ Delorie @ 2005-07-01 14:13 UTC (permalink / raw)
  To: jakub; +Cc: gcc


> Even on mainline?

No, one of our branches.

> See PR debug/21946 and
> http://gcc.gnu.org/ml/gcc-patches/2005-06/msg00312.html.
> Var-tracking is very broken in that it doesn't care about register
> modes, but what I have comitted should at least prevent bogus dwarf2
> location list generation.

Ok, that looks like the right fix for me.  Thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-07-01 14:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-01  1:26 var_tracking question DJ Delorie
2005-07-01  9:50 ` Jakub Jelinek
2005-07-01 14:03   ` Daniel Berlin
2005-07-01 14:13   ` DJ Delorie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).