llvm::peelLoop

Peel off PeelCount iterations from loop L.

Synopsis

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);

Description

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.

Parameters

NameDescription
LLoop to peel.
PeelCountNumber of iterations to peel off.
PeelLastIf true, peel the last iterations; otherwise peel the first.
LILoopInfo to keep consistent with the transformed CFG.
SEScalarEvolution used when peeling the last iteration.
DTDominator tree to update.
ACAssumption cache used by simplifications.
PreserveLCSSAWhether to preserve LCSSA form after peeling.
VMapReceives a mapping from original instructions to those in the last peeled-off iteration.