aboutsummaryrefslogtreecommitdiff
path: root/gcc/profile.c
diff options
context:
space:
mode:
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2016-09-27 13:22:04 +0000
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2016-09-27 13:22:04 +0000
commitfebf7a4513bd31e5dcff1a87f5825efbd6fc8e90 (patch)
treea350b8ac8a20df6b4c2255393b3c04ce3e4310f4 /gcc/profile.c
parent7469707ce8cf1d74002118cdca992650998d4acd (diff)
Fix PR gcov-profile/46266
PR gcov-profile/46266 * lib/gcov.exp: Verify that <built-in>.gcov file is not considered. * input.h (RESERVED_LOCATION_P): New macro. * profile.c (branch_prob): Use RESERVED_LOCATION_P and instread of comparison with UNKNOWN_LOCATION. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240536 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/profile.c')
-rw-r--r--gcc/profile.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/profile.c b/gcc/profile.c
index 791225b106d..2564f07abf7 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -1042,7 +1042,7 @@ branch_prob (void)
gsi_prev_nondebug (&gsi))
{
last = gsi_stmt (gsi);
- if (gimple_has_location (last))
+ if (!RESERVED_LOCATION_P (gimple_location (last)))
break;
}
@@ -1053,7 +1053,7 @@ branch_prob (void)
is not computed twice. */
if (last
&& gimple_has_location (last)
- && LOCATION_LOCUS (e->goto_locus) != UNKNOWN_LOCATION
+ && !RESERVED_LOCATION_P (e->goto_locus)
&& !single_succ_p (bb)
&& (LOCATION_FILE (e->goto_locus)
!= LOCATION_FILE (gimple_location (last))
@@ -1262,15 +1262,14 @@ branch_prob (void)
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
{
gimple *stmt = gsi_stmt (gsi);
- if (gimple_has_location (stmt))
+ if (!RESERVED_LOCATION_P (gimple_location (stmt)))
output_location (gimple_filename (stmt), gimple_lineno (stmt),
&offset, bb);
}
/* Notice GOTO expressions eliminated while constructing the CFG. */
if (single_succ_p (bb)
- && LOCATION_LOCUS (single_succ_edge (bb)->goto_locus)
- != UNKNOWN_LOCATION)
+ && !RESERVED_LOCATION_P (single_succ_edge (bb)->goto_locus))
{
expanded_location curr_location
= expand_location (single_succ_edge (bb)->goto_locus);