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)
commit1f0dded057a77250c7122d89c29275c1c599127e
treeee76f3fc3ea04d573962b8f42682c36d4c2d2944
parentc280ff0e4756581cd548dae9a59862946522d18d
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.

llvm-svn: 223199
llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
llvm/test/Transforms/StructurizeCFG/one-loop-multiple-backedges.ll [new file with mode: 0644]