Insert a simple counted for‐loop at a split point.
Synopsis
Declared in <llvm/Transforms/Utils/BasicBlockUtils.h>
std::pair<Instruction*, Value*>
SplitBlockAndInsertSimpleForLoop(
Value* End,
BasicBlock::iterator SplitBefore);
Description
Insert a for (int i = 0; i < End; i++) loop structure (with the exception that End is assumed > 0, and thus not checked on entry) at SplitBefore. Returns the first insert point in the loop body, and the PHINode for the induction variable (i.e. "i" above).
Return Value
A pair of the first insert point in the loop body and the induction variable.
Parameters
Name |
Description |
End |
Exclusive upper bound of the induction variable; assumed > 0. |
SplitBefore |
Instruction at which the loop is inserted. |
Created with MrDocs