Make the code that updates ScalarEvolution's internal state in response

to a loop deletion more thorough. Don't prune the def-use tree search at
instructions that don't have SCEVs computed, because an instruction with
a user that has a computed SCEV may itself lack a computed SCEV.  Also,
remove loop-related values from the ValuesAtScopes and
ConstantEvolutionLoopExitValues maps as well.

This fixes a regression in 483.xalancbmk.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75030 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2009-07-08 19:23:34 +00:00
parent 85ebb0f66c
commit 59ae6b9987
2 changed files with 70 additions and 35 deletions

View File

@@ -346,11 +346,6 @@ namespace llvm {
Constant *getConstantEvolutionLoopExitValue(PHINode *PN, const APInt& BEs,
const Loop *L);
/// forgetLoopPHIs - Delete the memoized SCEVs associated with the
/// PHI nodes in the given loop. This is used when the trip count of
/// the loop may have changed.
void forgetLoopPHIs(const Loop *L);
public:
static char ID; // Pass identification, replacement for typeid
ScalarEvolution();