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] Modulo-scheduling improvements. Patch 2 of 2.


> > > +  pattern = PATTERN (doloop_pat);
> > > +
> > >    if (GET_CODE (pattern) != PARALLEL)
> > > -    return 0;
> > > +    {
> > > +      rtx cond;
> > >
> > > -  cmp = XVECEXP (pattern, 0, 0);
> > > -  inc = XVECEXP (pattern, 0, 1);
> > > +      cmp = pattern;
> > > +      inc = PATTERN (PREV_INSN (doloop_pat));
> >
> > This is probably where we need to check that
> > +  if (INSN_P (PREV_INSN (doloop_pat)))
>
> it won't harm (and also checking that PREV_INSN (doloop_pat) !=
NULL_RTX);
> however, since doloop_pat comes from the machine description, we could
> also just trust it.

We saw cases in spu and ia64 that PREV_INSN was a note and thus the check
for INSN_P (PREV_INSN (doloop_pat)) should be done.

Thanks,
Revital



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