14#ifndef LLVM_TRANSFORMS_UTILS_LOOPPEEL_H
15#define LLVM_TRANSFORMS_UTILS_LOOPPEEL_H
33bool peelLoop(Loop *L,
unsigned PeelCount,
bool PeelLast, LoopInfo *LI,
34 ScalarEvolution *SE, DominatorTree &DT, AssumptionCache *AC,
37TargetTransformInfo::PeelingPreferences
39 const TargetTransformInfo &
TTI,
40 std::optional<bool> UserAllowPeeling,
41 std::optional<bool> UserAllowProfileBasedPeeling,
42 bool UnrollingSpecficValues =
false);
45 TargetTransformInfo::PeelingPreferences &PP,
46 unsigned TripCount, DominatorTree &DT,
47 ScalarEvolution &SE,
const TargetTransformInfo &
TTI,
48 AssumptionCache *AC =
nullptr,
49 unsigned Threshold = UINT_MAX);
This is an optimization pass for GlobalISel generic memory operations.
bool canPeel(const Loop *L)
bool canPeelLastIteration(const Loop &L, ScalarEvolution &SE)
Returns true if the last iteration of L can be peeled off.
TargetTransformInfo::PeelingPreferences gatherPeelingPreferences(Loop *L, ScalarEvolution &SE, const TargetTransformInfo &TTI, std::optional< bool > UserAllowPeeling, std::optional< bool > UserAllowProfileBasedPeeling, bool UnrollingSpecficValues=false)
void computePeelCount(Loop *L, unsigned LoopSize, TargetTransformInfo::PeelingPreferences &PP, unsigned TripCount, DominatorTree &DT, ScalarEvolution &SE, const TargetTransformInfo &TTI, AssumptionCache *AC=nullptr, unsigned Threshold=UINT_MAX)
ValueMap< const Value *, WeakTrackingVH > ValueToValueMapTy
bool peelLoop(Loop *L, unsigned 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 peele...