[llvm-commits] [llvm] r54132 - /llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
Owen Anderson
resistor at mac.com
Mon Jul 28 09:01:03 PDT 2008
Author: resistor
Date: Mon Jul 28 11:00:58 2008
New Revision: 54132
URL: http://llvm.org/viewvc/llvm-project?rev=54132&view=rev
Log:
Fix a subtle bug when removing instructions from memdep. In very specific
circumstances we could end up remapping a dependee to the same instruction
that we're trying to remove. Handle this properly by just falling back to
a conservative solution.
Modified:
llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=54132&r1=54131&r2=54132&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Mon Jul 28 11:00:58 2008
@@ -528,6 +528,10 @@
// If we have dep info for rem, set them to it
BasicBlock::iterator RI = depGraphEntry->second.first;
RI++;
+
+ // If RI is rem, then we use rem's immediate successor.
+ if (RI == (BasicBlock::iterator)rem) RI++;
+
newDep = RI;
} else if ( (depGraphEntry->second.first == NonLocal ||
depGraphEntry->second.first == None ) &&
More information about the llvm-commits
mailing list