+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.
+
2008-08-18 Richard Guenther <rguenther@suse.de>
* tree-sra.c (generate_element_init_1): Deal with NULL constructor
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);
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);
+2008-08-18 Richard Guenther <rguenther@suse.de>
+
+ * 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.
+
2008-08-16 Tobias Burnus <burnus@net-b.de>
PR fortran/36825
/* { dg-do compile } */
-/* { dg-options "-fdump-tree-cleanup_cfg1" } */
+/* { dg-options "-fdump-tree-cfg" } */
void *alloca (__SIZE_TYPE__);
void link_error ();
link_error ();
return 0;
}
-/* { dg-final { scan-tree-dump-times "link_error" 0 "cleanup_cfg1" } } */
-/* { dg-final { cleanup-tree-dump "cleanup_cfg1" } } */
+/* { dg-final { scan-tree-dump-times "link_error" 0 "cfg" } } */
+/* { dg-final { cleanup-tree-dump "cfg" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-cleanup_cfg1" } */
+/* { dg-options "-O2 -fdump-tree-cfg" } */
#include <limits.h>
this_comparison_is_not_decidable ();
}
-/* { dg-final { scan-tree-dump-times "this_comparison_is_false" 0 "cleanup_cfg1" } } */
-/* { dg-final { scan-tree-dump-times "this_comparison_is_true" 6 "cleanup_cfg1" } } */
-/* { dg-final { scan-tree-dump-times "this_comparison_is_not_decidable" 12 "cleanup_cfg1" } } */
-/* { dg-final { scan-tree-dump-times "if " 12 "cleanup_cfg1" } } */
+/* { dg-final { scan-tree-dump-times "this_comparison_is_false" 0 "cfg" } } */
+/* { dg-final { scan-tree-dump-times "this_comparison_is_true" 6 "cfg" } } */
+/* { dg-final { scan-tree-dump-times "this_comparison_is_not_decidable" 12 "cfg" } } */
+/* { dg-final { scan-tree-dump-times "if " 12 "cfg" } } */
-/* { dg-final { cleanup-tree-dump "cleanup_cfg1" } } */
+/* { dg-final { cleanup-tree-dump "cfg" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-cddce" } */
+/* { dg-options "-O2 -fdump-tree-cddce2" } */
struct rtx_def;
typedef struct rtx_def *rtx;
/* There should be precisely one load of ->decl.rtl. If there is
more than, then the dominator optimizations failed. */
-/* { dg-final { scan-tree-dump-times "->decl\\.rtl" 1 "cddce"} } */
+/* { dg-final { scan-tree-dump-times "->decl\\.rtl" 1 "cddce2"} } */
/* There should be no loads of .rtmem since the complex return statement
is just "return 0". */
-/* { dg-final { scan-tree-dump-times ".rtmem" 0 "cddce"} } */
+/* { dg-final { scan-tree-dump-times ".rtmem" 0 "cddce2"} } */
/* There should be one IF statement (the complex return statement should
collapse down to a simple return 0 without any conditionals). */
-/* { dg-final { scan-tree-dump-times "if " 1 "cddce"} } */
+/* { dg-final { scan-tree-dump-times "if " 1 "cddce2"} } */
-/* { dg-final { cleanup-tree-dump "cddce" } } */
+/* { dg-final { cleanup-tree-dump "cddce2" } } */
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-cddce" } */
+/* { dg-options "-O1 -fdump-tree-cddce2" } */
extern void abort (void);
/* There should be no loads of ->code. If any exist, then we failed to
optimize away all the IF statements and the statements feeding
their conditions. */
-/* { dg-final { scan-tree-dump-times "->code" 0 "cddce"} } */
+/* { dg-final { scan-tree-dump-times "->code" 0 "cddce2"} } */
/* There should be no IF statements. */
-/* { dg-final { scan-tree-dump-times "if " 0 "cddce"} } */
+/* { dg-final { scan-tree-dump-times "if " 0 "cddce2"} } */
-/* { dg-final { cleanup-tree-dump "cddce" } } */
+/* { dg-final { cleanup-tree-dump "cddce2" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-cddce" } */
-
-
-
+/* { dg-options "-O2 -fdump-tree-cddce2" } */
struct rtx_def;
typedef struct rtx_def *rtx;
/* Cddce cannot remove possibly infinite loops and there is no way how to
determine whether the loop in can_move_up ends. */
-/* { dg-final { scan-tree-dump "if " "cddce"} } */
-/* { dg-final { cleanup-tree-dump "cddce" } } */
+/* { dg-final { scan-tree-dump "if " "cddce2"} } */
+/* { dg-final { cleanup-tree-dump "cddce2" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-cddce -fdump-tree-forwprop1-details" } */
+/* { dg-options "-O2 -fdump-tree-cddce2 -fdump-tree-forwprop1-details" } */
int abarney[2];
int afred[1];
/* After cddce we should have two IF statements remaining as the other
two tests can be threaded. */
-/* { dg-final { scan-tree-dump-times "if " 2 "cddce"} } */
-/* { dg-final { cleanup-tree-dump "cddce" } } */
+/* { dg-final { scan-tree-dump-times "if " 2 "cddce2"} } */
+/* { dg-final { cleanup-tree-dump "cddce2" } } */
c[i] = 1;
}
-/* { dg-final { scan-tree-dump "t\\\[i.*\\\] = 1;" "forwprop1" } } */
+/* { dg-final { scan-tree-dump-times "t\\\[i.*\\\] =.* 1;" 1 "forwprop1" } } */
/* { dg-final { cleanup-tree-dump "forwprop1" } } */
c[i] = 1;
}
-/* { dg-final { scan-tree-dump "t\\\[i.*\\\] = 1;" "forwprop1" } } */
+/* { dg-final { scan-tree-dump-times "t\\\[i.*\\\] =.* 1;" 1 "forwprop1" } } */
/* { dg-final { cleanup-tree-dump "forwprop?" } } */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-cddce" } */
+/* { dg-options "-O2 -fdump-tree-cddce1" } */
int main(void)
{
/* We should eliminate the inner condition, but the loop must be preserved
as it is infinite. Therefore there should be just one phi node (for i): */
-/* { dg-final { scan-tree-dump-times "PHI " 1 "cddce"} } */
+/* { dg-final { scan-tree-dump-times "PHI " 1 "cddce1"} } */
/* And one if (for the exit condition of the loop): */
-/* { dg-final { scan-tree-dump-times "if " 1 "cddce"} } */
+/* { dg-final { scan-tree-dump-times "if " 1 "cddce1"} } */
-/* { dg-final { cleanup-tree-dump "cddce" } } */
+/* { dg-final { cleanup-tree-dump "cddce1" } } */
#ifdef ENABLE_CHECKING
verify_stmts ();
#endif
-
- /* Dump a textual representation of the flowgraph. */
- if (dump_file)
- gimple_dump_cfg (dump_file, dump_flags);
}
static unsigned int
PROP_cfg, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_verify_stmts | TODO_cleanup_cfg /* todo_flags_finish */
+ TODO_verify_stmts | TODO_cleanup_cfg
+ | TODO_dump_func /* todo_flags_finish */
}
};