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] PR 9974: Insns on edges in bypass


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~


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