diff options
author | Dan Gohman <gohman@apple.com> | 2007-06-19 14:28:31 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2007-06-19 14:28:31 +0000 |
commit | 5cec4db6ae13a41d04d86f37e347fc5b5997c948 (patch) | |
tree | 55f0f79b71f67e1c6fb31777dd5c65e6b535ac84 /lib/Transforms/Scalar/IndVarSimplify.cpp | |
parent | b5bec2b6f6f4a4da96170d1c258ad424112ad2c5 (diff) |
Rename ScalarEvolution::deleteInstructionFromRecords to
deleteValueFromRecords and loosen the types to all it to accept
Value* instead of just Instruction*, since this is what
ScalarEvolution uses internally anyway. This allows more flexibility
for future uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37657 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/IndVarSimplify.cpp')
-rw-r--r-- | lib/Transforms/Scalar/IndVarSimplify.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 2558fe15d1..f0019052d8 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -115,7 +115,7 @@ DeleteTriviallyDeadInstructions(std::set<Instruction*> &Insts) { for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) if (Instruction *U = dyn_cast<Instruction>(I->getOperand(i))) Insts.insert(U); - SE->deleteInstructionFromRecords(I); + SE->deleteValueFromRecords(I); DOUT << "INDVARS: Deleting: " << *I; I->eraseFromParent(); Changed = true; @@ -181,7 +181,7 @@ void IndVarSimplify::EliminatePointerRecurrence(PHINode *PN, GetElementPtrInst *NGEPI = new GetElementPtrInst( NCE, Constant::getNullValue(Type::Int32Ty), NewAdd, GEPI->getName(), GEPI); - SE->deleteInstructionFromRecords(GEPI); + SE->deleteValueFromRecords(GEPI); GEPI->replaceAllUsesWith(NGEPI); GEPI->eraseFromParent(); GEPI = NGEPI; @@ -398,7 +398,7 @@ void IndVarSimplify::RewriteLoopExitValues(Loop *L) { // the PHI entirely. This is safe, because the NewVal won't be variant // in the loop, so we don't need an LCSSA phi node anymore. if (NumPreds == 1) { - SE->deleteInstructionFromRecords(PN); + SE->deleteValueFromRecords(PN); PN->replaceAllUsesWith(ExitVal); PN->eraseFromParent(); break; |