This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tuples] fix and enable forward propagation
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Aldy Hernandez" <aldyh at redhat dot com>
- Cc: dnovillo at google dot com, gcc-patches at gcc dot gnu dot org
- Date: Wed, 2 Jul 2008 10:25:41 +0200
- Subject: Re: [tuples] fix and enable forward propagation
- References: <20080701230333.GA15283@redhat.com>
On Wed, Jul 2, 2008 at 1:03 AM, Aldy Hernandez <aldyh@redhat.com> wrote:
> Hi folks.
>
> The code in trunk dealing with abnormal PHI nodes returned false on
> def_stmt's with only one operand on the RHS.
Huh. That's a bug then.
> The code below fixes it so
> tuples behave like trunk, thus avoiding a stage2 bootstrap problem.
I'll see if I can reproduce this on the mainline.
> With this patch we can bootstrap with forward propagation enabled.
>
> Tests are running, but a preliminary C run yielded no regressions.
>
> Richard/Diego is this OK (pending tests)?
Well, please add a FIXME there at least.
Also it looks like
/* Constants can be always propagated. */
if (is_gimple_min_invariant
(rhs_to_tree (TREE_TYPE (gimple_assign_lhs (def_stmt)), def_stmt)))
return true;
asks for a gimple_assign_min_invariant_rhs_p () predicate like
if (get_gimple_rhs_class (gimple_assign_rhs_code (def_stmt)) ==
GIMPLE_SINGLE_RHS)
return is_gimple_min_invariant (gimple_assign_rhs1 (def_stmt));
if (gimple_assign_rhs_code (def_stmt) == ADDR_EXPR)
return is_gimple_invariant_address (gimple_assign_rhs1 (def_stmt));
return false;
and adjustment of is_gimple_invariant_address to take the operand
of the ADDR_EXPR.
Richard.