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)
commit3ae8bc68afb2ad1368ffdc780502b5812afc209b
treed1f6c3b075e45bff88ed7aa6a06d9e73880af9d5
parent2d1b1ad831289d002665c25cc7d88711e2fcf30a
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.

llvm-svn: 166390
llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
llvm/test/Transforms/LoopIdiom/multi-dimensional.ll [new file with mode: 0644]
llvm/test/Transforms/LoopIdiom/sideeffect.ll [new file with mode: 0644]