This is the mail archive of the
mailing list for the GCC project.
Re: [patch] regrename.c: Speed up copyprop_hardreg_forward.
> > OK, but note that if we use the DFS order, we still have to rely on
> > things like BB_VISITED to avoid following a loop forever or visiting
> > join points more than once.
> ?!? That stuff is already handled by flow_depth_first_order_compute.
Oh, that's not fair! :-)
> dfs_order = xmalloc (n_basic_blocks * sizeof (int));
> flow_depth_first_order_compute (dfs_order, NULL);
> for (i = 0; i < n_basic_blocks; i++)
> bb = basic_block (dfs_order[i]);
> if (EDGE_COUNT (bb->preds) == 1
> && ! (EDGE_PRED (bb, 0)->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))
> all_vd[bb->index] = all_vd[EDGE_PRED (bb, 0)->src->index];
> init_value_data (all_vd + bb->index);
> Or something reasonably close to that.
I'll test this then.