Change SCEVExpander's expandCodeFor to provide more flexibility
authorDan Gohman <gohman@apple.com>
Thu, 23 Apr 2009 15:16:49 +0000 (15:16 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 23 Apr 2009 15:16:49 +0000 (15:16 +0000)
commit752ec7da506f5d41c08bd37e195750b57550ce68
tree29c9aa4f22339fc36ee937332eb664934ada172a
parentb1f321b5539a7f14864c0dc7ed44176785c62d14
Change SCEVExpander's expandCodeFor to provide more flexibility
with the persistent insertion point, and change IndVars to make
use of it. This fixes a bug where IndVars was holding on to a
stale insertion point and forcing the SCEVExpander to continue to
use it.

This fixes PR4038.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69892 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/ScalarEvolutionExpander.h
lib/Analysis/ScalarEvolutionExpander.cpp
lib/Transforms/Scalar/IndVarSimplify.cpp
test/Transforms/IndVarSimplify/casted-argument.ll