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: Designs for better debug info in GCC


On 12/19/07, Andrew MacLeod <amacleod@redhat.com> wrote:
> Daniel Berlin 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.
> >
> ??
>
> x_4 looks like it has the value 'a_3 + b_3 + c_3' in both examples to
> me, although computed in different orders...
>
> so isn't that still the right value?

Yes, sorry, you have to add one more set of adds below and move one so
you can make it have a different value

You get the general idea though :)
Reassoc knows they are all only used in each other, and that it is
okay to change their intermediate value as long as the last thing int
he chain retains its value (which it does since they are all
commutative operations)
>
> Andrew
>


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