This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tuples] fix and enable forward propagation


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]