[llvm-branch-commits] [llvm-branch] r100194 - in /llvm/branches/Apple/Morbo: lib/Transforms/Scalar/IndVarSimplify.cpp test/Transforms/IndVarSimplify/dangling-use.ll
Dan Gohman
gohman at apple.com
Fri Apr 2 11:07:22 PDT 2010
Author: djg
Date: Fri Apr 2 13:07:22 2010
New Revision: 100194
URL: http://llvm.org/viewvc/llvm-project?rev=100194&view=rev
Log:
$ svn merge -c 100186 https://djg@llvm.org/svn/llvm-project/llvm/trunk
A test/Transforms/IndVarSimplify/dangling-use.ll
U lib/Transforms/Scalar/IndVarSimplify.cpp
Added:
llvm/branches/Apple/Morbo/test/Transforms/IndVarSimplify/dangling-use.ll
- copied unchanged from r100186, llvm/trunk/test/Transforms/IndVarSimplify/dangling-use.ll
Modified:
llvm/branches/Apple/Morbo/lib/Transforms/Scalar/IndVarSimplify.cpp
Modified: llvm/branches/Apple/Morbo/lib/Transforms/Scalar/IndVarSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=100194&r1=100193&r2=100194&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/Transforms/Scalar/IndVarSimplify.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/Transforms/Scalar/IndVarSimplify.cpp Fri Apr 2 13:07:22 2010
@@ -506,6 +506,13 @@
// Now expand it into actual Instructions and patch it into place.
Value *NewVal = Rewriter.expandCodeFor(AR, UseTy, InsertPt);
+ // Inform ScalarEvolution that this value is changing. The change doesn't
+ // affect its value, but it does potentially affect which use lists the
+ // value will be on after the replacement, which affects ScalarEvolution's
+ // ability to walk use lists and drop dangling pointers when a value is
+ // deleted.
+ SE->forgetValue(User);
+
// Patch the new value into place.
if (Op->hasName())
NewVal->takeName(Op);
More information about the llvm-branch-commits
mailing list