This is an archive of the discontinued LLVM Phabricator instance.

Only set branch weight during sample pgo annotation when max_weight of the branch is non-zero. Otherwise use default static profile to set branch probability.
ClosedPublic

Authored by danielcdh on Sep 19 2016, 9:39 AM.

Details

Summary

It does not make sense to set equal weights for all unkown branches as we have static branch prediction available.

Diff Detail

Event Timeline

danielcdh updated this revision to Diff 71842.Sep 19 2016, 9:39 AM
danielcdh retitled this revision from to Only set branch weight during sample pgo annotation when max_weight of the branch is non-zero. Otherwise use default static profile to set branch probability..
danielcdh updated this object.
danielcdh added a reviewer: dnovillo.
danielcdh added a subscriber: llvm-commits.
dnovillo accepted this revision.Sep 19 2016, 9:41 AM
dnovillo edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Sep 19 2016, 9:41 AM
danielcdh closed this revision.Sep 19 2016, 9:42 AM