This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH]: Improve ability of PRE to detect redundancies
On Mon, Nov 29, 2004 at 04:28:52PM +0100, Zdenek Dvorak wrote:
> I guess this can happen if the original iv happens to be defined in
> a phi node. I am not entirely sure rest of ivopts would behave sanely then,
> even if this function is fixed. The proper fix for the function is to
> if (TREE_CODE (cand->incremented_at) == PHI_NODE)
> return true;
> before the loop.
Thanks, this solved the ICE, and the compiler goes a little further,
but fails on verify_loop_closed_ssa ();...
> On the other hand, the source of the need for the patch -- PRE creating
> the wrapped around ivs -- seems like a wrong idea to me. This
> transformation seems to do nothing but increase register pressure.
Well, I have tested my patch alone without Danny's patch, and it is
failing because the wrap-around variable was not generated by PRE.
Also, the source of the need of the patch is not entirely linked to
the patch proposed by Daniel. As I've said in the previous message
these wrap-around constructs are quite common: during a bootstrap
there are about 7000 cases that are in fact just simple affine
evolution functions, but that are mishandled for the moment because
the scalar evolution analyzer was not enough smart to transform them.