ΒΆllvm::BasicBlock* SplitBlockPredecessors(
    llvm::BasicBlock* BB,
    ArrayRef<llvm::BasicBlock*> Preds,
    const char* Suffix,
    llvm::DominatorTree* DT,
    llvm::LoopInfo* LI = nullptr,
    llvm::MemorySSAUpdater* MSSAU = nullptr,
    bool PreserveLCSSA = false)

Description

This method introduces at least one new basic block into the function and moves some of the predecessors of BB to be predecessors of the new block. The new predecessors are indicated by the Preds array. The new block is given a suffix of 'Suffix'. Returns new basic block to which predecessors from Preds are now pointing. If BB is a landingpad block then additional basicblock might be introduced. It will have Suffix+".split_lp". See SplitLandingPadPredecessors for more details on this case. This currently updates the LLVM IR, DominatorTree, LoopInfo, and LCCSA but no other analyses. In particular, it does not preserve LoopSimplify (because it's complicated to handle the case where one of the edges being split is an exit of a loop with other exits). FIXME: deprecated, switch to the DomTreeUpdater-based one.

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

Parameters

llvm::BasicBlock* BB
ArrayRef<llvm::BasicBlock*> Preds
const char* Suffix
llvm::DominatorTree* DT
llvm::LoopInfo* LI = nullptr
llvm::MemorySSAUpdater* MSSAU = nullptr
bool PreserveLCSSA = false