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] regrename.c: Speed up copyprop_hardreg_forward.


Hi Jeff,

> > 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];
>     else
>       init_value_data (all_vd + bb->index);
>   }
> 
> Or something reasonably close to that.

I'll test this then.

Kazu Hirata


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