This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]