Predicate and clone the given call site.
Declared in <llvm/Transforms/Utils/CallPromotionUtils.h>
CallBase&
versionCallSite(
CallBase& CB,
Value* Callee,
MDNode* BranchWeights);
This function creates an if-then-else structure at the location of the call site. The "if" condition compares the call site's called value to the given callee. The original call site is moved into the "else" block, and a clone of the call site is placed in the "then" block. The cloned instruction is returned.
The cloned call site placed in the "then" block.
| Name | Description |
|---|---|
| CB | Call site to predicate and clone. |
| Callee | Value compared against the call site's called operand. |
| BranchWeights | Optional !prof metadata for the new conditional branch. |