namespace llvm {
class AliasAnalysis;
+class DominatorTree;
class Instruction;
class MDNode;
class Pass;
/// If Unreachable is true, then ThenBlock ends with
/// UnreachableInst, otherwise it branches to Tail.
/// Returns the NewBasicBlock's terminator.
+///
+/// Updates DT if given.
TerminatorInst *SplitBlockAndInsertIfThen(Value *Cond, Instruction *SplitBefore,
bool Unreachable,
- MDNode *BranchWeights = nullptr);
+ MDNode *BranchWeights = nullptr,
+ DominatorTree *DT = nullptr);
/// SplitBlockAndInsertIfThenElse is similar to SplitBlockAndInsertIfThen,
/// but also creates the ElseBlock.