[llvm-commits] [llvm] r39769 - in /llvm/trunk/lib: Analysis/MemoryDependenceAnalysis.cpp Transforms/Scalar/FastDSE.cpp
Owen Anderson
resistor at mac.com
Wed Jul 11 17:06:21 PDT 2007
Author: resistor
Date: Wed Jul 11 19:06:21 2007
New Revision: 39769
URL: http://llvm.org/viewvc/llvm-project?rev=39769&view=rev
Log:
Let MemoryDependenceAnalysis take care of updating AliasAnalysis.
Modified:
llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
llvm/trunk/lib/Transforms/Scalar/FastDSE.cpp
Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=39769&r1=39768&r2=39769&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Wed Jul 11 19:06:21 2007
@@ -255,4 +255,6 @@
reverseDep.erase(I);
I = reverseDep.find(rem);
}
+
+ getAnalysis<AliasAnalysis>().deleteValue(rem);
}
Modified: llvm/trunk/lib/Transforms/Scalar/FastDSE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/FastDSE.cpp?rev=39769&r1=39768&r2=39769&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/FastDSE.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/FastDSE.cpp Wed Jul 11 19:06:21 2007
@@ -70,7 +70,6 @@
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 @@
// 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 @@
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 @@
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 @@
// 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
More information about the llvm-commits
mailing list