diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-18 08:42:57 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-18 08:42:57 +0000 |
commit | 43bba217804a7cb888d642c1e6a4f5bf249697ed (patch) | |
tree | 90244459393ae5110783d90fa8c81ab974e5c8c8 /gcc/passes.c | |
parent | b4f27588efdec6bf0633e905da54d0d6cd48c1de (diff) | |
download | gcc-43bba217804a7cb888d642c1e6a4f5bf249697ed.tar.gz |
2008-08-18 Richard Guenther <rguenther@suse.de>
* passes.c (init_optimization_passes): Remove cleanup_cfg1,
sdse1 and addressables2 passes. Replace dce1 with cddce1.
Move call_cdce before build_alias. Move copyrename2,
cunrolli and ccp2 beafore build_alias. Re-add addressable2
right after final inlining.
* tree-cfg.c (build_gimple_cfg): Do not dump function here.
(pass_build_cfg): But instead via TODO_dump_func.
* gcc.dg/fold-alloca-1.c: Scan cfg dump instead of cleanup_cfg1.
* gcc.dg/fold-compare-3.c: Likewise.
* gcc.dg/tree-ssa/20030709-2.c: Scan cddce2 dump.
* gcc.dg/tree-ssa/20030808-1.c: Likewise.
* gcc.dg/tree-ssa/20040211-1.c: Likewise.
* gcc.dg/tree-ssa/20040305-1.c: Likewise.
* gcc.dg/tree-ssa/forwprop-1.c: Adjust pattern.
* gcc.dg/tree-ssa/forwprop-2.c: Likewise..
* gcc.dg/tree-ssa/ssa-dce-3.c: Scan cddce1 dump.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139189 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/passes.c')
-rw-r--r-- | gcc/passes.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/gcc/passes.c b/gcc/passes.c index ee3826b39db..a9af10d1c92 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -550,25 +550,14 @@ init_optimization_passes (void) struct opt_pass **p = &pass_all_early_optimizations.pass.sub; NEXT_PASS (pass_rebuild_cgraph_edges); NEXT_PASS (pass_early_inline); - NEXT_PASS (pass_cleanup_cfg); NEXT_PASS (pass_rename_ssa_copies); NEXT_PASS (pass_ccp); NEXT_PASS (pass_forwprop); NEXT_PASS (pass_update_address_taken); - NEXT_PASS (pass_simple_dse); NEXT_PASS (pass_sra_early); NEXT_PASS (pass_copy_prop); NEXT_PASS (pass_merge_phi); - NEXT_PASS (pass_dce); - /* Ideally the function call conditional - dead code elimination phase can be delayed - till later where potentially more opportunities - can be found. Due to lack of good ways to - update VDEFs associated with the shrink-wrapped - calls, it is better to do the transformation - here where memory SSA is not built yet. */ - NEXT_PASS (pass_call_cdce); - NEXT_PASS (pass_update_address_taken); + NEXT_PASS (pass_cd_dce); NEXT_PASS (pass_simple_dse); NEXT_PASS (pass_tail_recursion); NEXT_PASS (pass_convert_switch); @@ -594,14 +583,26 @@ init_optimization_passes (void) NEXT_PASS (pass_all_optimizations); { struct opt_pass **p = &pass_all_optimizations.pass.sub; - /* pass_build_alias is a dummy pass that ensures that we - execute TODO_rebuild_alias at this point. */ - NEXT_PASS (pass_build_alias); - NEXT_PASS (pass_return_slot); + /* Initial scalar cleanups before alias computation. + They ensure memory accesses are not indirect wherever possible. */ + NEXT_PASS (pass_update_address_taken); NEXT_PASS (pass_rename_ssa_copies); - /* Initial scalar cleanups. */ NEXT_PASS (pass_complete_unrolli); NEXT_PASS (pass_ccp); + /* Ideally the function call conditional + dead code elimination phase can be delayed + till later where potentially more opportunities + can be found. Due to lack of good ways to + update VDEFs associated with the shrink-wrapped + calls, it is better to do the transformation + here where memory SSA is not built yet. */ + NEXT_PASS (pass_call_cdce); + /* pass_build_alias is a dummy pass that ensures that we + execute TODO_rebuild_alias at this point. Re-building + alias information also rewrites no longer addressed + locals into SSA form if possible. */ + NEXT_PASS (pass_build_alias); + NEXT_PASS (pass_return_slot); NEXT_PASS (pass_phiprop); NEXT_PASS (pass_fre); NEXT_PASS (pass_dce); |