This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Don't reset cselib hash table during vt_initialize after every bb, only after every ebb
On Sat, Feb 27, 2010 at 02:15:32PM +0100, Steven Bosscher wrote:
> Looks to me like you should be using things like "find_edge (bb,
> bb->next_bb)" and "single_pred_p (bb->next_bb)" instead. Something
> like,
>
> + first_bb = bb;
> + for (;;)
> + {
> + edge e;
> + if (bb->next_bb == EXIT_BLOCK_PTR
> + || ! single_pred_p (bb->next_bb))
> + break;
> + e = find_edge (bb, bb->next_bb);
> + if (! e || (e->flags & EDGE_FALLTHRU) != 0)
> + break;
> + bb = bb->next_bb;
> + }
> + last_bb = bb;
> +
>
> (Or at least something along these lines...)
Makes sense, will change it. The code in the patch has been
copied from sched-ebb.c.
Jakub