This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Builtin strcpy/strncpy/memcpy/strcmp/fputs fixes and optimizations
- To: Michael Meissner <meissner at cygnus dot com>
- Subject: Re: [PATCH] Builtin strcpy/strncpy/memcpy/strcmp/fputs fixes and optimizations
- From: Richard Henderson <rth at redhat dot com>
- Date: Wed, 29 Nov 2000 15:57:09 -0800
- Cc: Jakub Jelinek <jakub at redhat dot com>, ghazi at caip dot rutgers dot edu, gcc-patches at gcc dot gnu dot org
- References: <20001129085056.A681@sunsite.ms.mff.cuni.cz> <20001129182931.47191@cse.cygnus.com>
On Wed, Nov 29, 2000 at 06:29:31PM -0500, Michael Meissner wrote:
> Assuming you change:
> strcmp ("constant-string", pointer)
> into
> memcmp ("constant-string", pointer, sizeof ("constant-string")-1),
> what happens if memcmp on the machine is aggresive and reads multiple
> words at a time to hide the memory latency.
Well, we don't do this transformation in general, only when
we can inline the memcmp. There are currently only three
targets that implement cmpstrsi, and none of them do this
multiple read optimization.
So perhaps we just need to add commentary somewhere...
r~