This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: patch cheking dangerous insns in sched-ebb.c
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Jakub Jelinek <jakub at redhat dot com>
- Date: Thu, 20 Feb 2003 16:04:57 -0500
- Subject: Re: RFA: patch cheking dangerous insns in sched-ebb.c
- References: <3E54F383.2F125ABA@redhat.com> <20030220180053.GE29009@redhat.com>
Richard Henderson wrote:
>
> On Thu, Feb 20, 2003 at 10:25:55AM -0500, Vladimir Makarov wrote:
> > + static void
> > + add_deps_for_risky_insns (head, tail)
> > + rtx head, tail;
> > + {
> > + rtx insn, prev;
> > + rtx last_jump = NULL_RTX;
> > + int class;
> > +
> > + for (insn = head; insn != NEXT_INSN (tail); insn = NEXT_INSN (insn))
> > + if (GET_CODE (insn) == JUMP_INSN)
> > + last_jump = insn;
> > + else if (INSN_P (insn) && last_jump != NULL_RTX)
> > + {
> > + class = haifa_classify_insn (insn);
> > + if (class == TRAP_RISKY || class == IRISKY
> > + || class == PRISKY_CANDIDATE || class == PFREE_CANDIDATE)
> > + for (prev = last_jump;
> > + prev != PREV_INSN (head);
> > + prev = PREV_INSN (prev))
>
> It isn't sufficient to depend on only the jump insn?
>
It is additional links to prevent speculative move. Ebb has a specific
structure therefore finding a speculative move is a bit easier than for
sched-rgn.c
Vlad