diff options
Diffstat (limited to 'include/llvm/Transforms/Scalar/LoopUnrollPass.h')
-rw-r--r-- | include/llvm/Transforms/Scalar/LoopUnrollPass.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Scalar/LoopUnrollPass.h b/include/llvm/Transforms/Scalar/LoopUnrollPass.h index a84d889a83ad..afeb1f1da029 100644 --- a/include/llvm/Transforms/Scalar/LoopUnrollPass.h +++ b/include/llvm/Transforms/Scalar/LoopUnrollPass.h @@ -62,6 +62,8 @@ struct LoopUnrollOptions { Optional<bool> AllowPeeling; Optional<bool> AllowRuntime; Optional<bool> AllowUpperBound; + Optional<bool> AllowProfileBasedPeeling; + Optional<unsigned> FullUnrollMaxCount; int OptLevel; /// If false, use a cost model to determine whether unrolling of a loop is @@ -110,6 +112,18 @@ struct LoopUnrollOptions { OptLevel = O; return *this; } + + // Enables or disables loop peeling basing on profile. + LoopUnrollOptions &setProfileBasedPeeling(int O) { + AllowProfileBasedPeeling = O; + return *this; + } + + // Sets the max full unroll count. + LoopUnrollOptions &setFullUnrollMaxCount(unsigned O) { + FullUnrollMaxCount = O; + return *this; + } }; /// Loop unroll pass that will support both full and partial unrolling. |