LLVM  10.0.0svn
Public Member Functions | Public Attributes | List of all members
llvm::LoopUnrollOptions Struct Reference

A set of parameters used to control various transforms performed by the LoopUnroll pass. More...

#include "llvm/Transforms/Scalar/LoopUnrollPass.h"

Collaboration diagram for llvm::LoopUnrollOptions:
Collaboration graph
[legend]

Public Member Functions

 LoopUnrollOptions (int OptLevel=2, bool OnlyWhenForced=false, bool ForgetSCEV=false)
 
LoopUnrollOptionssetPartial (bool Partial)
 Enables or disables partial unrolling. More...
 
LoopUnrollOptionssetRuntime (bool Runtime)
 Enables or disables unrolling of loops with runtime trip count. More...
 
LoopUnrollOptionssetPeeling (bool Peeling)
 Enables or disables loop peeling. More...
 
LoopUnrollOptionssetUpperBound (bool UpperBound)
 Enables or disables the use of trip count upper bound in loop unrolling. More...
 
LoopUnrollOptionssetOptLevel (int O)
 
LoopUnrollOptionssetProfileBasedPeeling (int O)
 
LoopUnrollOptionssetFullUnrollMaxCount (unsigned O)
 

Public Attributes

Optional< boolAllowPartial
 
Optional< boolAllowPeeling
 
Optional< boolAllowRuntime
 
Optional< boolAllowUpperBound
 
Optional< boolAllowProfileBasedPeeling
 
Optional< unsignedFullUnrollMaxCount
 
int OptLevel
 
bool OnlyWhenForced
 If false, use a cost model to determine whether unrolling of a loop is profitable. More...
 
const bool ForgetSCEV
 If true, forget all loops when unrolling. More...
 

Detailed Description

A set of parameters used to control various transforms performed by the LoopUnroll pass.

Each of the boolean parameters can be set to: true - enabling the transformation. false - disabling the transformation. None - relying on a global default.

There is also OptLevel parameter, which is used for additional loop unroll tuning.

Intended use is to create a default object, modify parameters with additional setters and then pass it to LoopUnrollPass.

Definition at line 60 of file LoopUnrollPass.h.

Constructor & Destructor Documentation

◆ LoopUnrollOptions()

llvm::LoopUnrollOptions::LoopUnrollOptions ( int  OptLevel = 2,
bool  OnlyWhenForced = false,
bool  ForgetSCEV = false 
)
inline

Definition at line 79 of file LoopUnrollPass.h.

Member Function Documentation

◆ setFullUnrollMaxCount()

LoopUnrollOptions& llvm::LoopUnrollOptions::setFullUnrollMaxCount ( unsigned  O)
inline

Definition at line 123 of file LoopUnrollPass.h.

References llvm::RISCVFenceField::O.

Referenced by checkParametrizedPassName().

◆ setOptLevel()

LoopUnrollOptions& llvm::LoopUnrollOptions::setOptLevel ( int  O)
inline

Definition at line 111 of file LoopUnrollPass.h.

References llvm::RISCVFenceField::O.

Referenced by checkParametrizedPassName().

◆ setPartial()

LoopUnrollOptions& llvm::LoopUnrollOptions::setPartial ( bool  Partial)
inline

Enables or disables partial unrolling.

When disabled only full unrolling is allowed.

Definition at line 86 of file LoopUnrollPass.h.

Referenced by checkParametrizedPassName().

◆ setPeeling()

LoopUnrollOptions& llvm::LoopUnrollOptions::setPeeling ( bool  Peeling)
inline

Enables or disables loop peeling.

Definition at line 98 of file LoopUnrollPass.h.

Referenced by checkParametrizedPassName().

◆ setProfileBasedPeeling()

LoopUnrollOptions& llvm::LoopUnrollOptions::setProfileBasedPeeling ( int  O)
inline

Definition at line 117 of file LoopUnrollPass.h.

References llvm::RISCVFenceField::O.

Referenced by checkParametrizedPassName().

◆ setRuntime()

LoopUnrollOptions& llvm::LoopUnrollOptions::setRuntime ( bool  Runtime)
inline

Enables or disables unrolling of loops with runtime trip count.

Definition at line 92 of file LoopUnrollPass.h.

Referenced by checkParametrizedPassName().

◆ setUpperBound()

LoopUnrollOptions& llvm::LoopUnrollOptions::setUpperBound ( bool  UpperBound)
inline

Enables or disables the use of trip count upper bound in loop unrolling.

Definition at line 105 of file LoopUnrollPass.h.

Referenced by checkParametrizedPassName().

Member Data Documentation

◆ AllowPartial

Optional<bool> llvm::LoopUnrollOptions::AllowPartial

Definition at line 61 of file LoopUnrollPass.h.

◆ AllowPeeling

Optional<bool> llvm::LoopUnrollOptions::AllowPeeling

Definition at line 62 of file LoopUnrollPass.h.

◆ AllowProfileBasedPeeling

Optional<bool> llvm::LoopUnrollOptions::AllowProfileBasedPeeling

Definition at line 65 of file LoopUnrollPass.h.

◆ AllowRuntime

Optional<bool> llvm::LoopUnrollOptions::AllowRuntime

Definition at line 63 of file LoopUnrollPass.h.

◆ AllowUpperBound

Optional<bool> llvm::LoopUnrollOptions::AllowUpperBound

Definition at line 64 of file LoopUnrollPass.h.

◆ ForgetSCEV

const bool llvm::LoopUnrollOptions::ForgetSCEV

If true, forget all loops when unrolling.

If false, forget top-most loop of the currently processed loops, which removes one entry at a time from the internal SCEV records. For large loops, the former is faster.

Definition at line 77 of file LoopUnrollPass.h.

◆ FullUnrollMaxCount

Optional<unsigned> llvm::LoopUnrollOptions::FullUnrollMaxCount

Definition at line 66 of file LoopUnrollPass.h.

◆ OnlyWhenForced

bool llvm::LoopUnrollOptions::OnlyWhenForced

If false, use a cost model to determine whether unrolling of a loop is profitable.

If true, only loops that explicitly request unrolling via metadata are considered. All other loops are skipped.

Definition at line 72 of file LoopUnrollPass.h.

◆ OptLevel

int llvm::LoopUnrollOptions::OptLevel

Definition at line 67 of file LoopUnrollPass.h.


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