This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR 9974: Insns on edges in bypass
- From: Richard Henderson <rth at redhat dot com>
- To: Roger Sayle <roger at www dot eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 30 Mar 2003 13:56:23 -0800
- Subject: Re: [PATCH] PR 9974: Insns on edges in bypass
- References: <Pine.LNX.4.44.0303242038010.28953-100000@www.eyesopen.com>
On Mon, Mar 24, 2003 at 09:18:52PM -0700, Roger Sayle wrote:
> + valid prior to comit_edge_insertions. */
typo.
> + static bool
> + reg_killed_on_edge (regno, e)
> + unsigned int regno;
> + edge e;
> + {
> + rtx insn, set;
> +
> + for (insn = e->insns; insn; insn = NEXT_INSN (insn))
> + if (INSN_P (insn)
> + && (set = single_set (insn)) != NULL_RTX
> + && GET_CODE (SET_DEST (set)) == REG
> + && REGNO (SET_DEST (set)) == regno)
> + return true;
I'd prefer that you used note_stores here.
> if (new == pc_rtx)
> ! {
> ! edest = FALLTHRU_EDGE (bb);
> ! dest = edest->insns ? NULL : edest->dest;
> ! }
> else if (GET_CODE (new) == LABEL_REF)
> ! {
> ! dest = BLOCK_FOR_INSN (XEXP (new, 0));
> ! /* Don't bypass edges containing instructions. */
I think the comment should get pushed up (so that it's clear
that it applies to the fallthru edge as well). In addition,
I think a bit more commentary as to *why* would be appropriate.
r~