This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Use alias-oracle for memmove -> memcpy folding
- From: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 31 Aug 2009 22:15:18 -0400 (EDT)
- Subject: Re: [PATCH] Use alias-oracle for memmove -> memcpy folding
- References: <alpine.LNX.2.00.0908311434460.28140@zhemvz.fhfr.qr>
On Mon, 31 Aug 2009, Richard Guenther wrote:
>
> This changes the folding code that transforms memmove to memcpy to
> use the alias oracle to query whether the memory arguments may overlap.
> The patch also relaxes what we accept for pointers in INDIRECT_REFs
> in the oracle to allow easy use of it even from the early folders
> where we are not in gimple form.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.
>
> Richard.
>
> 2009-08-31 Richard Guenther <rguenther@suse.de>
>
> * builtins.c (fold_builtin_memory_op): Use the alias oracle
> to query if the memory regions for memmove overlap.
> * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Relax the
> asserts on pointers, instead deal with odd trees.
> (ptr_derefs_may_alias_p): Likewise.
> (refs_may_alias_p_1): Constructor bases also never alias.
Would this be PR 21602 ?