From 7b0e48fb44b44241ae79e34a666edc87fdfbeb78 Mon Sep 17 00:00:00 2001 From: Daniel Berlin Date: Tue, 14 Aug 2007 20:52:47 +0000 Subject: tree-pass.h (PROP_pta): Removed. 2007-08-14 Daniel Berlin * tree-pass.h (PROP_pta): Removed. (TODO_rebuild_alias): New. (pass_may_alias): Removed. * tree-ssa-ccp.c (execute_fold_all_builtins): Only rebuild aliasing if we changed something. * tree-ssa-alias.c (compute_may_aliases): Make non-static. Update SSA internally. (pass_may_alias): Removed. (create_structure_vars): Return TODO_rebuild_alias. * tree-ssa-pre.c (do_pre): Return TODO_rebuild_alias. * tree-sra.c (tree_sra): Only rebuild aliasing if something changed. (tree_sra_early): We never affect aliasing right now. * tree-flow.h (compute_may_aliases): New prototype. * passes.c: Remove pass_may_alias from the passes. (execute_function_todo): Support TODO_rebuild_alias. From-SVN: r127491 --- gcc/ChangeLog | 20 ++++++++++++++++ gcc/passes.c | 27 +++++++--------------- gcc/testsuite/gcc.dg/tree-ssa/20031015-1.c | 6 ++--- gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c | 6 ++--- gcc/testsuite/gcc.dg/tree-ssa/20040911-1.c | 6 ++--- gcc/testsuite/gcc.dg/tree-ssa/alias-12.c | 6 ++--- gcc/testsuite/gcc.dg/tree-ssa/inline_asm-1.c | 6 ++--- gcc/testsuite/gcc.dg/tree-ssa/inline_asm-2.c | 6 ++--- gcc/testsuite/gcc.dg/tree-ssa/pr23382.c | 15 +++--------- gcc/testsuite/gcc.dg/tree-ssa/pr26421.c | 6 ++--- gcc/testsuite/gcc.dg/tree-ssa/pta-fp.c | 6 ++--- gcc/testsuite/gcc.dg/tree-ssa/salias-1.c | 2 +- gcc/tree-flow.h | 1 + gcc/tree-pass.h | 15 ++++++------ gcc/tree-sra.c | 4 +++- gcc/tree-ssa-alias.c | 34 ++++++++-------------------- gcc/tree-ssa-ccp.c | 10 ++++++-- gcc/tree-ssa-pre.c | 2 +- 18 files changed, 86 insertions(+), 92 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bda9ad8..11d3ad8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,22 @@ +2007-08-14 Daniel Berlin + + * tree-pass.h (PROP_pta): Removed. + (TODO_rebuild_alias): New. + (pass_may_alias): Removed. + * tree-ssa-ccp.c (execute_fold_all_builtins): Only rebuild + aliasing if we changed something. + * tree-ssa-alias.c (compute_may_aliases): Make non-static. Update + SSA internally. + (pass_may_alias): Removed. + (create_structure_vars): Return TODO_rebuild_alias. + * tree-ssa-pre.c (do_pre): Return TODO_rebuild_alias. + * tree-sra.c (tree_sra): Only rebuild aliasing if something + changed. + (tree_sra_early): We never affect aliasing right now. + * tree-flow.h (compute_may_aliases): New prototype. + * passes.c: Remove pass_may_alias from the passes. + (execute_function_todo): Support TODO_rebuild_alias. + 2007-08-14 Kai Tietz * i386.c: (legitimize_address): Move dllimported variable check @@ -385,6 +404,7 @@ * emit-rtl.c (try_split): Relink the insns with REG_LIBCALL note and with REG_RETVAL note after split. +>>>>>>> .r127481 2007-08-11 David Daney * config/mips/mips.c (mips_sched_reorder): Mark cycle parameter diff --git a/gcc/passes.c b/gcc/passes.c index 2d26a90..1ec6b0a 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -551,7 +551,6 @@ init_optimization_passes (void) { struct tree_opt_pass **p = &pass_all_optimizations.sub; NEXT_PASS (pass_create_structure_vars); - NEXT_PASS (pass_may_alias); NEXT_PASS (pass_return_slot); NEXT_PASS (pass_rename_ssa_copies); @@ -566,26 +565,19 @@ init_optimization_passes (void) NEXT_PASS (pass_vrp); NEXT_PASS (pass_dce); NEXT_PASS (pass_dominator); - /* The only const/copy propagation opportunities left after DOM should be due to degenerate PHI nodes. So rather than run the full propagators, run a specialized pass which only examines PHIs to discover const/copy propagation opportunities. */ NEXT_PASS (pass_phi_only_cprop); - NEXT_PASS (pass_tree_ifcombine); NEXT_PASS (pass_phiopt); - NEXT_PASS (pass_may_alias); NEXT_PASS (pass_tail_recursion); NEXT_PASS (pass_ch); NEXT_PASS (pass_stdarg); NEXT_PASS (pass_lower_complex); NEXT_PASS (pass_sra); - /* FIXME: SRA may generate arbitrary gimple code, exposing new - aliased and call-clobbered variables. As mentioned below, - pass_may_alias should be a TODO item. */ - NEXT_PASS (pass_may_alias); NEXT_PASS (pass_rename_ssa_copies); NEXT_PASS (pass_dominator); @@ -599,7 +591,6 @@ init_optimization_passes (void) NEXT_PASS (pass_reassoc); NEXT_PASS (pass_dce); NEXT_PASS (pass_dse); - NEXT_PASS (pass_may_alias); NEXT_PASS (pass_forwprop); NEXT_PASS (pass_phiopt); NEXT_PASS (pass_object_sizes); @@ -607,13 +598,8 @@ init_optimization_passes (void) NEXT_PASS (pass_store_copy_prop); NEXT_PASS (pass_fold_builtins); NEXT_PASS (pass_cse_sincos); - /* FIXME: May alias should a TODO but for 4.0.0, - we add may_alias right after fold builtins - which can create arbitrary GIMPLE. */ - NEXT_PASS (pass_may_alias); NEXT_PASS (pass_split_crit_edges); NEXT_PASS (pass_pre); - NEXT_PASS (pass_may_alias); NEXT_PASS (pass_sink_code); NEXT_PASS (pass_tree_loop); { @@ -637,9 +623,6 @@ init_optimization_passes (void) NEXT_PASS (pass_lower_vector_ssa); NEXT_PASS (pass_dce_loop); } - /* NEXT_PASS (pass_may_alias) cannot be done again because the - vectorizer creates alias relations that are not supported by - pass_may_alias. */ NEXT_PASS (pass_complete_unroll); NEXT_PASS (pass_loop_prefetch); NEXT_PASS (pass_iv_optimize); @@ -650,7 +633,7 @@ init_optimization_passes (void) NEXT_PASS (pass_reassoc); NEXT_PASS (pass_vrp); NEXT_PASS (pass_dominator); - + /* The only const/copy propagation opportunities left after DOM should be due to degenerate PHI nodes. So rather than run the full propagators, run a specialized pass which @@ -912,7 +895,13 @@ execute_function_todo (void *data) update_ssa (update_flags); cfun->last_verified &= ~TODO_verify_ssa; } - + + if (flags & TODO_rebuild_alias) + { + compute_may_aliases (); + cfun->curr_properties |= PROP_alias; + } + if (flags & TODO_remove_unused_locals) remove_unused_locals (); diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20031015-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20031015-1.c index a81edaf..46a3be7 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20031015-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20031015-1.c @@ -1,7 +1,7 @@ /* With tree-ssa, gcc.dg/20000724-1.c failed because we missed a VOP of x in the asm statement. */ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-alias1-vops" } */ +/* { dg-options "-O1 -fdump-tree-salias-vops" } */ struct s { int a; }; @@ -14,5 +14,5 @@ main(void) } /* The VDEF comes from the initial assignment and the asm. */ -/* { dg-final { scan-tree-dump-times "DEF" 2 "alias1" } } */ -/* { dg-final { cleanup-tree-dump "alias1" } } */ +/* { dg-final { scan-tree-dump-times "DEF" 2 "salias" } } */ +/* { dg-final { cleanup-tree-dump "salias" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c index 85d5074..318ba7c 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-alias1-vops" } */ +/* { dg-options "-O1 -fdump-tree-salias-vops" } */ extern void abort (void); int a; @@ -17,5 +17,5 @@ void bar (void) malloc functions may clobber global memory. Only the function result does not alias any other pointer. Hence, we must have a VDEF for a before and after the call to foo(). */ -/* { dg-final { scan-tree-dump-times "VDEF" 2 "alias1"} } */ -/* { dg-final { cleanup-tree-dump "alias1" } } */ +/* { dg-final { scan-tree-dump-times "VDEF" 2 "salias"} } */ +/* { dg-final { cleanup-tree-dump "salias" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040911-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040911-1.c index 3ddef71..ac2b961 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/20040911-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/20040911-1.c @@ -1,7 +1,7 @@ /* Verify that points-to information is handled properly for PTR + OFFSET pointer arithmetics. */ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-alias1-vops" } */ +/* { dg-options "-O2 -fdump-tree-salias-vops" } */ char buf[4], *q; int foo (int i) @@ -18,5 +18,5 @@ int foo (int i) return *p; } -/* { dg-final { scan-tree-dump-not "VUSE length; } -/* { dg-final { scan-tree-dump-times "VDEF