ΒΆllvm::BasicBlock*
DuplicateInstructionsInSplitBetween(
    llvm::BasicBlock* BB,
    llvm::BasicBlock* PredBB,
    llvm::Instruction* StopAt,
    llvm::ValueToValueMapTy& ValueMapping,
    llvm::DomTreeUpdater& DTU)

Description

Split edge between BB and PredBB and duplicate all non-Phi instructions from BB between its beginning and the StopAt instruction into the split block. Phi nodes are not duplicated, but their uses are handled correctly: we replace them with the uses of corresponding Phi inputs. ValueMapping is used to map the original instructions from BB to their newly-created copies. Returns the split block.

Declared at: llvm/include/llvm/Transforms/Utils/Cloning.h:262

Parameters

llvm::BasicBlock* BB
llvm::BasicBlock* PredBB
llvm::Instruction* StopAt
llvm::ValueToValueMapTy& ValueMapping
llvm::DomTreeUpdater& DTU