aboutsummaryrefslogtreecommitdiff
path: root/gcc/auto-profile.cc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-10-26 12:59:00 +0200
committerMartin Liska <mliska@suse.cz>2022-10-26 12:59:00 +0200
commit62e475bad0d668c432bb97113cbf73fa281b8b55 (patch)
tree1c8993afe363ddbf4ae80795e47042df1e33d181 /gcc/auto-profile.cc
parent5776a5ffab3b92d6ccac87ccf32c580ee2742d5a (diff)
parentd80b7744c6ae6f6d8ca1f56982a50d1888b8279f (diff)
downloadgcc-62e475bad0d668c432bb97113cbf73fa281b8b55.zip
gcc-62e475bad0d668c432bb97113cbf73fa281b8b55.tar.gz
gcc-62e475bad0d668c432bb97113cbf73fa281b8b55.tar.bz2
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'gcc/auto-profile.cc')
-rw-r--r--gcc/auto-profile.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/auto-profile.cc b/gcc/auto-profile.cc
index ca48404..9730732 100644
--- a/gcc/auto-profile.cc
+++ b/gcc/auto-profile.cc
@@ -363,7 +363,8 @@ get_combined_location (location_t loc, tree decl)
/* TODO: allow more bits for line and less bits for discriminator. */
if (LOCATION_LINE (loc) - DECL_SOURCE_LINE (decl) >= (1<<16))
warning_at (loc, OPT_Woverflow, "offset exceeds 16 bytes");
- return ((LOCATION_LINE (loc) - DECL_SOURCE_LINE (decl)) << 16);
+ return ((LOCATION_LINE (loc) - DECL_SOURCE_LINE (decl)) << 16)
+ | get_discriminator_from_loc (loc);
}
/* Return the function decl of a given lexical BLOCK. */
@@ -652,7 +653,7 @@ function_instance::read_function_instance (function_instance_stack *stack,
for (unsigned i = 0; i < num_pos_counts; i++)
{
- unsigned offset = gcov_read_unsigned () & 0xffff0000;
+ unsigned offset = gcov_read_unsigned ();
unsigned num_targets = gcov_read_unsigned ();
gcov_type count = gcov_read_counter ();
s->pos_counts[offset].count = count;