diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-10-25 12:38:38 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-10-25 12:38:38 +0000 |
commit | d84a3eefa0bf6e62a0ea7482071d0e356ca0c788 (patch) | |
tree | cb6c9e8430678265683eed3c5a6c8758b6106844 /gcc/tree-dfa.c | |
parent | e6fe10fad764b6a1da5fc1bc243c9a6794002677 (diff) | |
download | gcc-d84a3eefa0bf6e62a0ea7482071d0e356ca0c788.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129625 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-dfa.c')
-rw-r--r-- | gcc/tree-dfa.c | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c index f7f4243948c..79f3b8712bc 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; -} |