[PATCH] D28724: Use getLoopLatch in place of isLoopSimplifyForm
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 17 11:02:35 PST 2017
sanjoy added a comment.
In https://reviews.llvm.org/D28724#648408, @MatzeB wrote:
> You can just request a single analysis from opt without running any transformation. It should work similar to this `opt -mypass -debug-only=mypass input.ll` if you use DEBUG(dbgs() << ) statements, alternatively there is the -analyze flag to opt, which ends up calling MyAnalysisPass::print().
> There are number of tests in test/Analysis that work this way.
I think that makes sense when you're testing an analysis (e.g. does AA think these two pointers may alias or not?). Here the test is for an //API// that analyses and transformations uses, so to me it is more understandable to test it this way (since you're directly testing what you changed).
However, we could be better about encoding IR in a way that they're easily auto-upgraded, since IMO that's one of the drawbacks of writing unittests/.
More information about the llvm-commits