StructurizeCFG: Use LoopInfo analysis for better loop detection
authorTom Stellard <thomas.stellard@amd.com>
Wed, 3 Dec 2014 04:28:32 +0000 (04:28 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Wed, 3 Dec 2014 04:28:32 +0000 (04:28 +0000)
commit857550322c6fe679d17d35c885606ae1d8cf43b6
tree46f43811baf658c63322ccadb7eff53219a90bbc
parent2212800542f4f7b8fb30cfe8244e6c5e38e9bdd1
StructurizeCFG: Use LoopInfo analysis for better loop detection

We were assuming that each back-edge in a region represented a unique
loop, which is not always the case.  We need to use LoopInfo to
correctly determine which back-edges are loops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223199 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/StructurizeCFG.cpp
test/Transforms/StructurizeCFG/one-loop-multiple-backedges.ll [new file with mode: 0644]