This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] PHI_ARG_CAPACITY != block degree
Hello,
> > *************** rewrite_block (basic_block bb)
> > *** 783,789 ****
> > tree currdef;
> >
> > /* Ignore PHI nodes that have already been renamed. */
> > ! if (PHI_NUM_ARGS (phi) == PHI_ARG_CAPACITY (phi))
> > continue;
> >
> Oh, bugger. I inadvertently left this behind. This is wrong now that
> we have a proper way of detecting whether a variable needs to be
> renamed. In here we should have a test similar to that done in
> tree-ssa.c:prepare_operand_for_rename. We should be testing whether
> PHI_RESULT (phi) is present in vars_to_rename.
>
> In any case, could you add a test case where you found this to be a
> problem? I'm curious about what kinds of failures does this generate.
it only happened to me on tree-ssa-cfg-branch after merge from tree-ssa.
It probably cannot be reproduced on tree-ssa, since the only pass that
uses add_phi_arg is ssa_pre and rewrite_into_ssa is not called after it.
Zdenek