]> granicus.if.org Git - llvm/commit
[Loop Peeling] Add support for peeling of loops with multiple exits
authorSerguei Katkov <serguei.katkov@azul.com>
Tue, 9 Jul 2019 06:07:25 +0000 (06:07 +0000)
committerSerguei Katkov <serguei.katkov@azul.com>
Tue, 9 Jul 2019 06:07:25 +0000 (06:07 +0000)
commita079d8ef8254fe18ddca5884446f84be5f338ea8
treeec481030be86ee3cb42f86f3530a91c8f857849a
parenta593b7070eb302cc446046797d87dab524be040b
[Loop Peeling] Add support for peeling of loops with multiple exits

This patch modifies the loop peeling transformation so that
it does not expect that there is only one loop exit from latch.

It modifies only transformation. Update of branch weights remains
only for exit from latch.

The motivation is that in follow-up patch I plan to enable loop peeling for
loops with multiple exits but only if other exits then from latch one goes to
block with call to deopt.

For now this patch is NFC.

Reviewers: reames, mkuper, iajbar, fhahn
Reviewed By: reames, fhahn
Subscribers: zzheng, llvm-commits
Differential Revision: https://reviews.llvm.org/D63921

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365441 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/LoopUnroll.cpp
lib/Transforms/Utils/LoopUnrollPeel.cpp