This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Peepholes obsolete / new peepholes
- to: Ralf Gütlein <ralf dot guetlein at biotest-mt dot de>
- Subject: Re: Peepholes obsolete / new peepholes
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 14 Aug 2000 08:13:07 -0600
- cc: "gnuh8" <gnuh8 at pcserv dot demon dot co dot uk>, "gcc" <gcc at gcc dot gnu dot org>, "Kazu Hirata" <kazu at hxi dot com>
- Reply-To: law at cygnus dot com
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