diff options
author | Richard Guenther <rguenther@suse.de> | 2008-08-13 08:57:20 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-08-13 08:57:20 +0000 |
commit | 25c6036a5bc49ba73bc3f5d2573cf2506b513a1f (patch) | |
tree | b8a064a0f6159ca9ca85a74e1d5e760278c524c7 /gcc/passes.c | |
parent | 92464a8a7a6f5404b71b00acdd04cd2754d6b100 (diff) | |
download | gcc-25c6036a5bc49ba73bc3f5d2573cf2506b513a1f.zip gcc-25c6036a5bc49ba73bc3f5d2573cf2506b513a1f.tar.gz gcc-25c6036a5bc49ba73bc3f5d2573cf2506b513a1f.tar.bz2 |
re PR tree-optimization/15255 ([tree-ssa] a * 2 + a * 2 is not converted to a * 4)
2008-08-13 Richard Guenther <rguenther@suse.de>
PR tree-optimization/15255
* tree-ssa-reassoc.c (linearize_expr_tree): Declare.
(struct oecount_s): New struct and VEC types.
(cvec): New global.
(oecount_hash): New function.
(oecount_eq): Likewise.
(oecount_cmp): Likewise.
(zero_one_operation): New function.
(build_and_add_sum): Likewise.
(undistribute_ops_list): Perform un-distribution of multiplication
and division on the chain of summands.
(should_break_up_subtract): Also break up subtracts for factors.
(reassociate_bb): Delete dead visited statements.
Call undistribute_ops_list. Re-sort and optimize if it did something.
* passes.c (init_optimization_passes): Move DSE before
reassociation.
* tree-ssa-loop-niter.c (stmt_dominates_stmt_p): Correctly handle
PHI nodes.
* gcc.dg/tree-ssa/reassoc-14.c: New testcase.
* gcc.dg/tree-ssa/reassoc-15.c: Likewise.
* gcc.dg/tree-ssa/reassoc-16.c: Likewise.
* gcc.dg/torture/reassoc-1.c: Likewise.
* gcc.dg/tree-ssa/recip-2.c: Adjust.
* gcc.dg/tree-ssa/recip-6.c: Likewise.
* gcc.dg/tree-ssa/recip-7.c: Likewise.
* gfortran.dg/reassoc_4.f: Likewise.
From-SVN: r139048
Diffstat (limited to 'gcc/passes.c')
-rw-r--r-- | gcc/passes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/passes.c b/gcc/passes.c index 64470ba..ee3826b 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -633,9 +633,9 @@ init_optimization_passes (void) only examines PHIs to discover const/copy propagation opportunities. */ NEXT_PASS (pass_phi_only_cprop); + NEXT_PASS (pass_dse); NEXT_PASS (pass_reassoc); NEXT_PASS (pass_dce); - NEXT_PASS (pass_dse); NEXT_PASS (pass_forwprop); NEXT_PASS (pass_phiopt); NEXT_PASS (pass_object_sizes); |