This is an archive of the discontinued LLVM Phabricator instance.

[BranchProbabilityInfo] Introduce method copyEdgeProbabilities(). NFC
ClosedPublic

Authored by yrouban on Nov 5 2020, 4:49 AM.

Details

Summary

A new method is introduced to allow bulk copy of outgoing edge probabilities from one block to another. This can be useful when a block is a cloned from another one and we do not know if there are edge probabilities set for the original block or not. Copying outside of the BranchProbabilityInfo class makes the user unconditionally set the cloned block's edge probabilities even if they are unset for the original block.
This new method will be used in JumpThreading.

Diff Detail