This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH]: Update patches for memset and memcmp builtins
- From: Richard Henderson <rth at redhat dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 12 Dec 2001 16:44:03 -0800
- Subject: Re: [PATCH]: Update patches for memset and memcmp builtins
- References: <Pine.LNX.firstname.lastname@example.org>
On Mon, Dec 10, 2001 at 05:30:25PM -0700, Roger Sayle wrote:
> * builtins.c (expand_builtin_memset, expand_builtin_memcpy,
> expand_builtin_strcpy): Additional arguments TARGET and MODE.
> (expand_builtin_bzero, expand_builtin_strcpy,
> expand_builtin_strncpy, expand_builtin_bzero): Pass additional
> TARGET and MODE parameters to the above functions.
> (expand_builtin_memset, expand_builtin_memcpy): Optimize the
> case where the LEN parameter is constant zero.
> (expand_builtin_memcmp): No longer conditional on
> HAVE_cmpstrsi. Take an additional mode parameter. Optimize
> the cases where len is either constant zero or one.
> Optimize to call to memcpy, even if the memcpy isn't inlined.
> (expand_builtin_strncpy): Optimize to call memcpy, even if the
> memcpy isn't inlined.
> (expand_builtin_strcmp, expand_builtin_strncmp): Always attempt
> to optimize to a call to memcmp.
> (expand_builtin): expand_builtin_memcmp can always be called,
> and pass the required parameters to expand_builtin_memcmp,
> expand_builtin_memset, expand_builtin_memcpy and
> * gcc.c-torture/execute/string-opt-14.c: New test case.
> * gcc.c-torture/execute/string-opt-15.c: New test case.