Specify that this terminator's branch weights are unknown at compile time.
Declared in <llvm/IR/ProfDataUtils.h>
void
setExplicitlyUnknownBranchWeights(
Instruction& I,
StringRef PassName);
This should only be called by passes, and never as a default behavior in e.g. MDBuilder. The goal is to use this info to validate passes do not accidentally drop profile info, and this API is called in cases where the pass explicitly cannot provide that info. Defaulting it in would hide bugs where the pass forgets to transfer over or otherwise specify profile info. Use PassName to capture the pass name (i.e. DEBUG_TYPE) for debuggability.
| Name | Description |
|---|---|
| I | The terminator instruction to mark. |
| PassName | The pass name (typically DEBUG_TYPE) recorded for debugging. |