This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Jump optimisation patches
- To: "Michael P. Hayes" <michaelh at ongaonga dot chch dot cri dot nz>
- Subject: Re: Jump optimisation patches
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 02 Feb 1998 02:11:21 -0700
- cc: gcc2 at cygnus dot com, egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199711050316.QAA19266@ongaonga.chch.cri.nz>you write:
>
> 1997-11-05 Michael P. Hayes <michaelh@ongaonga.chch.cri.nz>
>
> (jump.c): Allow conditional loading of floating point constants
> and constants from memory. Reinstalled modified_in_p tests.
I've installed these patches into egcs.
Don't you also need one in the conditional for this optimization:
/* If branches are expensive, convert
if (foo) bar++; to bar += (foo != 0);
and similarly for "bar--;"
INSN is the conditional branch around the arithmetic. We set:
TEMP is the arithmetic insn.
TEMP1 is the SET doing the arithmetic.
TEMP2 is the operand being incremented or decremented.
TEMP3 to the condition being tested.
TEMP4 to the earliest insn used to find the condition. */