ΒΆllvm::CallBase& promoteCallWithIfThenElse(
    llvm::CallBase& CB,
    llvm::Function* Callee,
    llvm::MDNode* BranchWeights = nullptr)

Description

Promote the given indirect call site to conditionally call \p Callee. This function creates an if-then-else structure at the location of the call site. The original call site is moved into the "else" block. A clone of the indirect call site is promoted, placed in the "then" block, and returned. If\p BranchWeights is non-null, it will be used to set !prof metadata on the new conditional branch.

Declared at: llvm/include/llvm/Transforms/Utils/CallPromotionUtils.h:51

Parameters

llvm::CallBase& CB
llvm::Function* Callee
llvm::MDNode* BranchWeights = nullptr