Reimplement heuristic for estimating complete-unroll optimization effects.
authorMichael Zolotukhin <mzolotukhin@apple.com>
Tue, 12 May 2015 17:20:03 +0000 (17:20 +0000)
committerMichael Zolotukhin <mzolotukhin@apple.com>
Tue, 12 May 2015 17:20:03 +0000 (17:20 +0000)
commite2d9012a385fb0525c8499ac39af4df0240580db
tree16b84d49cb35ad724582d7068dfa74a545a9c217
parent2c3514ae0dbd6389939f9861b2f30382c8164711
Reimplement heuristic for estimating complete-unroll optimization effects.

Summary:
This patch reimplements heuristic that tries to estimate optimization beneftis
from complete loop unrolling.

In this patch I kept the minimal changes - e.g. I removed code handling
branches and folding compares. That's a promising area, but now there
are too many questions to discuss before we can enable it.

Test Plan: Tests are included in the patch.

Reviewers: hfinkel, chandlerc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237156 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopUnrollPass.cpp
test/Transforms/LoopUnroll/full-unroll-bad-geps.ll [new file with mode: 0644]
test/Transforms/LoopUnroll/full-unroll-heuristics.ll