[LoopUnrollRuntime] Avoid high-cost trip count computation.
authorSanjoy Das <sanjoy@playingwithpointers.com>
Tue, 14 Apr 2015 03:20:38 +0000 (03:20 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Tue, 14 Apr 2015 03:20:38 +0000 (03:20 +0000)
commit888e8e3a663b0cacbf105a336dfb9cd620bd1b6f
tree9a11376765784a541c45a16f4451cb44d335ceb0
parent17e08f50b98302f1df41f79ae03b3288fd0f2a3a
[LoopUnrollRuntime] Avoid high-cost trip count computation.

Summary:
Runtime unrolling of loops needs to emit an expression to compute the
loop's runtime trip-count.  Avoid runtime unrolling if this computation
will be expensive.

Depends on D8993.

Reviewers: atrick

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D8994

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234846 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/TargetTransformInfo.h
include/llvm/Transforms/Utils/UnrollLoop.h
lib/Transforms/Scalar/LoopUnrollPass.cpp
lib/Transforms/Utils/LoopUnroll.cpp
lib/Transforms/Utils/LoopUnrollRuntime.cpp
test/Transforms/LoopUnroll/high-cost-trip-count-computation.ll [new file with mode: 0644]
test/Transforms/LoopUnroll/runtime-loop.ll
test/Transforms/LoopUnroll/runtime-loop4.ll