[llvm] r311915 - [LoopUnroll] Add a cl::opt to force peeling, for testing purposes.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 28 12:50:55 PDT 2017
Author: davide
Date: Mon Aug 28 12:50:55 2017
New Revision: 311915
URL: http://llvm.org/viewvc/llvm-project?rev=311915&view=rev
Log:
[LoopUnroll] Add a cl::opt to force peeling, for testing purposes.
Will be used to test the patch proposed in D37153.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp?rev=311915&r1=311914&r2=311915&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp Mon Aug 28 12:50:55 2017
@@ -80,6 +80,10 @@ static cl::opt<unsigned> UnrollFullMaxCo
cl::desc(
"Set the max unroll count for full unrolling, for testing purposes"));
+static cl::opt<unsigned> UnrollPeelCount(
+ "unroll-peel-count", cl::Hidden,
+ cl::desc("Set the unroll peeling count, for testing purposes"));
+
static cl::opt<bool>
UnrollAllowPartial("unroll-allow-partial", cl::Hidden,
cl::desc("Allows loops to be partially unrolled until "
@@ -183,6 +187,8 @@ static TargetTransformInfo::UnrollingPre
UP.MaxCount = UnrollMaxCount;
if (UnrollFullMaxCount.getNumOccurrences() > 0)
UP.FullUnrollMaxCount = UnrollFullMaxCount;
+ if (UnrollPeelCount.getNumOccurrences() > 0)
+ UP.PeelCount = UnrollPeelCount;
if (UnrollAllowPartial.getNumOccurrences() > 0)
UP.Partial = UnrollAllowPartial;
if (UnrollAllowRemainder.getNumOccurrences() > 0)
More information about the llvm-commits
mailing list