diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-20 12:34:06 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-20 12:34:06 +0000 |
commit | 581f8050f25925435ebe0c41e4f90a1f8606412a (patch) | |
tree | c9415d7b8136e0a8e6c5dcba11dcce11ac90a654 /gcc/tree-ssa-dce.c | |
parent | f1c9f01fb18d14998fd1441a3dc05dd44b9f1be1 (diff) | |
download | gcc-581f8050f25925435ebe0c41e4f90a1f8606412a.tar.gz |
2008-05-20 Richard Guenther <rguenther@suse.de>
* tree-ssa-reassoc.c (fini_reassoc): Use the statistics
infrastructure.
* tree-ssa-sccvn.c (process_scc): Likewise.
* tree-ssa-sink.c (execute_sink_code): Likewise.
* tree-ssa-threadupdate.c (thread_through_all_blocks): Likewise.
* tree-vrp.c (process_assert_insertions): Likewise.
* tree-ssa-dce.c (eliminate_unnecessary_stmts): Likewise.
(perform_tree_ssa_dce): Likewise.
* tree-ssa-dom.c (tree_ssa_dominator_optimize): Likewise.
(dump_dominator_optimization_stats): Likewise.
* tree-vectorizer.c (vectorize_loops): Likewise.
* gcc.dg/tree-ssa/ssa-sink-1.c: Adjust.
* gcc.dg/tree-ssa/ssa-sink-2.c: Likewise.
* gcc.dg/tree-ssa/ssa-sink-3.c: Likewise.
* gcc.dg/tree-ssa/ssa-sink-4.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135611 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-dce.c')
-rw-r--r-- | gcc/tree-ssa-dce.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c index 95457eb7fe4..760e20d14bc 100644 --- a/gcc/tree-ssa-dce.c +++ b/gcc/tree-ssa-dce.c @@ -735,22 +735,19 @@ eliminate_unnecessary_stmts (void) static void print_stats (void) { - if (dump_file && (dump_flags & (TDF_STATS|TDF_DETAILS))) - { - float percg; + float percg; - percg = ((float) stats.removed / (float) stats.total) * 100; - fprintf (dump_file, "Removed %d of %d statements (%d%%)\n", - stats.removed, stats.total, (int) percg); + percg = ((float) stats.removed / (float) stats.total) * 100; + fprintf (dump_file, "Removed %d of %d statements (%d%%)\n", + stats.removed, stats.total, (int) percg); - if (stats.total_phis == 0) - percg = 0; - else - percg = ((float) stats.removed_phis / (float) stats.total_phis) * 100; + if (stats.total_phis == 0) + percg = 0; + else + percg = ((float) stats.removed_phis / (float) stats.total_phis) * 100; - fprintf (dump_file, "Removed %d of %d PHI nodes (%d%%)\n", - stats.removed_phis, stats.total_phis, (int) percg); - } + fprintf (dump_file, "Removed %d of %d PHI nodes (%d%%)\n", + stats.removed_phis, stats.total_phis, (int) percg); } /* Initialization for this pass. Set up the used data structures. */ @@ -854,8 +851,11 @@ perform_tree_ssa_dce (bool aggressive) if (cfg_altered) free_dominance_info (CDI_DOMINATORS); + statistics_counter_event (cfun, "Statements deleted", stats.removed); + statistics_counter_event (cfun, "PHI nodes deleted", stats.removed_phis); + /* Debugging dumps. */ - if (dump_file) + if (dump_file && (dump_flags & (TDF_STATS|TDF_DETAILS))) print_stats (); tree_dce_done (aggressive); |