[LoopFlatten] Use Loop to identify loop induction phi. NFC
authorRosie Sumpter <rosie.sumpter@arm.com>
Thu, 15 Jul 2021 07:51:30 +0000 (08:51 +0100)
committerRosie Sumpter <rosie.sumpter@arm.com>
Mon, 19 Jul 2021 08:06:57 +0000 (09:06 +0100)
commit34d6820551c6ee7e76199407b3c1ba6fecf4398f
tree3cbe3297b51dcf3ec27d21ad644befca92c7428a
parentf91eaa7007877063b683f83c305fca750d746d83
[LoopFlatten] Use Loop to identify loop induction phi. NFC

Replace code which identifies induction phi with helper function
getInductionVariable to improve robustness.

Differential Revision: https://reviews.llvm.org/D106045
llvm/lib/Transforms/Scalar/LoopFlatten.cpp