This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Add value range support into memcpy/memset expansion
- From: Richard Biener <rguenther at suse dot de>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, steven at gcc dot gnu dot org
- Date: Fri, 15 Nov 2013 11:19:39 +0100 (CET)
- Subject: Re: Add value range support into memcpy/memset expansion
- Authentication-results: sourceware.org; auth=none
- References: <20130927145046 dot GC6666 at kam dot mff dot cuni dot cz> <20131115094517 dot GA18020 at atrey dot karlin dot mff dot cuni dot cz>
On Fri, 15 Nov 2013, Jan Hubicka wrote:
> > Hi,
> > this patch makes it possible to access value range info from setmem/movstr that
> > I plan to use in i386 memcpy/memset expansion code. It is all quite
> > straighforward except that I need to deal with cases where max size does not
> > fit in HOST_WIDE_INT where I use maximal value as a marker. It is then
> > translated as NULL pointer to the expander that is bit inconsistent with other
> > places that use -1 as marker of unknown value.
> >
> > I also think we lose some cases because of TER replacing out the SSA_NAME by
> > something else, but it seems to work in quite many cases. This can be probably
> > tracked incrementally by disabling TER here or finally getting away from
> > expanding calls via the generic route.
> >
> > Bootstrapped/regtested x86_64-linux, OK?
> >
> > Honza
> >
> > * doc/md.texi (setmem, movstr): Update documentation.
> > * builtins.c (determine_block_size): New function.
> > (expand_builtin_memcpy): Use it and pass it to
> > emit_block_move_hints.
> > (expand_builtin_memset_args): Use it and pass it to
> > set_storage_via_setmem.
> > * expr.c (emit_block_move_via_movmem): Add min_size/max_size parameters;
> > update call to expander.
> > (emit_block_move_hints): Add min_size/max_size parameters.
> > (clear_storage_hints): Likewise.
> > (set_storage_via_setmem): Likewise.
> > (clear_storage): Update.
> > * expr.h (emit_block_move_hints, clear_storage_hints,
> > set_storage_via_setmem): Update prototype.
>
> Ping...
> http://gcc.gnu.org/ml/gcc-patches/2013-09/msg02011.html
Ok - please make sure it still works after all the header re-org ;)
Thanks,
Richard.