[patch] Update profile in loop versioning and unrolling
Roger Sayle
roger@eyesopen.com
Wed Dec 20 22:22:00 GMT 2006
Hi Zdenek,
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,
Roger
--
More information about the Gcc-patches
mailing list