This is the mail archive of the 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.

On Mon, 2004-11-22 at 13:32 -0500, Kazu Hirata wrote:
> Hi Jeff,
> I am not against using the DFS order, but here are some comments.
> > I seems to me that visiting in DFS order is really the right fix.
> > That guarantees that if BB has a single predecessor that we will
> > have already processed the pred (assuming that BB is reachable).
> 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.

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.


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