Commit 694dc0ca by Eric Botcazou Committed by Eric Botcazou

profile.c (branch_prob): Move declaration of local variable.

	* profile.c (branch_prob): Move declaration of local variable.  Remove
	obsolete ??? comment.  Expand the location explicitly instead of using
	the LOCATION_FILE and LOCATION_LINE macros.

From-SVN: r172019
parent 5c8e4952
2011-04-06 Eric Botcazou <ebotcazou@adacore.com>
* profile.c (branch_prob): Move declaration of local variable. Remove
obsolete ??? comment. Expand the location explicitly instead of using
the LOCATION_FILE and LOCATION_LINE macros.
2011-04-06 Wei Guozhi <carrot@google.com> 2011-04-06 Wei Guozhi <carrot@google.com>
PR target/47855 PR target/47855
......
...@@ -1123,16 +1123,13 @@ branch_prob (void) ...@@ -1123,16 +1123,13 @@ branch_prob (void)
/* Line numbers. */ /* Line numbers. */
if (coverage_begin_output ()) if (coverage_begin_output ())
{ {
gcov_position_t offset;
/* Initialize the output. */ /* Initialize the output. */
output_location (NULL, 0, NULL, NULL); output_location (NULL, 0, NULL, NULL);
FOR_EACH_BB (bb) FOR_EACH_BB (bb)
{ {
gimple_stmt_iterator gsi; gimple_stmt_iterator gsi;
gcov_position_t offset = 0;
offset = 0;
if (bb == ENTRY_BLOCK_PTR->next_bb) if (bb == ENTRY_BLOCK_PTR->next_bb)
{ {
...@@ -1150,15 +1147,14 @@ branch_prob (void) ...@@ -1150,15 +1147,14 @@ branch_prob (void)
&offset, bb); &offset, bb);
} }
/* Notice GOTO expressions we eliminated while constructing the /* Notice GOTO expressions eliminated while constructing the CFG. */
CFG. */
if (single_succ_p (bb) if (single_succ_p (bb)
&& single_succ_edge (bb)->goto_locus != UNKNOWN_LOCATION) && single_succ_edge (bb)->goto_locus != UNKNOWN_LOCATION)
{ {
location_t curr_location = single_succ_edge (bb)->goto_locus; expanded_location curr_location
/* ??? The FILE/LINE API is inconsistent for these cases. */ = expand_location (single_succ_edge (bb)->goto_locus);
output_location (LOCATION_FILE (curr_location), output_location (curr_location.file, curr_location.line,
LOCATION_LINE (curr_location), &offset, bb); &offset, bb);
} }
if (offset) if (offset)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment