diff options
author | Sam Parker <sam.parker@arm.com> | 2018-11-29 08:34:22 +0000 |
---|---|---|
committer | Sam Parker <sam.parker@arm.com> | 2018-11-29 08:34:22 +0000 |
commit | d6ebf0108e6cc7bafeb9649dfea2f81e8f24e207 (patch) | |
tree | d2f1bee0ef97889c4ab3740e2ecc2fbe8007e4f0 /llvm/lib/Transforms | |
parent | 4e520107c1cbf40a1e91c00a9e51cc7611d8de7f (diff) | |
download | bcm5719-llvm-d6ebf0108e6cc7bafeb9649dfea2f81e8f24e207.tar.gz bcm5719-llvm-d6ebf0108e6cc7bafeb9649dfea2f81e8f24e207.zip |
[LoopStrengthReduce] ComplexityLimit as an option
Convert ComplexityLimit into a command line value.
Differential Revision: https://reviews.llvm.org/D54899
llvm-svn: 347843
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp index e9c24d61394..773ffb9df0a 100644 --- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -155,6 +155,11 @@ static cl::opt<bool> FilterSameScaledReg( cl::desc("Narrow LSR search space by filtering non-optimal formulae" " with the same ScaledReg and Scale")); +static cl::opt<unsigned> ComplexityLimit( + "lsr-complexity-limit", cl::Hidden, + cl::init(std::numeric_limits<uint16_t>::max()), + cl::desc("LSR search space complexity limit")); + #ifndef NDEBUG // Stress test IV chain generation. static cl::opt<bool> StressIVChain( @@ -4311,9 +4316,6 @@ void LSRInstance::FilterOutUndesirableDedicatedRegisters() { }); } -// This is a rough guess that seems to work fairly well. -static const size_t ComplexityLimit = std::numeric_limits<uint16_t>::max(); - /// Estimate the worst-case number of solutions the solver might have to /// consider. It almost never considers this many solutions because it prune the /// search space, but the pruning isn't always sufficient. |