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)
commitc9da41492fb9dcd03376fb7ce63f1e861bae7382
tree5fb06a29699eb2901774d2a002d92159fa5e0680
parent3da8e456754a3c79ce19bccc24361fea62391978
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228434 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/TargetTransformInfo.h
lib/Transforms/Scalar/LoopUnrollPass.cpp