Designs for better debug info in GCC

Alexandre Oliva aoliva@redhat.com
Wed Dec 19 20:07:00 GMT 2007


On Dec 19, 2007, "Daniel Berlin" <dberlin@dberlin.org> wrote:

> Here is the easy one:

> z_5 = a_3 + b_3
> x_4 = z_5 + c_3

> DEBUG(x, x_4)


> Reassoc may transform this into:


> z_5 = c_3 + b_3
> x_4 = z_5 + a_3

> DEBUG(x, x_4)

> Now x has the wrong value.

As Andrew said, no, it doesn't.

Now, if z_5 were present in a debug expression, then it would need
adjusting.  No different from the adjusting need for any other
instruction in which z_5 was present, though.  That's what I mean when
I talk about letting the optimizers do their job on debug instructions
too.

-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member         http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}



More information about the Gcc-patches mailing list