]> granicus.if.org Git - llvm/commit
[RLEV] Rewrite loop exit values for multiple exit loops w/o overall loop exit count
authorPhilip Reames <listmail@philipreames.com>
Wed, 14 Aug 2019 18:27:57 +0000 (18:27 +0000)
committerPhilip Reames <listmail@philipreames.com>
Wed, 14 Aug 2019 18:27:57 +0000 (18:27 +0000)
commit4a1169edbda98cd733139be82909ed35cb8fd4e5
treeb6e4a73f31697025d22cf2094da2ec72989f7991
parent874a0a3b9d31e438555bf5a349ce743dd2ba492e
[RLEV] Rewrite loop exit values for multiple exit loops w/o overall loop exit count

We already supported rewriting loop exit values for multiple exit loops, but if any of the loop exits were not computable, we gave up on all loop exit values. This patch generalizes the existing code to handle individual computable loop exits where possible.

As discussed in the review, this is a starting point for figuring out a better API.  The code is a bit ugly, but getting it in lets us test as we go.

Differential Revision: https://reviews.llvm.org/D65544

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368898 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/IndVarSimplify.cpp
test/Transforms/IndVarSimplify/rlev-add-me.ll [new file with mode: 0644]
test/Transforms/LoopUnroll/scevunroll.ll