promoteCallWithIfThenElse overloads
Synopses
Declared in <llvm/Transforms/Utils/CallPromotionUtils.h>
Promote an indirect call conditionally while updating contextual profiles.
CallBase*
promoteCallWithIfThenElse(
CallBase& CB,
Function& Callee,
PGOContextualProfile& CtxProf);
Promote the given indirect call site to conditionally call Callee. The promoted direct call instruction is predicated on `CB.getCalledOperand() == Callee`.
CallBase&
promoteCallWithIfThenElse(
CallBase& CB,
Function* Callee,
MDNode* BranchWeights = nullptr);
Return Value
-
The promoted direct call, or nullptr if promotion is not possible.
-
The promoted direct call placed in the "then" block.
Parameters
Name |
Description |
CB |
Indirect call site to promote conditionally. |
Callee |
Function to call on the promoted path. |
CtxProf |
Contextual profile used to validate and update instrumentation. |
BranchWeights |
Optional !prof metadata for the new conditional branch. |
Created with MrDocs