Re-apply 70645, converting ScalarEvolution to use
authorDan Gohman <gohman@apple.com>
Mon, 4 May 2009 22:30:44 +0000 (22:30 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 4 May 2009 22:30:44 +0000 (22:30 +0000)
commit35738ac150afafe2359268d4b2169498c6c98c5f
treeac250e567776d377d07d242c1b9c94c2d04d6176
parentbf2176a00092540e18e8922487975cabefed8265
Re-apply 70645, converting ScalarEvolution to use
CallbackVH, with fixes. allUsesReplacedWith need to
walk the def-use chains and invalidate all users of a
value that is replaced. SCEVs of users need to be
recalcualted even if the new value is equivalent. Also,
make forgetLoopPHIs walk def-use chains, since any
SCEV that depends on a PHI should be recalculated when
more information about that PHI becomes available.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70927 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/ScalarEvolution.h
include/llvm/Transforms/Utils/BasicBlockUtils.h
include/llvm/Transforms/Utils/Local.h
lib/Analysis/ScalarEvolution.cpp
lib/Transforms/Scalar/IndVarSimplify.cpp
lib/Transforms/Scalar/LoopDeletion.cpp
lib/Transforms/Scalar/LoopStrengthReduce.cpp
lib/Transforms/Utils/BasicBlockUtils.cpp
lib/Transforms/Utils/Local.cpp