Use estimated number of optimized insns in unroll-threshold computation.
authorMichael Zolotukhin <mzolotukhin@apple.com>
Fri, 6 Feb 2015 20:20:40 +0000 (20:20 +0000)
committerMichael Zolotukhin <mzolotukhin@apple.com>
Fri, 6 Feb 2015 20:20:40 +0000 (20:20 +0000)
commit7af83c1f39e999a51e19ba7116c9046af18a078b
treee073ebf0960dec3b72c02e53182248922b1e7139
parent0ff23ec54428cb44f35ddb178843c7b7caada7e0
Use estimated number of optimized insns in unroll-threshold computation.

If complete-unroll could help us to optimize away N% of instructions, we
might want to do this even if the final size would exceed loop-unroll
threshold. However, we don't want to unroll huge loop, and we are add
AbsoluteThreshold to avoid that - this threshold will never be crossed,
even if we expect to optimize 99% instructions after that.

llvm-svn: 228434
llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp