aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/LoopUnrollAnalyzer.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-02-26[LoopUnrollAnalyzer] Check that we're using SCEV for the same loop we're ↵Michael Zolotukhin1-1/+1
simulating. Summary: Check that we're using SCEV for the same loop we're simulating. Otherwise, we might try to use the iteration number of the current loop in SCEV expressions for inner/outer loops IVs, which is clearly incorrect. Reviewers: chandlerc, hfinkel Subscribers: sanjoy, llvm-commits, mzolotukhin Differential Revision: http://reviews.llvm.org/D17632 llvm-svn: 261958
2016-02-08Factor out UnrollAnalyzer to Analysis, and add unit tests for it.Michael Zolotukhin1-0/+191
Summary: Unrolling Analyzer is already pretty complicated, and it becomes harder and harder to exercise it with usual IR tests, as with them we can only check the final decision: whether the loop is unrolled or not. This change factors this framework out from LoopUnrollPass to analyses, which allows to use unit tests. The change itself is supposed to be NFC, except adding a couple of tests. I plan to add more tests as I add new functionality and find/fix bugs. Reviewers: chandlerc, hfinkel, sanjoy Subscribers: zzheng, sanjoy, llvm-commits Differential Revision: http://reviews.llvm.org/D16623 llvm-svn: 260169