This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH] Fix for PR64081 in RTL loop unroller
- From: "Zamyatin, Igor" <igor dot zamyatin at intel dot com>
- To: "GCC Patches (gcc-patches at gcc dot gnu dot org)" <gcc-patches at gcc dot gnu dot org>
- Cc: "Jeff Law (law at redhat dot com)" <law at redhat dot com>, "ysrumyan at gmail dot com" <ysrumyan at gmail dot com>
- Date: Tue, 13 Jan 2015 18:01:15 +0000
- Subject: RE: [PATCH] Fix for PR64081 in RTL loop unroller
- Authentication-results: sourceware.org; auth=none
- References: <0EFAB2BDD0F67E4FB6CCC8B9F87D756969CF7BFC at IRSMSX101 dot ger dot corp dot intel dot com> <54AF707D dot 6080800 at redhat dot com> <CAEoMCqTzzMz-qO5x1q=5Htjxe1Von02iB_BpW7umXyQy_nVxtw at mail dot gmail dot com> <CAKdSQZnrxfXcUMXwNW=c0PPaFgFe6rUKhkW+2T1U8BKop8K8=A at mail dot gmail dot 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