ΒΆvoid SplitBlockAndInsertIfThenElse(
    llvm::Value* Cond,
    llvm::Instruction* SplitBefore,
    llvm::Instruction** ThenTerm,
    llvm::Instruction** ElseTerm,
    llvm::MDNode* BranchWeights = nullptr)

Description

SplitBlockAndInsertIfThenElse is similar to SplitBlockAndInsertIfThen, but also creates the ElseBlock. Before: Head SplitBefore Tail After: Head if (Cond) ThenBlock else ElseBlock SplitBefore Tail

Declared at: llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h:326

Parameters

llvm::Value* Cond
llvm::Instruction* SplitBefore
llvm::Instruction** ThenTerm
llvm::Instruction** ElseTerm
llvm::MDNode* BranchWeights = nullptr