1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 21:13:02 +02:00
llvm-mirror/lib/Transforms
Haicheng Wu 5b13afc1d2 Reapply "[LoopUnroll] Use the upper bound of the loop trip count to fullly unroll a loop"
Reappy r284044 after revert in r284051. Krzysztof fixed the error in r284049.

The original summary:

This patch tries to fully unroll loops having break statement like this

for (int i = 0; i < 8; i++) {
    if (a[i] == value) {
        found = true;
        break;
    }
}

GCC can fully unroll such loops, but currently LLVM cannot because LLVM only
supports loops having exact constant trip counts.

The upper bound of the trip count can be obtained from calling
ScalarEvolution::getMaxBackedgeTakenCount(). Part of the patch is the
refactoring work in SCEV to prevent duplicating code.

The feature of using the upper bound is enabled under the same circumstance
when runtime unrolling is enabled since both are used to unroll loops without
knowing the exact constant trip count.

llvm-svn: 284053
2016-10-12 21:29:38 +00:00
..
Coroutines [coroutines] Store an address of destroy OR cleanup part in the coroutine frame. 2016-10-08 00:22:50 +00:00
Hello
InstCombine [InstCombine] Fix constexpr issue in select combining 2016-10-12 10:20:15 +00:00
Instrumentation [sanitizer-coverage] use private linkage for coverage guards, delete old commented-out code. 2016-10-11 19:36:50 +00:00
IPO Turn cl::values() (for enum) from a vararg function to using C++ variadic template 2016-10-08 19:41:06 +00:00
ObjCARC Use StringRef in ARCRuntimeEntryPoints APIs (NFC) 2016-10-05 01:15:04 +00:00
Scalar Reapply "[LoopUnroll] Use the upper bound of the loop trip count to fullly unroll a loop" 2016-10-12 21:29:38 +00:00
Utils Reapply "[LoopUnroll] Use the upper bound of the loop trip count to fullly unroll a loop" 2016-10-12 21:29:38 +00:00
Vectorize [LV] Don't mark multi-use branch conditions uniform 2016-10-07 15:20:13 +00:00
CMakeLists.txt
LLVMBuild.txt