[patch/committed] PR middle-end/65233 make walk-ssa_copies handle empty PHIs

Richard Biener richard.guenther@gmail.com
Thu Mar 5 08:47:00 GMT 2015


On Thu, Mar 5, 2015 at 1:54 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> >
>> > It gets passed the valueize callback now which returns NULL_TREE for
>> > SSA names we can't follow.
>>
>> Btw, for match-and-simplify I had to use that as default for fold_stmt
>> _exactly_ because of the call to fold_stmt from replace_uses_by
>> via merge-blocks from cfgcleanup.  This is because replace-uses-by
>> doesn't have all uses replaced before it folds the stmt!
>>
>> We also have the "weaker" in-place flag.
>>
>> 2015-03-04  Richard Biener  <rguenther@suse.de>
>>
>>         PR middle-end/65233
>>         * ipa-polymorphic-call.c: Include tree-ssa-operands.h and
>>         tree-into-ssa.h.
>>         (walk_ssa_copies): Revert last chage.  Instead do not walk
>>         SSA names registered for SSA update.
>
> Maybe include the patch?  It should not be problem to make the function
> to valuelize everything it looks into.

I attached it.

Well, I think for stage1 the fix is to not call fold_stmt from CFG hooks or
CFG cleanup.  Merge-blocks can just demote PHIs to assignments and
leave propagation to followup cleanups (we can of course propagate
virtual operands).

I can try to do it for this stage (I can only find merge-blocks doing this)
as well.  Opinions?

Richard.

> Honza



More information about the Gcc-patches mailing list