LLVM  6.0.0svn
Public Attributes | List of all members
llvm::TargetTransformInfo::UnrollingPreferences Struct Reference

Parameters that control the generic loop unrolling transformation. More...

#include "llvm/Analysis/TargetTransformInfo.h"

Collaboration diagram for llvm::TargetTransformInfo::UnrollingPreferences:
Collaboration graph
[legend]

Public Attributes

unsigned Threshold
 The cost threshold for the unrolled loop. More...
 
unsigned 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. More...
 
unsigned OptSizeThreshold
 The cost threshold for the unrolled loop when optimizing for size (set to UINT_MAX to disable). More...
 
unsigned PartialThreshold
 The cost threshold for the unrolled loop, like Threshold, but used for partial/runtime unrolling (set to UINT_MAX to disable). More...
 
unsigned 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). More...
 
unsigned Count
 A forced unrolling factor (the number of concatenated bodies of the original loop in the unrolled loop body). More...
 
unsigned PeelCount
 A forced peeling factor (the number of bodied of the original loop that should be peeled off before the loop body). More...
 
unsigned DefaultUnrollRuntimeCount
 Default unroll count for loops with run-time trip count. More...
 
unsigned MaxCount
 
unsigned FullUnrollMaxCount
 Set the maximum unrolling factor for full unrolling. More...
 
unsigned BEInsns
 
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). More...
 
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). More...
 
bool AllowRemainder
 Allow generation of a loop remainder (extra iterations after unroll). More...
 
bool AllowExpensiveTripCount
 Allow emitting expensive instructions (such as divisions) when computing the trip count of a loop for runtime unrolling. More...
 
bool Force
 Apply loop unroll on any kind of loop (mainly to loops that fail runtime unrolling). More...
 
bool UpperBound
 Allow using trip count upper bound to unroll loops. More...
 
bool AllowPeeling
 Allow peeling off loop iterations for loops with low dynamic tripcount. More...
 
bool UnrollRemainder
 Allow unrolling of all the iterations of the runtime loop remainder. More...
 

Detailed Description

Parameters that control the generic loop unrolling transformation.

Definition at line 348 of file TargetTransformInfo.h.

Member Data Documentation

◆ AllowExpensiveTripCount

bool llvm::TargetTransformInfo::UnrollingPreferences::AllowExpensiveTripCount

Allow emitting expensive instructions (such as divisions) when computing the trip count of a loop for runtime unrolling.

Definition at line 415 of file TargetTransformInfo.h.

Referenced by computeUnrollCount(), gatherUnrollingPreferences(), llvm::SystemZTTIImpl::getUnrollingPreferences(), llvm::PPCTTIImpl::getUnrollingPreferences(), and tryToUnrollLoop().

◆ AllowPeeling

bool llvm::TargetTransformInfo::UnrollingPreferences::AllowPeeling

Allow peeling off loop iterations for loops with low dynamic tripcount.

Definition at line 422 of file TargetTransformInfo.h.

Referenced by llvm::computePeelCount(), and gatherUnrollingPreferences().

◆ AllowRemainder

bool llvm::TargetTransformInfo::UnrollingPreferences::AllowRemainder

Allow generation of a loop remainder (extra iterations after unroll).

Definition at line 412 of file TargetTransformInfo.h.

Referenced by computeUnrollCount(), gatherUnrollingPreferences(), and tryToUnrollLoop().

◆ BEInsns

unsigned llvm::TargetTransformInfo::UnrollingPreferences::BEInsns

◆ Count

unsigned llvm::TargetTransformInfo::UnrollingPreferences::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.

Definition at line 382 of file TargetTransformInfo.h.

Referenced by computeUnrollCount(), gatherUnrollingPreferences(), getUnrolledLoopSize(), and tryToUnrollLoop().

◆ DefaultUnrollRuntimeCount

unsigned llvm::TargetTransformInfo::UnrollingPreferences::DefaultUnrollRuntimeCount

Default unroll count for loops with run-time trip count.

Definition at line 389 of file TargetTransformInfo.h.

