OSDN Git Service

[LoopUtils] Extend the scope of getLoopEstimatedTripCount
authorSerguei Katkov <serguei.katkov@azul.com>
Mon, 15 Jul 2019 06:42:39 +0000 (06:42 +0000)
committerSerguei Katkov <serguei.katkov@azul.com>
Mon, 15 Jul 2019 06:42:39 +0000 (06:42 +0000)
commitbefc83967b005360e7c2e183e80b4fc70967a7d3
tree53538843efdc64e0f1c8994a793965ba3b77baac
parent58c22470dd74b3adce339c33559415f5a9392e9e
[LoopUtils] Extend the scope of getLoopEstimatedTripCount

With this patch the getLoopEstimatedTripCount function will
accept also the loops where there are more than one exit but
all exits except latch block should ends up with a call to deopt.

This side exits should not impact the estimated trip count.

Reviewers: reames, mkuper, danielcdh
Reviewed By: reames
Subscribers: fhahn, lebedev.ri, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D64553

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