[LoopInfo] Add verification by recomputation.
authorMichael Zolotukhin <mzolotukhin@apple.com>
Wed, 31 Aug 2016 19:26:19 +0000 (19:26 +0000)
committerMichael Zolotukhin <mzolotukhin@apple.com>
Wed, 31 Aug 2016 19:26:19 +0000 (19:26 +0000)
commite0b2d97b520b381f4002f1028f580defe1a31d9d
treeed81bc1bd60b8f571b53dd7c802949b624410b45
parent8d84605f25d91c63c2c9e2c8f42575da520f17a3
[LoopInfo] Add verification by recomputation.

Summary:
Current implementation of LI verifier isn't ideal and fails to detect
some cases when LI is incorrect. For instance, it checks that all
recorded loops are in a correct form, but it has no way to check if
there are no more other (unrecorded in LI) loops in the function. This
patch adds a way to detect such bugs.

Reviewers: chandlerc, sanjoy, hfinkel

Subscribers: llvm-commits, silvas, mzolotukhin

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

llvm-svn: 280280
llvm/include/llvm/Analysis/LoopInfo.h
llvm/include/llvm/Analysis/LoopInfoImpl.h
llvm/lib/Analysis/LoopInfo.cpp
llvm/lib/Transforms/Scalar/LoopDistribute.cpp