[Loop] Add isRotated method to Loop class.
authorKit Barton <kbarton@ca.ibm.com>
Tue, 3 Dec 2019 19:20:08 +0000 (14:20 -0500)
committerKit Barton <kbarton@ca.ibm.com>
Wed, 11 Dec 2019 14:43:10 +0000 (09:43 -0500)
commit942c9946cc2fba6acd3805cfeaca90007f532f1f
treea39f477b825274780c4c9368df1a9d8f00a3f296
parentdf494f7512b0ecebdf3d7be97695a1b6278c0336
[Loop] Add isRotated method to Loop class.

Summary:
This patch adds a method to determine if a loop is in rotated form (the latch is
an exiting block). It also modifies the getLoopGuardBranch method to use this
new method. This method can also be used in Loopfusion. Once this patch lands I
will make the corresponding changes there.

Reviewers: jdoerfert, Meinersbur, dmgreen, etiotto, Whitney, fhahn, hfinkel

Reviewed By: Meinersbur

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65958
llvm/include/llvm/Analysis/LoopInfo.h
llvm/lib/Analysis/LoopInfo.cpp
llvm/unittests/Analysis/LoopInfoTest.cpp