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: Peepholes obsolete / new peepholes


  In message <000701c005cc$99562200$650b0d0a@Alzenau>you write:
  > Peepholes obsolete (?)
  > 
  > The peephole definitions in h8300.md cc pre-decrement and
  > post-increment memory accesses seem to be obsolete. Apparently,
  > the regarding optimizations are done in an earlier step already.
  > I temporarily removed those peepholes and all my test cases
  > still produced optimal code. Also, couldn't find any
  > different compiler output in a fairly large project.
I agree.  They're obsolete due to the movxx_push patterns.

  > PATCH:
  > Clear all current peephole definitions from h8300.md
Can you please send a patch for this to gcc-patches?  Thanks.

  > New Peepholes
  > 
  > Following (admittedly rare) case produced sub-optimal code with
  > can be improved by new peepholes:
[ ... ]
I believe there's a more general thing we can do with this that will be
more effective.

Specifically if we have a memory reference like
(mem:mode (plus (pseudo) (const_int modesize))

And the pseudo is dead after that instruction then we can try to turn it into
a preinc/predec instruction (we can clobber the pseudo as we know it's not
used again).

I would think this would be a relatively simple extension to flow.c

jeff



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