Check whether BB is the merge point of a if-region. If so, return the branch instruction that determines which entry into BB will be taken. Also, return by references the block that will be entered from if the condition is true, and the block that will be entered if the condition is false.
Declared in <llvm/Transforms/Utils/BasicBlockUtils.h>
CondBrInst*
GetIfCondition(
BasicBlock* BB,
BasicBlock*& IfTrue,
BasicBlock*& IfFalse);
This does no checking to see if the true/false blocks have large or unsavory instructions in them.
Conditional Branch instruction.
| Name | Description |
|---|---|
| BB | LLVM Basic Block Representation |
| IfTrue | LLVM Basic Block Representation |
| IfFalse | LLVM Basic Block Representation |