This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: post-reload register copy-propagation
- From: Matt Kraai <kraai at alumni dot carnegiemellon dot edu>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 13 Dec 2001 11:49:09 -0800
- Subject: Re: post-reload register copy-propagation
Howdy,
In kill_value_regno, Richard Henderson wrote:
> + for (i = vd->e[regno].oldest_regno;
> + vd->e[i].next_regno != regno;
> + i = vd->e[i].next_regno)
> + continue;
> +
> + next = vd->e[regno].next_regno;
> + while (1)
> + {
> + vd->e[i].next_regno = next;
> + if (next == INVALID_REGNUM)
> + break;
> + i = next;
> + next = vd->e[next].next_regno;
> + }
As far as I can tell, this will cut the killed element out of the
list, and then copy the links between all of the trailing
elements. The following should be equivalent, but quicker.
for (i = vd->e[regno].oldest_regno;
vd->e[i].next_regno != regno;
i = vd->e[i].next_regno)
continue;
vd->e[i].next_regno = vd->e[regno].next_regno;
Matt