[PATCH PR64434]

Yuri Rumyantsev ysrumyan@gmail.com
Wed Jan 14 13:37:00 GMT 2015


Hi All,

I did all changes proposed by Richard and delete check on def in the
same block as Jakub proposed.
I also moved check  on optimization to call site..

I also checked that bootstrap and regression testing did not show any
new failures.

Is it OK for trunk?

2015-01-14 14:02 GMT+03:00 Jakub Jelinek <jakub@redhat.com>:
> On Wed, Jan 14, 2015 at 11:58:50AM +0100, Richard Biener wrote:
>> >> +      /* Swap operands if the second one is more expensive.  */
>> >> +      def0 = get_gimple_for_ssa_name (op0);
>> >> +      if (!def0)
>> >> +     continue;
>> >> +      def1 = get_gimple_for_ssa_name (op1);
>> >> +      if (!def1)
>> >> +     continue;
>> >> +      swap = false;
>> >
>> > You don't check here if def0/def1 are from the same bb, is that guaranteed?
>>
>> I think so - we only TER inside BBs.
>
> But then why to check for it a few lines above:
>
> +         def_stmt = get_gimple_for_ssa_name (use);
> +         if (!def_stmt || gimple_bb (def_stmt) != bb)
>
> If get_gimple_for_ssa_name != NULL guarantees that gimple_bb of the result == bb, then
> even the || gimple_bb (def_stmt) != bb shouldn't be needed.
>
>         Jakub
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: application/octet-stream
Size: 3809 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150114/7410091d/attachment.obj>


More information about the Gcc-patches mailing list