]> granicus.if.org Git - llvm/commit
[LoopUnrollRuntime] NFC: Refactored safety checks of unrolling multi-exit loop
authorAnna Thomas <anna@azul.com>
Wed, 12 Jul 2017 20:55:43 +0000 (20:55 +0000)
committerAnna Thomas <anna@azul.com>
Wed, 12 Jul 2017 20:55:43 +0000 (20:55 +0000)
commitc66d417e68033c9fa44cba53a3e5bfd88560fb21
tree81a61fd23b6a04a381885743fddf58b8e1686308
parent6805a5db4b1053e571c82731605e193ef3c0a1ff
[LoopUnrollRuntime] NFC: Refactored safety checks of unrolling multi-exit loop

Refactored the code and separated out a function
`canSafelyUnrollMultiExitLoop` to reduce redundant checks and make it
easier to add profitability heuristics later.
Added tests to runtime unrolling to make sure that unrolling for
multi-exit loops is not done unless the option
-unroll-runtime-multi-exit is true.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307843 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/LoopUnrollRuntime.cpp
test/Transforms/LoopUnroll/runtime-loop.ll