This is an archive of the discontinued LLVM Phabricator instance.

[BranchProbabilityInfo] Simplify getEdgeProbability (NFC)
ClosedPublic

Authored by kazu on Nov 6 2020, 3:10 PM.

Details

Summary

The patch simplifies BranchProbabilityInfo::getEdgeProbability by
handling two cases separately, depending on whether we have edge
probabilities.

  • If we have edge probabilities, then add up probabilities for successors being equal to Dst.
  • Otherwise, return the number of ocurrences divided by the total number of successors.

Diff Detail

Event Timeline

kazu created this revision.Nov 6 2020, 3:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 6 2020, 3:10 PM
kazu requested review of this revision.Nov 6 2020, 3:10 PM
MaskRay accepted this revision.Nov 6 2020, 8:14 PM

LGTM.

This revision is now accepted and ready to land.Nov 6 2020, 8:14 PM
This revision was landed with ongoing or failed builds.Nov 6 2020, 10:47 PM
This revision was automatically updated to reflect the committed changes.