diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2017-06-09 13:38:35 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2017-06-09 11:38:35 +0000 |
commit | ffb9d1b140d2bd299642c001c1a79de4c2c81871 (patch) | |
tree | 886859fb9516d906dca0fefdd5ab571bbc8f687a /gcc/profile.c | |
parent | 323eb0898cb8d1869ae5354b36f390940d29f7d1 (diff) | |
download | gcc-ffb9d1b140d2bd299642c001c1a79de4c2c81871.zip gcc-ffb9d1b140d2bd299642c001c1a79de4c2c81871.tar.gz gcc-ffb9d1b140d2bd299642c001c1a79de4c2c81871.tar.bz2 |
profile.c (edge_gcov_counts): Turn to pointer.
* profile.c (edge_gcov_counts): Turn to pointer.
(compute_branch_probabilities, compute_branch_probabilities): Update.
* profile.h (edge_gcov_counts): Turn to pointer.
(edge_gcov_count): Update.
From-SVN: r249056
Diffstat (limited to 'gcc/profile.c')
-rw-r--r-- | gcc/profile.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/profile.c b/gcc/profile.c index d0dc3b8..d6f2084 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -69,7 +69,7 @@ along with GCC; see the file COPYING3. If not see /* Map from BBs/edges to gcov counters. */ vec<gcov_type> bb_gcov_counts; -hash_map<edge,gcov_type> edge_gcov_counts; +hash_map<edge,gcov_type> *edge_gcov_counts; struct bb_profile_info { unsigned int count_valid : 1; @@ -532,6 +532,7 @@ compute_branch_probabilities (unsigned cfg_checksum, unsigned lineno_checksum) return; bb_gcov_counts.safe_grow_cleared (last_basic_block_for_fn (cfun)); + edge_gcov_counts = new hash_map<edge,gcov_type>; if (profile_info->sum_all < profile_info->sum_max) { @@ -836,7 +837,8 @@ compute_branch_probabilities (unsigned cfg_checksum, unsigned lineno_checksum) e->count = profile_count::from_gcov_type (edge_gcov_count (e)); } bb_gcov_counts.release (); - edge_gcov_counts.empty (); + delete edge_gcov_counts; + edge_gcov_counts = NULL; counts_to_freqs (); |