Insert a simple counted for-loop at a split point.
Declared in <llvm/Transforms/Utils/BasicBlockUtils.h>
std::pair<Instruction*, Value*>
SplitBlockAndInsertSimpleForLoop(
Value* End,
BasicBlock::iterator SplitBefore);
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).
A pair of the first insert point in the loop body and the induction variable.
| Name | Description |
|---|---|
| End | Exclusive upper bound of the induction variable; assumed > 0. |
| SplitBefore | Instruction at which the loop is inserted. |