llvm::SplitBlockPredecessors

Redirect selected predecessors of a block through a new intermediate block.

Synopses

Declared in <llvm/Transforms/Utils/BasicBlockUtils.h>

Redirect selected predecessors of a block through a new intermediate block.

BasicBlock*
SplitBlockPredecessors(
    BasicBlock* BB,
    ArrayRef<BasicBlock*> Preds,
    char const* Suffix,
    DomTreeUpdater* DTU = nullptr,
    LoopInfo* LI = nullptr,
    MemorySSAUpdater* MSSAU = nullptr,
    bool PreserveLCSSA = false);
» more...

Redirect selected predecessors of a block through a new intermediate block.

BasicBlock*
SplitBlockPredecessors(
    BasicBlock* BB,
    ArrayRef<BasicBlock*> Preds,
    char const* Suffix,
    DominatorTree* DT,
    LoopInfo* LI = nullptr,
    MemorySSAUpdater* MSSAU = nullptr,
    bool PreserveLCSSA = false);
» more...

Return Value

The new intermediate block to which predecessors from Preds now point.

Parameters

NameDescription
BBBlock whose predecessors are redirected.
PredsPredecessors moved to the new intermediate block.
SuffixName suffix for the newly created block.
DTUOptional dominator-tree updater for CFG changes.
LIOptional loop info to update.
MSSAUOptional MemorySSA updater for the split.
PreserveLCSSAWhether to preserve LCSSA form.
DTDominator tree to update.