OSDN Git Service

[LoopUnroll] By default disable unrolling when optimizing for size.
authorMichael Zolotukhin <mzolotukhin@apple.com>
Tue, 23 Aug 2016 23:13:15 +0000 (23:13 +0000)
committerMichael Zolotukhin <mzolotukhin@apple.com>
Tue, 23 Aug 2016 23:13:15 +0000 (23:13 +0000)
commit743335852835e9bb7453942d13f100dc176dc519
tree7c55d9661a2a10672cf027c1de308dec38f4453a
parent0f97be8885190dbf99e3de61cedde1150f3738dd
[LoopUnroll] By default disable unrolling when optimizing for size.

Summary:
In clang commit r268509 we started to invoke loop-unroll pass from the
driver even under -Os. However, we happen to not initialize optsize
thresholds properly, which si fixed with this change.

r268509 led to some big compile time regressions, because we started to
unroll some loops that we didn't unroll before. With this change I hope
to recover most of the regressions. We still are slightly slower than
before, because we do some checks here and there in loop-unrolling
before we bail out, but at least the slowdown is not that huge now.

Reviewers: hfinkel, chandlerc

Subscribers: mzolotukhin, llvm-commits

Differential Revision: https://reviews.llvm.org/D23388

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