public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: "Zamyatin, Igor" <igor.zamyatin@intel.com>,
	       "GCC Patches (gcc-patches@gcc.gnu.org)"
	<gcc-patches@gcc.gnu.org>
Cc: "ysrumyan@gmail.com" <ysrumyan@gmail.com>
Subject: Re: [PATCH] Fix for PR64081 in RTL loop unroller
Date: Fri, 16 Jan 2015 16:54:00 -0000	[thread overview]
Message-ID: <54B9404D.2020801@redhat.com> (raw)
In-Reply-To: <0EFAB2BDD0F67E4FB6CCC8B9F87D756969D4B971@IRSMSX101.ger.corp.intel.com>

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

  reply	other threads:[~2015-01-16 16:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-19 10:24 Zamyatin, Igor
2015-01-09  6:09 ` Jeff Law
     [not found]   ` <CAEoMCqTzzMz-qO5x1q=5Htjxe1Von02iB_BpW7umXyQy_nVxtw@mail.gmail.com>
     [not found]     ` <CAKdSQZnrxfXcUMXwNW=c0PPaFgFe6rUKhkW+2T1U8BKop8K8=A@mail.gmail.com>
2015-01-13 18:38       ` Zamyatin, Igor
2015-01-13 19:06         ` Jeff Law
2015-01-15 16:55           ` Zamyatin, Igor
2015-01-15 17:11             ` Jeff Law
2015-01-16 15:34               ` Zamyatin, Igor
2015-01-16 16:54                 ` Jeff Law [this message]
2015-01-19 22:38 David Edelsohn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54B9404D.2020801@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=igor.zamyatin@intel.com \
    --cc=ysrumyan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).