On Tue, Jan 24, 2012 at 7:34 AM, Andrew Pinski
<andrew.pin...@caviumnetworks.com> wrote:
> Hi,
>  Right now PHI-OPT does try to handle the case where we have multiple
> PHIs but the other PHIs have the same value for the edges we care
> about.
> This fixes the issue and allows PHI-OPT to handle a few more cases and
> it removes the TODO in the comments.
>
> OK For 4.8? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
>
> Thanks,
> Andrew Pinski
>
> ChangeLog:
> * tree-ssa-phiopt.c (gimple_phi_singleton_for_edges): New function.

The name is confusing I think, because it returns the single non-singleton
PHI for the edge pair ... you can avoid choosing a better name by
inlining it to its single call site.  I'd maybe name it
single_non_singleton_phi_for_edges.

Otherwise ok.

Thanks,
Richard.

> (tree_ssa_phiopt_worker): Use gimple_phi_singleton_for_edges.
> (empty_block_p): Check also if the PHIs for the block are empty.
>
> testsuite/ChangeLog:
> * gcc.dg/tree-ssa/phi-opt-7.c: New testcase.

Reply via email to