Instead of eagerly creating new SCEVs to replace all SCEVs that are
authorDan Gohman <gohman@apple.com>
Sat, 25 Jul 2009 01:13:03 +0000 (01:13 +0000)
committerDan Gohman <gohman@apple.com>
Sat, 25 Jul 2009 01:13:03 +0000 (01:13 +0000)
commitfef8bb24de86ff41d09a7787c6c52b058a853e39
tree699e693217641d09edb5786b18769ea616324d6d
parentb140f4907ca7fdd9c58b8f9e3a4bb49134c1cd27
Instead of eagerly creating new SCEVs to replace all SCEVs that are
affected after a PHI node has been analyzed, just remove affected
SCEVs from the Scalars map, so that they'll be (lazily) recreated as
needed. This avoids creating SCEV objects that aren't actually needed.

Also, rewrite the associated def-use walking code to be non-recursive
and to continue traversing past Instructions that don't have an
entry in the Scalars map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77032 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/ScalarEvolution.h
include/llvm/Analysis/ScalarEvolutionExpressions.h
lib/Analysis/ScalarEvolution.cpp