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) {}
140 : UnrollOpts(UnrollOpts) {}
144 function_ref<StringRef(StringRef)> MapClassName2PassName);
This header defines various interfaces for pass management in LLVM.
This header provides classes for managing per-loop analyses.
A container for analyses that lazily runs them and caches their results.
This class provides an interface for updating the loop pass manager based on mutations to the loop ne...
Loop unroll pass that only does full loop unrolling and peeling.
LoopFullUnrollPass(int OptLevel=2, bool OnlyWhenForced=false, bool ForgetSCEV=false)
PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM, LoopStandardAnalysisResults &AR, LPMUpdater &U)
Loop unroll pass that will support both full and partial unrolling.
LoopUnrollPass(LoopUnrollOptions UnrollOpts={})
This uses the target information (or flags) to control the thresholds for different unrolling stategi...
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
void printPipeline(raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
Represents a single loop in the control flow graph.
A set of analyses that are preserved following a run of a transformation pass.
This is an optimization pass for GlobalISel generic memory operations.
@ Runtime
Detect stack use after return if not disabled runtime with (ASAN_OPTIONS=detect_stack_use_after_retur...
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.
cl::opt< bool > ForgetSCEVInLoopUnroll
The adaptor from a function pass to a loop pass computes these analyses and makes them available to t...
A set of parameters used to control various transforms performed by the LoopUnroll pass.
LoopUnrollOptions & setPeeling(bool Peeling)
Enables or disables loop peeling.
bool OnlyWhenForced
If false, use a cost model to determine whether unrolling of a loop is profitable.
LoopUnrollOptions & setOptLevel(int O)
const bool ForgetSCEV
If true, forget all loops when unrolling.
std::optional< unsigned > FullUnrollMaxCount
std::optional< bool > AllowPartial
std::optional< bool > AllowRuntime
LoopUnrollOptions(int OptLevel=2, bool OnlyWhenForced=false, bool ForgetSCEV=false)
LoopUnrollOptions & setPartial(bool Partial)
Enables or disables partial unrolling.
std::optional< bool > AllowProfileBasedPeeling
std::optional< bool > AllowPeeling
LoopUnrollOptions & setFullUnrollMaxCount(unsigned O)
LoopUnrollOptions & setUpperBound(bool UpperBound)
Enables or disables the use of trip count upper bound in loop unrolling.
std::optional< bool > AllowUpperBound
LoopUnrollOptions & setRuntime(bool Runtime)
Enables or disables unrolling of loops with runtime trip count.
LoopUnrollOptions & setProfileBasedPeeling(int O)
A CRTP mix-in to automatically provide informational APIs needed for passes.