[Peeling] Extend the scope of peeling a bit
authorSerguei Katkov <serguei.katkov@azul.com>
Wed, 3 Jun 2020 10:56:08 +0000 (17:56 +0700)
committerSerguei Katkov <serguei.katkov@azul.com>
Mon, 22 Jun 2020 05:17:44 +0000 (12:17 +0700)
commit29b2c1ca72096ca06415b5e626e6728c42ef1e74
treed11722d2cd004990b85c3a84373664c794a5f2ff
parentfa5d416efdcbdba766c0c9bd0797bd4b8bbe0273
[Peeling] Extend the scope of peeling a bit

Currently we allow peeling of the loops if there is a exiting latch block
and all other exits are blocks ending with deopt.

Actually we want that exit would end up with deopt unconditionally but
it is not required that exit itself ends with deopt.

Reviewers: reames, ashlykov, fhahn, apilipenko, fedor.sergeev
Reviewed By: apilipenko
Subscribers: hiraditya, zzheng, dantrushin, llvm-commits
Differential Revision: https://reviews.llvm.org/D81140
llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp
llvm/lib/Transforms/Utils/LoopUtils.cpp
llvm/test/Transforms/LoopUnroll/peel-loop-pgo-deopt-pd.ll [new file with mode: 0644]