Referenced by computeUnrollCount(), gatherUnrollingPreferences(), llvm::SystemZTTIImpl::getUnrollingPreferences(), and llvm::ARMTTIImpl::getUnrollingPreferences().

◆ Force

bool llvm::TargetTransformInfo::UnrollingPreferences::Force

Apply loop unroll on any kind of loop (mainly to loops that fail runtime unrolling).

Definition at line 418 of file TargetTransformInfo.h.

Referenced by computeUnrollCount(), gatherUnrollingPreferences(), llvm::SystemZTTIImpl::getUnrollingPreferences(), llvm::ARMTTIImpl::getUnrollingPreferences(), and tryToUnrollLoop().

◆ FullUnrollMaxCount

unsigned llvm::TargetTransformInfo::UnrollingPreferences::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.

Definition at line 398 of file TargetTransformInfo.h.

Referenced by computeUnrollCount(), gatherUnrollingPreferences(), and llvm::SystemZTTIImpl::getUnrollingPreferences().

◆ MaxCount

unsigned llvm::TargetTransformInfo::UnrollingPreferences::MaxCount

◆ MaxPercentThresholdBoost

unsigned llvm::TargetTransformInfo::UnrollingPreferences::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.

Definition at line 367 of file TargetTransformInfo.h.

Referenced by computeUnrollCount(), and gatherUnrollingPreferences().

◆ OptSizeThreshold

unsigned llvm::TargetTransformInfo::UnrollingPreferences::OptSizeThreshold

The cost threshold for the unrolled loop when optimizing for size (set to UINT_MAX to disable).

Definition at line 370 of file TargetTransformInfo.h.

Referenced by gatherUnrollingPreferences(), llvm::ARMTTIImpl::getUnrollingPreferences(), and llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getUnrollingPreferences().

◆ Partial

bool llvm::TargetTransformInfo::UnrollingPreferences::Partial

◆ PartialOptSizeThreshold

unsigned llvm::TargetTransformInfo::UnrollingPreferences::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).

Definition at line 377 of file TargetTransformInfo.h.

Referenced by gatherUnrollingPreferences(), llvm::AArch64TTIImpl::getUnrollingPreferences(), llvm::ARMTTIImpl::getUnrollingPreferences(), and llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getUnrollingPreferences().

◆ PartialThreshold

unsigned llvm::TargetTransformInfo::UnrollingPreferences::PartialThreshold

◆ PeelCount

unsigned llvm::TargetTransformInfo::UnrollingPreferences::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.

Definition at line 387 of file TargetTransformInfo.h.

Referenced by llvm::computePeelCount(), computeUnrollCount(), gatherUnrollingPreferences(), and tryToUnrollLoop().

◆ Runtime

bool llvm::TargetTransformInfo::UnrollingPreferences::Runtime

◆ Threshold

unsigned llvm::TargetTransformInfo::UnrollingPreferences::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.

Definition at line 356 of file TargetTransformInfo.h.

Referenced by llvm::computePeelCount(), computeUnrollCount(), gatherUnrollingPreferences(), llvm::NVPTXTTIImpl::getUnrollingPreferences(), llvm::AMDGPUTTIImpl::getUnrollingPreferences(), and tryToUnrollLoop().

◆ UnrollRemainder

bool llvm::TargetTransformInfo::UnrollingPreferences::UnrollRemainder

Allow unrolling of all the iterations of the runtime loop remainder.

Definition at line 424 of file TargetTransformInfo.h.

Referenced by gatherUnrollingPreferences(), llvm::ARMTTIImpl::getUnrollingPreferences(), and tryToUnrollLoop().

◆ UpperBound

bool llvm::TargetTransformInfo::UnrollingPreferences::UpperBound

Allow using trip count upper bound to unroll loops.

Definition at line 420 of file TargetTransformInfo.h.

Referenced by computeUnrollCount(), gatherUnrollingPreferences(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getUnrollingPreferences(), and tryToUnrollLoop().


The documentation for this struct was generated from the following file: