[LoopFlatten][LoopInfo] Use Loop to identify latch compare instruction
authorRosie Sumpter <rosie.sumpter@arm.com>
Thu, 15 Jul 2021 13:08:30 +0000 (14:08 +0100)
committerRosie Sumpter <rosie.sumpter@arm.com>
Wed, 21 Jul 2021 09:14:18 +0000 (10:14 +0100)
commit44c9adb414ad54d4ad3b95d7c774de6293fb4680
treefc76257add683ce420e62ec55d648572583f09b5
parent724f0e2abb0ce327d2e82af5a61be25e2d2014ec
[LoopFlatten][LoopInfo] Use Loop to identify latch compare instruction

Make getLatchCmpInst non-static and use it in LoopFlatten as a more
robust way of identifying the compare.

Differential Revision: https://reviews.llvm.org/D106256
llvm/include/llvm/Analysis/LoopInfo.h
llvm/lib/Analysis/LoopInfo.cpp
llvm/lib/Transforms/Scalar/LoopFlatten.cpp