ΒΆvoid SplitLandingPadPredecessors(
llvm::BasicBlock* OrigBB,
ArrayRef<llvm::BasicBlock*> Preds,
const char* Suffix,
const char* Suffix2,
SmallVectorImpl<llvm::BasicBlock*>& NewBBs,
llvm::DominatorTree* DT = nullptr,
llvm::LoopInfo* LI = nullptr,
llvm::MemorySSAUpdater* MSSAU = nullptr,
bool PreserveLCSSA = false)
void SplitLandingPadPredecessors(
llvm::BasicBlock* OrigBB,
ArrayRef<llvm::BasicBlock*> Preds,
const char* Suffix,
const char* Suffix2,
SmallVectorImpl<llvm::BasicBlock*>& NewBBs,
llvm::DominatorTree* DT = nullptr,
llvm::LoopInfo* LI = nullptr,
llvm::MemorySSAUpdater* MSSAU = nullptr,
bool PreserveLCSSA = false)
Description
This method transforms the landing pad, OrigBB, by introducing two new basic blocks into the function. One of those new basic blocks gets the predecessors listed in Preds. The other basic block gets the remaining predecessors of OrigBB. The landingpad instruction OrigBB is clone into both of the new basic blocks. The new blocks are given the suffixes 'Suffix1' and 'Suffix2', and are returned in the NewBBs vector. 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).
Declared at: llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h:270
Parameters
- llvm::BasicBlock* OrigBB
- ArrayRef<llvm::BasicBlock*> Preds
- const char* Suffix
- const char* Suffix2
- SmallVectorImpl<llvm::BasicBlock*>& NewBBs
- llvm::DominatorTree* DT = nullptr
- llvm::LoopInfo* LI = nullptr
- llvm::MemorySSAUpdater* MSSAU = nullptr
- bool PreserveLCSSA = false