Clones a loop OrigLoop. Returns the loop and the blocks in Blocks.
Synopsis
Declared in <llvm/Transforms/Utils/Cloning.h>
Loop*
cloneLoopWithPreheader(
BasicBlock* Before,
BasicBlock* LoopDomBB,
Loop* OrigLoop,
ValueToValueMapTy& VMap,
Twine const& NameSuffix,
LoopInfo* LI,
DominatorTree* DT,
SmallVectorImpl<BasicBlock*>& Blocks);
Description
Updates LoopInfo and DominatorTree assuming the loop is dominated by block LoopDomBB. Insert the new blocks before block specified in Before. The client needs to further update the CFG and DominatorTree after calling this function, to ensure the IR remains valid. Note: Only innermost loops are supported.
Return Value
Represents a single loop in the control flow graph. Note that not all SCCs in the CFG are necessarily loops.
Parameters
Name |
Description |
Before |
LLVM Basic Block Representation |
LoopDomBB |
LLVM Basic Block Representation |
OrigLoop |
Represents a single loop in the control flow graph. Note that not all SCCs in the CFG are necessarily loops. |
NameSuffix |
Twine ‐ A lightweight data structure for efficiently representing the concatenation of temporary values as strings. |
DT |
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree. |
Blocks |
This class consists of common code factored out of the SmallVector class to reduce code duplication based on the SmallVector 'N' template parameter. |
Created with MrDocs