This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Don't disallow copyprop for virtual ops for loop depth check
- From: "Daniel Berlin" <dberlin at dberlin dot org>
- To: "Andrew Pinski" <pinskia at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 1 Dec 2006 17:55:51 -0500
- Subject: Re: [PATCH] Don't disallow copyprop for virtual ops for loop depth check
- References: <1164698153.29420.22.camel@celery.andrew.com>
On 11/28/06, Andrew Pinski <pinskia@gmail.com> wrote:
Hi,
I noticed for virtual operands, we don't copyprop some names if it was
a loop variant. This is the correct thing for the normal operands but
for virtual operands, it makes less sense as we don't do coalescing on
virtual operands during out-of-ssa. This patch has a side effect of
also making a bug in PRE latent (PR 29922).
The original check was not because of coalescing, but because we would
copy prop in-loop variables outside the loop, causing *more*
invariantness in nested loops.
Why do you think this is different for virtual oeprands?
OK? Bootstrapped and tested on powerpc-darwin with no regressions.
Thanks,
Andrew Pinski
ChangeLog:
* tree-ssa-dom.c (cprop_operand): Ignore the loop depth when
copyproping on virtual operands.
(propagate_rhs_into_lhs): Likewise.
* tree-ssa-copy.c (copy_prop_visit_phi_node): Likewise.
* gcc.c-torture/compile/pr29922.c: New test.
* gfortran.fortran-torture/compile/pr29922.f: New test.