On February 1, 2016 9:26:38 PM GMT+01:00, Jakub Jelinek <ja...@redhat.com> 
wrote:
>On Mon, Feb 01, 2016 at 09:39:19AM +0100, Steven Bosscher wrote:
>> Browny points for opting out of the loop over all insns in the basic
>> block when count > limit.
>
>Like this?
>Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

OK.

Richard.

>2016-02-01  Jakub Jelinek  <ja...@redhat.com>
>
>       * ifcvt.c (bb_ok_for_noce_convert_multiple_sets): Return false
>       when count is incremented above limit, don't analyze further
>       insns afterwards.
>
>--- gcc/ifcvt.c.jj     2016-02-01 09:46:00.000000000 +0100
>+++ gcc/ifcvt.c        2016-02-01 12:33:28.932281244 +0100
>@@ -3286,15 +3286,13 @@ bb_ok_for_noce_convert_multiple_sets (ba
>       if (!can_conditionally_move_p (GET_MODE (dest)))
>       return false;
> 
>-      ++count;
>+      /* FORNOW: Our cost model is a count of the number of
>instructions we
>+       would if-convert.  This is suboptimal, and should be improved as
>part
>+       of a wider rework of branch_cost.  */
>+      if (++count > limit)
>+      return false;
>     }
> 
>-  /* FORNOW: Our cost model is a count of the number of instructions
>we
>-     would if-convert.  This is suboptimal, and should be improved as
>part
>-     of a wider rework of branch_cost.  */
>-  if (count > limit)
>-    return false;
>-
>   return count > 1;
> }
> 
>
>
>       Jakub


Reply via email to