Get the branch weights of a branch conditioned on b1 || b2.
Declared in <llvm/IR/ProfDataUtils.h>
template<
typename T1,
typename T2,
typename = std::enable_if<std::is_arithmetic_v<T1> && std::is_arithmetic_v<T2> && sizeof(T1) <= sizeof(uint64_t) && sizeof(T2) <= sizeof(uint64_t)>>
SmallVector<uint64_t, 2>
getDisjunctionWeights(
SmallVector<T1, 2> const& B1,
SmallVector<T2, 2> const& B2);
b1 and b2 are 2 booleans that are the conditions of 2 branches for which we have the branch weights B1 and B2, respectively. In both B1 and B2, the first position (index 0) is for the 'true' branch, and the second position (index 1) is for the 'false' branch.
Branch weights for the disjunction, [true, false].
| Name | Description |
|---|---|
| B1 | Branch weights of the first condition, [true, false]. |
| B2 | Branch weights of the second condition, [true, false]. |