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: Jump optimisation patches



  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.  */



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