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] Update profile in loop versioning and unrolling


Hello,

> On Wed, 20 Dec 2006, Zdenek Dvorak wrote:
> > 	* tree-ssa-loop-niter.c (nonzero_p): Export.
> > 	* tree.h (nonzero_p): Declare.
> >
> > Index: tree-ssa-loop-niter.c
> > ===================================================================
> > *** tree-ssa-loop-niter.c	(revision 120080)
> > --- tree-ssa-loop-niter.c	(working copy)
> > *************** zero_p (tree arg)
> > *** 70,76 ****
> >   /* Returns true if ARG a nonzero constant.  Unlike integer_nonzerop, it does
> >      not care about overflow flags.  */
> >
> > ! static bool
> >   nonzero_p (tree arg)
> >   {
> >     if (!arg)
> > --- 70,76 ----
> >   /* Returns true if ARG a nonzero constant.  Unlike integer_nonzerop, it does
> >      not care about overflow flags.  */
> >
> > ! bool
> >   nonzero_p (tree arg)
> >   {
> >     if (!arg)
> 
> 
> I think it's now time that this hack in tree-ssa-loop-niter.c was
> removed, rather than exporting it and corrupting other young minds.
> If you check closely, you'll see that integer_nonzerop no longer
> cares about TREE_OVERFLOW/TREE_CONSTANT_OVERFLOW, and hasn't for
> a while.  Hence I'll strongly preapprove (perhaps even require?) that
> you delete nonzero_p, and change all remaining uses to integer_nonzerop
> before committing this patch.  This brings tree-ssa-loop-niter.c in
> line with the rest of the middle-end.
> 
> Many thanks in advance,

well, sure; although I am not quite sure why these "hacks" (if you
insist on calling it that) were not removed when the semantics of
integer_zerop/integer_nonzerop changed, which would avoid "corrupting
other young minds" much more efficiently.

Zdenek


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