Compute the unroll count for L from analysis, pragmas, and preferences.
Declared in <llvm/Transforms/Utils/UnrollLoop.h>
unsigned int
computeUnrollCount(
Loop* L,
TargetTransformInfo const& TTI,
DominatorTree& DT,
LoopInfo* LI,
AssumptionCache* AC,
ScalarEvolution& SE,
SmallPtrSetImpl<Value const*> const& EphValues,
OptimizationRemarkEmitter* ORE,
unsigned int TripCount,
unsigned int MaxTripCount,
bool MaxOrZero,
unsigned int TripMultiple,
UnrollCostEstimator const& UCE,
TargetTransformInfo::UnrollingPreferences& UP,
TargetTransformInfo::PeelingPreferences& PP);
Uses metadata and command-line options that are specific to the LoopUnroll pass.
Chosen unroll factor for L.
| Name | Description |
|---|---|
| L | Loop whose unroll count is being decided. |
| TTI | Target transform info used for cost modeling. |
| DT | Dominator tree used by peeling and unrolling heuristics. |
| LI | LoopInfo describing the loop nest. |
| AC | Assumption cache used by cost analysis. |
| SE | ScalarEvolution providing trip-count information. |
| EphValues | Ephemeral values excluded from size estimates. |
| ORE | Remark emitter for unrolling diagnostics. |
| TripCount | Exact trip count when known, otherwise 0. |
| MaxTripCount | Maximum trip count when an exact count is unknown. |
| MaxOrZero | True when the trip count is either MaxTripCount or zero. |
| TripMultiple | Greatest known multiple of the trip count. |
| UCE | Precomputed cost estimate for the rolled loop. |
| UP | Unrolling preferences updated with the chosen policy. |
| PP | Peeling preferences that may be adjusted alongside unrolling. |