Extract branch weights from a conditional branch or select Instruction.
Declared in <llvm/IR/ProfDataUtils.h>
bool
extractBranchWeights(
Instruction const& I,
uint64_t& TrueVal,
uint64_t& FalseVal);
True on success with profile weights filled in. False if no metadata or invalid metadata was found.
| Name | Description |
|---|---|
| I | The instruction to extract branch weights from. |
| TrueVal [out] | will contain the branch weight for the True branch |
| FalseVal [out] | will contain the branch weight for the False branch |