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] Fix for PR64081 in RTL loop unroller


On 01/16/15 08:16, Zamyatin, Igor wrote:
Not sure it's possible to merge DF_REG_DEF_CHAIN walk and
DF_REF_CHAIN walk...
OK.  Just use the same overall structure if we can't pull the test out into a
single function that could be called from both places.


Thanks, is updated patch ok for trunk?

Igor


Changelog:

gcc

2015-01-16  Igor Zamyatin  <igor.zamyatin@intel.com>

	PR rtl-optimization/64081
	* loop-iv.c (def_pred_latch_p): New function.
	(latch_dominating_def): Allow specific cases with non-single
	definitions.
	(iv_get_reaching_def): Likewise.
	(check_complex_exit_p): New function.
	(check_simple_exit): Use check_complex_exit_p to allow certain cases
	with exits not executing on any iteration.

testsuite

2014-01-16  Igor Zamyatin  <igor.zamyatin@intel.com>

	PR rtl-optimization/64081
	* gcc.dg/pr64081.c: New test.
Just a few nits below.  Approved with the nits fixed.


+/* Checks that def is in an immediate predecessor of the latch block.  */
+
+static bool
+def_pred_latch_p (df_ref d_ref)
Use the actual parameter name in the comment and put it in caps, mention the return values. Something like this:

/* Return true if D_REF is defined in an immediate predecessor of the
   current loop's latch block.  Otherwise return false.  */


+  /* If we have single definition it has to be excuted on each iteration.  */
s/excuted/executed/

+/* Check whether exit is not simple but still good for further analysis.
+   Looks like such loops mostly are a result of jump threading.  */
+
+static bool
+check_complex_exit_p (struct loop* loop, basic_block bb)
/* Return true if LOOP has a complex exit, but is still good for further
   analysis.  Return false otherwise.  BB is LOOP's exit block.  */


With those comment fixes, this is OK for the trunk.

Thanks,
Jeff


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