On Wed, Jul 9, 2008 at 12:52 PM, Richard Guenther <rguenther@suse.de>
wrote:
This is a big patch that apart from tuplifying PRE does
- allow printing RHS of a stmt only (with a TDF_RHS_ONLY flag hack)
this reduces the difference between tuples and trunk dump files
and for example makes all VRP tests magically pass.
(I don't like that we change testcases on the branch to match what
we see there -- it is too easy to miss a difference in code this way)
- fix some bugs in the SCCVN conversion
- adds some gimple helpers and fixes some
- re-adds some of the SCCVN insertion code (I'll move that to trunk
as well)
the fake store insertion is not converted as it is disabled on the
trunk anyway.
The patch sofar passes C only bootstrap (all languages bootstrap
dies in building libstdc++ PCH ...), most of the PRE/FRE tests pass but
I didn't yet produce a baseline to compare testresults against.
Full testing (w/ PCH disabled) still running.
Should I split the patch?
Thanks,
Richard.
2008-07-09 Richard Guenther <rguenther@suse.de>
* gimple.h (gimple_assign_ssa_name_copy_p): Declare.
(gimple_has_lhs): New function.
* gimple.c (gimple_assign_ssa_name_copy_p): New function.
* tree-ssa-pre.c: Tuplify. Enable FRE and PRE.
(get_or_alloc_expr_for): Handle n-ary expressions.
* tree-ssa-sccvn.h (copy_reference_ops_from_call): Declare.
* tree-ssa-sccvn.c (copy_reference_ops_from_call): Export.
(vn_get_expr_for): Always hand out conversions.
(visit_reference_op_load): Properly set a value id for
inserted names.
(simplify_binary_expression): Use valid_gimple_rhs_p instead of
valid_gimple_expression_p.
(simplify_unary_expression): Likewise.
(set_ssa_val_to): Clear the cached expression.
* tree-ssa-copy.c (propagate_tree_value_into_stmt): Remove
redundant gimple_set_location call.
* gimple-pretty-print.c (print_gimple_stmt): Do not flush if
TDF_RHS_ONLY.
(dump_gimple_assign): Dump the RHS as expression if TDF_RHS_ONLY.
(dump_gimple_call): Likewise.
(dump_gimple_cond): Likewise.
* tree-pass.h (TDF_RHS_ONLY): New flag.
* testsuite/gcc.dg/tree-ssa/pr25485.c: Revert to trunk version.
vn_nary_op_lookup can return a NULL result but still fill in the
argument you pass in.
This happens, e.g. when values are created during phi translation and
inserted into the table.
Have you hit a case where it is actually necessary to add the code above?
If so, i'd love to see it :)