9 #ifndef LLVM_TRANSFORMS_SCALAR_LOOPUNROLLPASS_H 10 #define LLVM_TRANSFORMS_SCALAR_LOOPUNROLLPASS_H 32 const bool OnlyWhenForced;
37 const bool ForgetSCEV;
41 bool ForgetSCEV =
false)
42 : OptLevel(OptLevel), OnlyWhenForced(OnlyWhenForced),
43 ForgetSCEV(ForgetSCEV) {}
81 bool ForgetSCEV =
false)
82 : OptLevel(OptLevel), OnlyWhenForced(OnlyWhenForced),
83 ForgetSCEV(ForgetSCEV) {}
88 AllowPartial = Partial;
94 AllowRuntime = Runtime;
100 AllowPeeling = Peeling;
107 AllowUpperBound = UpperBound;
119 AllowProfileBasedPeeling =
O;
125 FullUnrollMaxCount =
O;
140 : UnrollOpts(UnrollOpts) {}
147 #endif // LLVM_TRANSFORMS_SCALAR_LOOPUNROLLPASS_H A set of parameters used to control various transforms performed by the LoopUnroll pass...
This class represents lattice values for constants.
bool OnlyWhenForced
If false, use a cost model to determine whether unrolling of a loop is profitable.
cl::opt< bool > ForgetSCEVInLoopUnroll
LoopUnrollOptions & setFullUnrollMaxCount(unsigned O)
LoopUnrollOptions & setUpperBound(bool UpperBound)
Enables or disables the use of trip count upper bound in loop unrolling.
The adaptor from a function pass to a loop pass computes these analyses and makes them available to t...
Loop unroll pass that only does full loop unrolling.
Loop unroll pass that will support both full and partial unrolling.
Optional< bool > AllowProfileBasedPeeling
Optional< bool > AllowPeeling
A CRTP mix-in to automatically provide informational APIs needed for passes.
This header provides classes for managing per-loop analyses.
LoopUnrollOptions & setPartial(bool Partial)
Enables or disables partial unrolling.
LoopUnrollOptions(int OptLevel=2, bool OnlyWhenForced=false, bool ForgetSCEV=false)
LoopUnrollPass(LoopUnrollOptions UnrollOpts={})
This uses the target information (or flags) to control the thresholds for different unrolling stategi...
A set of analyses that are preserved following a run of a transformation pass.
const bool ForgetSCEV
If true, forget all loops when unrolling.
PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM, LoopStandardAnalysisResults &AR, LPMUpdater &U)
LoopUnrollOptions & setProfileBasedPeeling(int O)
LoopUnrollOptions & setOptLevel(int O)
This class provides an interface for updating the loop pass manager based on mutations to the loop ne...
LoopFullUnrollPass(int OptLevel=2, bool OnlyWhenForced=false, bool ForgetSCEV=false)
Optional< bool > AllowPartial
Optional< bool > AllowUpperBound
LoopUnrollOptions & setRuntime(bool Runtime)
Enables or disables unrolling of loops with runtime trip count.
Represents a single loop in the control flow graph.
A container for analyses that lazily runs them and caches their results.
Optional< bool > AllowRuntime
This header defines various interfaces for pass management in LLVM.
Optional< unsigned > FullUnrollMaxCount
LoopUnrollOptions & setPeeling(bool Peeling)
Enables or disables loop peeling.