This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] New and semi-improved PHI-OPT
Hi Andrew and Richard,
> > This is port of the PHI-OPT from the tree cleanup branch. The original
> > patch
> > was posted here:
> > http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02959.html> which
> > describes what the patch does.
> >
> > OK? Bootstrapped and tested on powerpc-darwin with no regressions.
>
> Do you have some numbers on the compile-time and memory-usage
> impact vs. performance benefit of this patch?
In particular, it would be interesting to see how many more
opportunities we catch at tree level and how much work we take away
from ifcvt at the RTL level.
+ for (i = 0;i < PHI_NUM_ARGS (phi); i++)
+ {
+ if (PHI_ARG_EDGE (phi, i) == e1)
+ arg0 = PHI_ARG_DEF_TREE (phi, i);
+ else if (PHI_ARG_EDGE (phi, i) == e2)
+ arg1 = PHI_ARG_DEF_TREE (phi, i);
+ }
This loop can collapse to
arg0 = PHI_ARG_DEF (phi, e1->dest_idx);
arg1 = PHI_ARG_DEF (phi, e2->dest_idx);
Kazu Hirata