Fix SplitCriticalEdge to properly update LCSSA form when splitting a
authorDan Gohman <gohman@apple.com>
Wed, 9 Sep 2009 18:18:18 +0000 (18:18 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 9 Sep 2009 18:18:18 +0000 (18:18 +0000)
commitc292caf55c8f2794965542124d6571b5b59f0ba8
treefdb55f31b4dff8436810adfd8aa0c81fd6f061e8
parent17568251afb0cce65db9e99f594986e3e92debe1
Fix SplitCriticalEdge to properly update LCSSA form when splitting a
loop exit edge -- new PHIs may be needed not only for the additional
splits that are made to preserve LoopSimplify form, but also for the
original split. Factor out the code that inserts new PHIs so that it
can be used for both. Remove LoopRotation.cpp's code for manually
updating LCSSA form, as it is now redundant. This fixes PR4934.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81363 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopRotation.cpp
lib/Transforms/Utils/BreakCriticalEdges.cpp
test/Transforms/LoopUnswitch/preserve-analyses.ll