This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] tree-vectorizr.h: Remove VECT_SMODULO.
- From: Dorit Nuzman <DORIT at il dot ibm dot com>
- To: Kazu Hirata <kazu at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 25 Dec 2006 11:26:56 +0200
- Subject: Re: [patch] tree-vectorizr.h: Remove VECT_SMODULO.
> Hi,
>
> Attached is a patch to remove VECT_SMODULO as it is unused.
>
> Bootstrapped on i686-pc-linux-gnu. OK to apply?
>
> Kazu Hirata
>
> 2006-12-23 Kazu Hirata <kazu@codesourcery.com>
>
> * tree-vectorizer.h (VECT_SMODULO): Remove.
>
As far as I can see, every time we use x%y, either we know that x is
positive, or we only care whether the result is 0 or not, and don't care
about the actual value. So, looks like it would be ok to remove this macro
(and if we ever need it - modulo-sched.c also defines a similar macro...)
thanks,
dorit
> Index: tree-vectorizer.h
> ===================================================================
> --- tree-vectorizer.h (revision 120165)
> +++ tree-vectorizer.h (working copy)
> @@ -320,9 +320,6 @@ known_alignment_for_access_p (struct dat
> return (DR_MISALIGNMENT (data_ref_info) != -1);
> }
>
> -/* Perform signed modulo, always returning a non-negative value. */
> -#define VECT_SMODULO(x,y) ((x) % (y) < 0 ? ((x) % (y) + (y)) : (x) %
(y))
> -
> /* vect_dump will be set to stderr or dump_file if exist. */
> extern FILE *vect_dump;
> extern enum verbosity_levels vect_verbosity_level;