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]

Re: loop-2b and such


>>>>> "Richard" == Richard Henderson <rth@redhat.com> writes:

    >> So, I propose to simply ignore the failures for the release,
    >> and to file a bug report about the underlying problem.

    Richard> Yep.

OK.  I have suitably transformed PR2427.

One question is whether anyone really knows how to do this correctly.

In some sources, people do not suggest using these transformations to
compute any values that the original program was not already
computing: the idea is simply to compute the same expressions more
easily.  So, `&a[i]' would become an increment on each loop
interation, rather than a multiply and add, say.  But, the
transformation done here (where we compare two values that the source
program would never have compared) would not be done.  

This approach has the advantage of being correct, unlike our current
algorithm.

That, and my idea about replacing `<' with `!=' seem to me like the
obvious solutions.  

Otherwise, you need to do some fancy range analysis, or you'll not be
able to get this kind of thing right, seems to me.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


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