public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Zamyatin, Igor" <igor.zamyatin@intel.com>
To: "GCC Patches (gcc-patches@gcc.gnu.org)" <gcc-patches@gcc.gnu.org>
Cc: "Jeff Law (law@redhat.com)" <law@redhat.com>,
	"ysrumyan@gmail.com"	<ysrumyan@gmail.com>
Subject: RE: [PATCH] Fix for PR64081 in RTL loop unroller
Date: Tue, 13 Jan 2015 18:38:00 -0000	[thread overview]
Message-ID: <0EFAB2BDD0F67E4FB6CCC8B9F87D756969D345EB@IRSMSX101.ger.corp.intel.com> (raw)
In-Reply-To: <CAKdSQZnrxfXcUMXwNW=c0PPaFgFe6rUKhkW+2T1U8BKop8K8=A@mail.gmail.com>

> 
> Is it really sufficient here to verify that all the defs are on latch predecessors,
> what about the case where there is a predecessor without a def.  How do
> you guarantee domination in that case?
> 
> ISTM that given the structure for the code you're writing that you'd want to
> verify that in the event of multiple definitions that all of them appear on
> immediate predecessors of the latch *and* that each immediate
> predecessor has a definition.

Yes, do you think it's better to check exactly immediate predecessors?

> > -
> > -      if (!just_once_each_iteration_p (current_loop, DF_REF_BB (adef)))
> > -       return false;
> > +       {
> > +         def_num++;
> > +         if (!(def_pred_latch = def_pred_latch_p (adef))
> > +             || !rtx_equal_p( PATTERN (DF_REF_INSN (single_rd)),
> 
> Whitespace nit here.  Whitespace goes before the open paren for the
> function call, not after.

Thanks for catching this!

> 
> 
> > @@ -351,10 +384,10 @@ latch_dominating_def (rtx reg, df_ref *def)
> >   static enum iv_grd_result
> >   iv_get_reaching_def (rtx_insn *insn, rtx reg, df_ref *def)
> 
> And in this routine, you appear to do both checks.  ie, each def is on an
> immediate predecessor and each immediate predecessor has a def.  Is there
> some reason why iv_get_reaching_def has the stronger check while
> latch_dominating_def does not?

Looks like I was sure that latch_dominating_def always goes after iv_get_reaching_def but now I see it is not true. Will add another check in latch_dominating_def.

Thanks,
Igor

> 
> jeff

  parent reply	other threads:[~2015-01-13 18:02 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 [this message]
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
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=0EFAB2BDD0F67E4FB6CCC8B9F87D756969D345EB@IRSMSX101.ger.corp.intel.com \
    --to=igor.zamyatin@intel.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.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).