[tuples][patch] Tuplifiyng pass_forwprop
Oleg Ryjkov
olegr@google.com
Wed Apr 16 21:29:00 GMT 2008
On Fri, Apr 11, 2008 at 2:05 PM, Diego Novillo <dnovillo@google.com> wrote:
> On Thu, Apr 10, 2008 at 19:06, Oleg Ryjkov <olegr@google.com> wrote:
>
> > +2008-04-10 Oleg Ryjkov <olegr@google.com>
> > +
> > + * tree-ssa-forwprop.c (get_prop_dest_stmtm get_prop_source_stmt,
> > + can_propagate_from, remove_prop_source_from_use,
> > + tidy_after_forward_propagate_addr,
> > + forward_propagate_addr_into_variable_array_index,
> > + forward_propagate_addr_expr_1, forward_propagate_addr_expr,
> > + forward_propagate_comparison, simplify_not_neg_expr,
> > + -simplify_switch_expr,
> > + tree_ssa_forward_propagate_single_use_variables): Tuplified.
> > + (forward_propagate_into_cond): Tuplified and moved some functionality
> > + into forward_propagate_into_cond_gimple.
> > + (rhs_to_tree, forward_propagate_into_cond_gimple): New functions.
> > + * passes.c (init_optimization_passes): Enabled pass_forwprop.
> > + * tree-cfg.c (find_taken_edge_cond_expr): Fixed comment.
> > +
>
> OK with
>
> > +/* Return the rhs of a gimple_assign STMT in a form of a single tree,
> > + converted to type TYPE.
> > + FIXME tuples: This should disappear, but is needed so we can combine
> > + expressions and use the fold() interfaces. Long term, we need to
> > + develop folding and combine routines that deal with gimple
> > + exclusively . */
> > +
> > +static tree
> > +rhs_to_tree (tree type, gimple stmt)
>
> In here you can call the new gimple_fold_rhs() that Bill added to
> DOM. Since that function is called from more than one place,
> please move it to gimple.c first.
I moved Bill's fold_assignment_stmt to gimple.c. Then I noticed that
there is already a gimple_fold that supposed to have
similar functionality, so I modified gimple_fold to use
fold_assignment_stmt. I did not export fold_assignment_stmt
outside. Instead changed it users to use gimple_fold.
>
> > static int
> > -forward_propagate_into_cond (tree cond_expr, tree stmt)
> > +forward_propagate_into_cond_gimple (gimple stmt)
>
> s/cond_gimple/gimple_cond/
Done.
>
>
> Diego.
>
OK to commit? (the last change did not affect the test results in any way)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1.diff
Type: text/x-patch
Size: 47154 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080416/5bf57413/attachment.bin>
More information about the Gcc-patches
mailing list