Peel off PeelCount iterations from loop L.
Declared in <llvm/Transforms/Utils/LoopPeel.h>
void
peelLoop(
Loop* L,
unsigned int PeelCount,
bool PeelLast,
LoopInfo* LI,
ScalarEvolution* SE,
DominatorTree& DT,
AssumptionCache* AC,
bool PreserveLCSSA,
ValueToValueMapTy& VMap);
VMap is the value-map that maps instructions from the original loop to instructions in the last peeled-off iteration. If PeelLast is true, peel off the last PeelCount iterations from L (canPeelLastIteration must be true for L), otherwise peel off the first PeelCount iterations.
| Name | Description |
|---|---|
| L | Loop to peel. |
| PeelCount | Number of iterations to peel off. |
| PeelLast | If true, peel the last iterations; otherwise peel the first. |
| LI | LoopInfo to keep consistent with the transformed CFG. |
| SE | ScalarEvolution used when peeling the last iteration. |
| DT | Dominator tree to update. |
| AC | Assumption cache used by simplifications. |
| PreserveLCSSA | Whether to preserve LCSSA form after peeling. |
| VMap | Receives a mapping from original instructions to those in the last peeled-off iteration. |