This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tuples] convert forwprop
On Fri, Jun 6, 2008 at 10:40 PM, Aldy Hernandez <aldyh@redhat.com> wrote:
>> > + /* FIXME tuples: I'm not sure why this is needed, but mainline had it. */
>> > + if (TREE_CODE_LENGTH (gimple_subcode (def_stmt)) == 0)
>> > + return false;
>>
>> Definitely not needed. The trunk should have gotten sth like this:
>
> Removed, thanks.
>
>> > - default:
>> > + /* We cannot propagate ssa names that occur in abnormal phi nodes. */
>> > + FOR_EACH_SSA_USE_OPERAND (use_p, def_stmt, iter, SSA_OP_USE)
>> > + if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (USE_FROM_PTR (use_p)))
>> > return false;
>> > - }
>>
>> as well.
>
> Are you saying we should remove this as well?
No, I'm just saying that I should have implemented the trunk version similar
to that ;)
>> Well - the propagation into GIMPLE_CONDs (that's the ones ending BBs, right?)
>> are definitely very important. But yes, folding is getting ugly with
>> tuples -- you'll
>> notice when you are converting SCCVN as well.
>
> Definitely ugly. We need two versions because of GIMPLE_COND's
> (statements), and COND_EXPRs (as expressions) in a GIMPLE_ASSIGN. Right
> now we never generate COND_EXPRs as an operand to a GIMPLE_ASSIGN, but
> only because we haven't converted the if-conversion pass yet.
Yep.
> Thank you so much for reviewing this.
> Aldy
>
Richard.