This is the mail archive of the
mailing list for the GCC project.
Re: PATCH for bogus loop optimization, part 2
- To: law at cygnus dot com
- Subject: Re: PATCH for bogus loop optimization, part 2
- From: Mark Mitchell <mark at markmitchell dot com>
- Date: Thu, 16 Jul 1998 21:21:48 -0700
- CC: bcurrie at tssc dot co dot nz, egcs-patches at cygnus dot com
- References: <firstname.lastname@example.org>
- Reply-to: mark at markmitchell dot com
>>>>> "Jeffrey" == Jeffrey A Law <email@example.com> writes:
>> Mark Mitchell wrote: > o Any comparison between pointers should
>> be unsigned.
Jeffrey> Consider a port where Pmode and POINTER_SIZE specify
Jeffrey> different sized quantities. This happens on the alpha,
Jeffrey> mn102 and maybe other ports.
Jeffrey> Does your patch still do the right thing when comparing
Jeffrey> pointers on such machines?
This sentence confused me slightly. I think that, even though you
replied to Bill, you were actually addressing me. Under that
assumption, I'll take `your patch' to be this one:
Thu Jul 16 10:31:23 1998 Mark Mitchell <firstname.lastname@example.org>
* loop.c (maybe_eliminate_biv_1): Avoid signed/unsigned comparison
confusion when setting cc0.
My patch really "does" nothing. It simply disables (by putting a `0
&&' at the beginning of a test) an optimization in
maybe_eliminate_biv_1, since that optimization is unsafe. Thus, all
that will happen is that fewer bivs will be eliminated. I don't see
how this can "do the wrong thing" except in the sense that it may
generate worse code than you might wish. The other alternative would
be to fix this optimization somehow.
Mark Mitchell email@example.com
Mark Mitchell Consulting http://www.markmitchell.com