LoopIdiom: Replace custom dependence analysis with LoopDependenceAnalysis.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 21 Oct 2012 15:03:07 +0000 (15:03 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 21 Oct 2012 15:03:07 +0000 (15:03 +0000)
commit5c6e9ae14e012bfe1fdf0e19957922d3c4d85670
treee8a0f8e874ee1e924d23af4e0601267968409aec
parentbb950854acbb5966875763eaae7ab58e48e4f5a9
LoopIdiom: Replace custom dependence analysis with LoopDependenceAnalysis.

Requires a lot less code and complexity on loop-idiom's side and the more
precise analysis can catch more cases, like the one I included as a test case.
This also fixes the edge-case miscompilation from PR9481. I'm not entirely
sure that all cases are handled that the old checks handled but LDA will
certainly become smarter in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166390 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopIdiomRecognize.cpp
test/Transforms/LoopIdiom/multi-dimensional.ll [new file with mode: 0644]
test/Transforms/LoopIdiom/sideeffect.ll [new file with mode: 0644]