This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: A latent bug - use of BRANCH_EDGE on trees.
Hi Steve,
> There is nothing specifically ugly about IR independence in principle,
> except that:
> 1) people expect BRANCH_EDGE to be cheap and you'd add a function
> call to it so it is needlessly expensive.
> 2) BRANCH_EDGE really doesn't have much of a meaning on trees, so
> making it work on trees just does not make sense.
I was just scratching my head for the same reason. If I change
BRANCH_EDGE, I would have to change FALLTHRU_EDGE to be complete. But
then tree dump would look confusing; when the true arm appears to
falls through in tree dump, we don't have EDGE_FALLTHRU_FLAG.
Let's go with Zdenek's first suggestion.
Let the caller pass the edge corresponding to the current
BRANCH_EDGE (switch_bb) to loopify
By the way, tree_ssa_loop_version uses FALLTHRU_EDGE, so I guess I
have to fix that.
Kazu Hirata