This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Ensure noce_convert_multiple_sets handles only multiple sets (PR rtl-optimization/69570)


On February 1, 2016 9:26:38 PM GMT+01:00, Jakub Jelinek <jakub@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  <jakub@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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]