struct TargetTransformInfo::UnrollingPreferences

Declaration

struct TargetTransformInfo::UnrollingPreferences { /* full declaration omitted */ };

Description

Parameters that control the generic loop unrolling transformation.

Declared at: llvm/include/llvm/Analysis/TargetTransformInfo.h:418

Member Variables

public unsigned int Threshold
The cost threshold for the unrolled loop. Should be relative to the getUserCost values returned by this API, and the expectation is that the unrolled loop's instructions when run through that interface should not exceed this cost. However, this is only an estimate. Also, specific loops may be unrolled even with a cost above this threshold if deemed profitable. Set this to UINT_MAX to disable the loop body cost restriction.
public unsigned int MaxPercentThresholdBoost
If complete unrolling will reduce the cost of the loop, we will boost the Threshold by a certain percent to allow more aggressive complete unrolling. This value provides the maximum boost percentage that we can apply to Threshold (The value should be no less than 100). BoostedThreshold = Threshold * min(RolledCost / UnrolledCost, MaxPercentThresholdBoost / 100) E.g. if complete unrolling reduces the loop execution time by 50% then we boost the threshold by the factor of 2x. If unrolling is not expected to reduce the running time, then we do not increase the threshold.
public unsigned int OptSizeThreshold
The cost threshold for the unrolled loop when optimizing for size (set to UINT_MAX to disable).
public unsigned int PartialThreshold
The cost threshold for the unrolled loop, like Threshold, but used for partial/runtime unrolling (set to UINT_MAX to disable).
public unsigned int PartialOptSizeThreshold
The cost threshold for the unrolled loop when optimizing for size, like OptSizeThreshold, but used for partial/runtime unrolling (set to UINT_MAX to disable).
public unsigned int Count
A forced unrolling factor (the number of concatenated bodies of the original loop in the unrolled loop body). When set to 0, the unrolling transformation will select an unrolling factor based on the current cost threshold and other factors.
public unsigned int PeelCount
A forced peeling factor (the number of bodied of the original loop that should be peeled off before the loop body). When set to 0, the unrolling transformation will select a peeling factor based on profile information and other factors.
public unsigned int DefaultUnrollRuntimeCount
Default unroll count for loops with run-time trip count.
public unsigned int MaxCount
public unsigned int FullUnrollMaxCount
Set the maximum unrolling factor for full unrolling. Like MaxCount, but applies even if full unrolling is selected. This allows a target to fall back to Partial unrolling if full unrolling is above FullUnrollMaxCount.
public unsigned int BEInsns
public bool Partial
Allow partial unrolling (unrolling of loops to expand the size of the loop body, not only to eliminate small constant-trip-count loops).
public bool Runtime
Allow runtime unrolling (unrolling of loops to expand the size of the loop body even when the number of loop iterations is not known at compile time).
public bool AllowRemainder
Allow generation of a loop remainder (extra iterations after unroll).
public bool AllowExpensiveTripCount
Allow emitting expensive instructions (such as divisions) when computing the trip count of a loop for runtime unrolling.
public bool Force
Apply loop unroll on any kind of loop (mainly to loops that fail runtime unrolling).
public bool UpperBound
Allow using trip count upper bound to unroll loops.
public bool AllowPeeling
Allow peeling off loop iterations.
public bool UnrollRemainder
Allow unrolling of all the iterations of the runtime loop remainder.
public bool UnrollAndJam
Allow unroll and jam. Used to enable unroll and jam for the target.
public bool PeelProfiledIterations
Allow peeling basing on profile. Uses to enable peeling off all iterations basing on provided profile. If the value is true the peeling cost model can decide to peel only some iterations and in this case it will set this to false.
public unsigned int UnrollAndJamInnerLoopThreshold
Threshold for unroll and jam, for inner loop size. The 'Threshold' value above is used during unroll and jam for the outer loop size. This value is used in the same manner to limit the size of the inner loop.