Commit b8163af7 by Martin Liska Committed by Martin Liska

Initialize counters in autoFDO to zero, not to uninitialized.

2017-07-27  Martin Liska  <mliska@suse.cz>

	* auto-profile.c (afdo_annotate_cfg): Assign zero counts to
	BBs and edges seen by autoFDO.

From-SVN: r250621
parent 9811e84c
2017-07-27 Martin Liska <mliska@suse.cz>
* auto-profile.c (afdo_annotate_cfg): Assign zero counts to
BBs and edges seen by autoFDO.
2017-07-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/81502
......
......@@ -1547,9 +1547,11 @@ afdo_annotate_cfg (const stmt_set &promoted_stmts)
edge e;
edge_iterator ei;
bb->count = profile_count::uninitialized ();
/* As autoFDO uses sampling approach, we have to assume that all
counters are zero when not seen by autoFDO. */
bb->count = profile_count::zero ().afdo ();
FOR_EACH_EDGE (e, ei, bb->succs)
e->count = profile_count::uninitialized ();
e->count = profile_count::zero ().afdo ();
if (afdo_set_bb_count (bb, promoted_stmts))
set_bb_annotated (bb, &annotated_bb);
......
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