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: Richard Henderson <rth at redhat dot com>
- To: Vladimir Makarov <vmakarov 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 10:00:53 -0800
- Subject: Re: RFA: patch cheking dangerous insns in sched-ebb.c
- References: <3E54F383.2F125ABA@redhat.com>
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?
r~