This is the mail archive of the
mailing list for the GCC project.
Re: [patch] regrename.c: Speed up copyprop_hardreg_forward.
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.
> While that does introduce new optimization opportunities, I still
> think it's appropriate for stage3 as the primary effect is to ensure
> that we visit blocks in a sane order so that we don't have to walk
> up the chains.
OK, but note that we don't really walk up the chains any more. We
only look at the immediate predecessor.
Having said all this, I might actually submit a patch to implement the
DFS order. :-)