Skip to content

Commit

Permalink
Do not call streamer_read_hwi in a function call.
Browse files Browse the repository at this point in the history
	* ipa-profile.c (ipa_profile_read_edge_summary): Do not allow
	2 calls of streamer_read_hwi in a function call.
  • Loading branch information
marxin committed Jan 15, 2020
1 parent 6ff7efb commit 84a3eff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2020-01-15 Martin Liska <[email protected]>

* ipa-profile.c (ipa_profile_read_edge_summary): Do not allow
2 calls of streamer_read_hwi in a function call.

2020-01-15 Richard Biener <[email protected]>

* alias.c (record_alias_subset): Avoid redundant work when
Expand Down
5 changes: 3 additions & 2 deletions gcc/ipa-profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,9 @@ ipa_profile_read_edge_summary (class lto_input_block *ib, cgraph_edge *edge)

for (i = 0; i < len; i++)
{
speculative_call_target item (streamer_read_hwi (ib),
streamer_read_hwi (ib));
unsigned int target_id = streamer_read_hwi (ib);
int target_probability = streamer_read_hwi (ib);
speculative_call_target item (target_id, target_probability);
csum->speculative_call_targets.safe_push (item);
}
}
Expand Down

0 comments on commit 84a3eff

Please sign in to comment.