Add support to cprop to propagate from parallels

Jeffrey A Law law@cygnus.com
Mon Nov 1 05:42:00 GMT 1999


  In message <19991026123622.31671@atrey.karlin.mff.cuni.cz>you write:
  > > I don't see how this is at all useful.
  > > 
  > > CPROP only cares about finding sets of registers from either another regi
  > ster
  > > or a constant.  I don't see when/how we would ever have such sets inside 
  > of
  > > a PARALLEL at this point in the compiler.
  > For example let CSE create constant on i386.
  > Originally insn was something like:
  > parallel [
  >   (set (reg) (expression))
  >   (clobber flags)
  >  ]
  > and cse folds expression to register or constant resulting is parallel with
  > clobber. (BTW I was thinking how to avoid this clobber in cse, but have no
  > idea. )
This should be fixed in cse or by some post-cse pass to strip off useless
clobbers.  Useless clobbers are going to do nothing but hinder potential
optimizations.


  > Other case is i386 w/o peephole2 pass, where move expander adds clobbering
  > of flags for case where we are setting register to zero (to use xor).
The code in question does not run after peephole2.  It would be of
marginal benefit to bother running it after peephole2.  I don't see that
it's worth the complication.

  > Or the block move patterns, that sets register to fixed value as side
  > effect (ecx to zero).
This isn't worth the headache to try and handle.

There's a point where a particular optimization isn't worth the complexity
of adding it to the compiler.  I think the last two examples above are
excellent examples.

jeff


More information about the Gcc-patches mailing list