This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Problems with a patch to improve dependence analysis
Hello,
> > this condition is not restrictive enough; try using
> >
> > (EXPR_P (def_stmt_rhs) && !REFERENCE_CLASS_P (def_stmt_rhs))
> >
>
> Yes, this seems to have fixed my problem. :) Why is this restriction
> nessecary?
references also match EXPR_P. If you have expression like
p_1 = a.x;
loop
{
*p1 = ...
}
you would propagate a.x to the base of the memory reference; this is
incorrect, as we do not know whether a.x is invariant in the loop.
Also, if you emit this expression containing memory references, you need
to update ssa form for virtual operands, which is why you have seen the
ICE.
Zdenek