aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/FastDSE.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2007-07-12 00:06:21 +0000
committerOwen Anderson <resistor@mac.com>2007-07-12 00:06:21 +0000
commit1cb960a4bb97336be1339fd5bc2eb28f125f099a (patch)
treec480bb4285e1ffc331cda2df3a73dfe3377ead95 /lib/Transforms/Scalar/FastDSE.cpp
parent680171f210b6415f556aacfb7fcee5b0f690bde2 (diff)
Let MemoryDependenceAnalysis take care of updating AliasAnalysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39769 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/FastDSE.cpp')
-rw-r--r--lib/Transforms/Scalar/FastDSE.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/Transforms/Scalar/FastDSE.cpp b/lib/Transforms/Scalar/FastDSE.cpp
index e2d81794d8..e353aef7f9 100644
--- a/lib/Transforms/Scalar/FastDSE.cpp
+++ b/lib/Transforms/Scalar/FastDSE.cpp
@@ -70,7 +70,6 @@ namespace {
FunctionPass *llvm::createFastDeadStoreEliminationPass() { return new FDSE(); }
bool FDSE::runOnBasicBlock(BasicBlock &BB) {
- AliasAnalysis &AA = getAnalysis<AliasAnalysis>();
MemoryDependenceAnalysis& MD = getAnalysis<MemoryDependenceAnalysis>();
// Record the last-seen store to this pointer
@@ -101,7 +100,6 @@ bool FDSE::runOnBasicBlock(BasicBlock &BB) {
// Remove it!
MD.removeInstruction(last);
- AA.deleteValue(last);
// DCE instructions only used to calculate that store
if (Instruction* D = dyn_cast<Instruction>(last->getOperand(0)))
@@ -157,7 +155,6 @@ bool FDSE::handleFreeWithNonTrivialDependency(FreeInst* F, StoreInst* dependency
if (A == AliasAnalysis::MustAlias) {
// Remove it!
MD.removeInstruction(dependency);
- AA.deleteValue(dependency);
// DCE instructions only used to calculate that store
if (Instruction* D = dyn_cast<Instruction>(dependency->getOperand(0)))
@@ -200,7 +197,6 @@ bool FDSE::handleEndBlock(BasicBlock& BB, SetVector<Instruction*>& possiblyDead)
if (deadPointers.count(S->getPointerOperand())){
// Remove it!
MD.removeInstruction(S);
- AA.deleteValue(S);
// DCE instructions only used to calculate that store
if (Instruction* D = dyn_cast<Instruction>(S->getOperand(0)))
@@ -230,7 +226,6 @@ void FDSE::DeleteDeadInstructionChains(Instruction *I,
// Let the memory dependence know
getAnalysis<MemoryDependenceAnalysis>().removeInstruction(I);
- getAnalysis<AliasAnalysis>().deleteValue(I);
// See if this made any operands dead. We do it this way in case the
// instruction uses the same operand twice. We don't want to delete a