LLVM: llvm::LoopUnrollOptions Struct Reference (original) (raw)
A set of parameters used to control various transforms performed by the LoopUnroll pass. More...
#include "[llvm/Transforms/Scalar/LoopUnrollPass.h](LoopUnrollPass%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| LoopUnrollOptions (int OptLevel=2, bool OnlyWhenForced=false, bool ForgetSCEV=false) | |
| LoopUnrollOptions & | setPartial (bool Partial) |
| Enables or disables partial unrolling. | |
| LoopUnrollOptions & | setRuntime (bool Runtime) |
| Enables or disables unrolling of loops with runtime trip count. | |
| LoopUnrollOptions & | setPeeling (bool Peeling) |
| Enables or disables loop peeling. | |
| LoopUnrollOptions & | setUpperBound (bool UpperBound) |
| Enables or disables the use of trip count upper bound in loop unrolling. | |
| LoopUnrollOptions & | setOptLevel (int O) |
| LoopUnrollOptions & | setProfileBasedPeeling (int O) |
| LoopUnrollOptions & | setFullUnrollMaxCount (unsigned O) |
| Public Attributes | |
|---|---|
| std::optional< bool > | AllowPartial |
| std::optional< bool > | AllowPeeling |
| std::optional< bool > | AllowRuntime |
| std::optional< bool > | AllowUpperBound |
| std::optional< bool > | AllowProfileBasedPeeling |
| std::optional< unsigned > | FullUnrollMaxCount |
| int | OptLevel |
| bool | OnlyWhenForced |
| If false, use a cost model to determine whether unrolling of a loop is profitable. | |
| const bool | ForgetSCEV |
| If true, forget all loops when unrolling. |
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 61 of file LoopUnrollPass.h.
| llvm::LoopUnrollOptions::LoopUnrollOptions ( int OptLevel = 2, bool OnlyWhenForced = false, bool ForgetSCEV = false ) | inline |
|---|
◆ setFullUnrollMaxCount()
◆ setOptLevel()
◆ setPartial()
◆ setPeeling()
◆ setProfileBasedPeeling()
◆ setRuntime()
◆ setUpperBound()
◆ AllowPartial
std::optional<bool> llvm::LoopUnrollOptions::AllowPartial
◆ AllowPeeling
std::optional<bool> llvm::LoopUnrollOptions::AllowPeeling
◆ AllowProfileBasedPeeling
std::optional<bool> llvm::LoopUnrollOptions::AllowProfileBasedPeeling
◆ AllowRuntime
std::optional<bool> llvm::LoopUnrollOptions::AllowRuntime
◆ AllowUpperBound
std::optional<bool> llvm::LoopUnrollOptions::AllowUpperBound
◆ 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 78 of file LoopUnrollPass.h.
Referenced by LoopUnrollOptions().
◆ FullUnrollMaxCount
std::optional<unsigned> llvm::LoopUnrollOptions::FullUnrollMaxCount
◆ 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 73 of file LoopUnrollPass.h.
Referenced by LoopUnrollOptions().
◆ OptLevel
int llvm::LoopUnrollOptions::OptLevel
The documentation for this struct was generated from the following file:
- include/llvm/Transforms/Scalar/LoopUnrollPass.h