aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-dfa.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2007-10-25 12:38:38 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2007-10-25 12:38:38 +0000
commitcfff829fc6573d9919054d46b9beaa20dab9272d (patch)
treecb6c9e8430678265683eed3c5a6c8758b6106844 /gcc/tree-dfa.c
parent1fcd0a2c503b9fd16cf52df248c92c387d0086f9 (diff)
downloadgcc-cfff829fc6573d9919054d46b9beaa20dab9272d.zip
gcc-cfff829fc6573d9919054d46b9beaa20dab9272d.tar.gz
gcc-cfff829fc6573d9919054d46b9beaa20dab9272d.tar.bz2
tree-flow.h (mem_sym_stats): Remove.
2007-10-25 Richard Guenther <rguenther@suse.de> * tree-flow.h (mem_sym_stats): Remove. (dump_mem_sym_stats_for_var): Declare. * tree-dfa.c (dump_variable): Call dump_mem_sym_stats_for_var. (mem_sym_stats): Move ... * tree-ssa-alias.c (mem_sym_stats): ... here and make it static. (mem_sym_score): Rename from ... (pscore): ... this. Remove. (dump_mem_sym_stats_for_var): New function. Dump the score, but not the frequencies. (compare_mp_info_entries): Make sort stable by disambiguating on DECL_UID. From-SVN: r129625
Diffstat (limited to 'gcc/tree-dfa.c')
-rw-r--r--gcc/tree-dfa.c33
1 files changed, 1 insertions, 32 deletions
diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c
index f7f4243..79f3b87 100644
--- a/gcc/tree-dfa.c
+++ b/gcc/tree-dfa.c
@@ -345,16 +345,7 @@ dump_variable (FILE *file, tree var)
if (TREE_THIS_VOLATILE (var))
fprintf (file, ", is volatile");
- if (mem_sym_stats (cfun, var))
- {
- mem_sym_stats_t stats = mem_sym_stats (cfun, var);
- fprintf (file, ", direct reads: %ld", stats->num_direct_reads);
- fprintf (file, ", direct writes: %ld", stats->num_direct_writes);
- fprintf (file, ", indirect reads: %ld", stats->num_indirect_reads);
- fprintf (file, ", indirect writes: %ld", stats->num_indirect_writes);
- fprintf (file, ", read frequency: %ld", stats->frequency_reads);
- fprintf (file, ", write frequency: %ld", stats->frequency_writes);
- }
+ dump_mem_sym_stats_for_var (file, var);
if (is_call_clobbered (var))
{
@@ -1010,25 +1001,3 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
return exp;
}
-
-/* Return memory reference statistics for variable VAR in function FN.
- This is computed by alias analysis, but it is not kept
- incrementally up-to-date. So, these stats are only accurate if
- pass_may_alias has been run recently. If no alias information
- exists, this function returns NULL. */
-
-mem_sym_stats_t
-mem_sym_stats (struct function *fn, tree var)
-{
- void **slot;
- struct pointer_map_t *stats_map = gimple_mem_ref_stats (fn)->mem_sym_stats;
-
- if (stats_map == NULL)
- return NULL;
-
- slot = pointer_map_contains (stats_map, var);
- if (slot == NULL)
- return NULL;
-
- return (mem_sym_stats_t) *slot;
-}