summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2007-06-19 14:28:31 +0000
committerDan Gohman <gohman@apple.com>2007-06-19 14:28:31 +0000
commit32f53bbd85bc32660a45baa5b5c6119fdcda5aa8 (patch)
tree1b8b5a09fdadb35ab655808c7289966452e2d444 /llvm/lib/Transforms
parenta7644dd9b9af3dc9af09180562acca233268b99a (diff)
downloadbcm5719-llvm-32f53bbd85bc32660a45baa5b5c6119fdcda5aa8.tar.gz
bcm5719-llvm-32f53bbd85bc32660a45baa5b5c6119fdcda5aa8.zip
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. llvm-svn: 37657
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/IndVarSimplify.cpp6
-rw-r--r--llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
index 2558fe15d11..f0019052d8f 100644
--- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/llvm/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;
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 0c4807d31aa..9689c120d69 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -226,7 +226,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);
I->eraseFromParent();
Changed = true;
}
@@ -1488,7 +1488,7 @@ bool LoopStrengthReduce::runOnLoop(Loop *L, LPPassManager &LPM) {
DeadInsts.insert(BO);
// Break the cycle, then delete the PHI.
PN->replaceAllUsesWith(UndefValue::get(PN->getType()));
- SE->deleteInstructionFromRecords(PN);
+ SE->deleteValueFromRecords(PN);
PN->eraseFromParent();
}
}
OpenPOWER on IntegriCloud