[llvm-commits] [llvm] r52433 - /llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Owen Anderson
resistor at mac.com
Tue Jun 17 15:27:06 PDT 2008
Author: resistor
Date: Tue Jun 17 17:27:06 2008
New Revision: 52433
URL: http://llvm.org/viewvc/llvm-project?rev=52433&view=rev
Log:
We don't want to find dependencies within the same block in this case. It leads to incorrect results because
we're detecting something at or after the call we're querying on.
Modified:
llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=52433&r1=52432&r2=52433&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Tue Jun 17 17:27:06 2008
@@ -492,7 +492,7 @@
return nextValueNumber++;
} else if (I->second != MemoryDependenceAnalysis::NonLocal) {
- if (DT->dominates(I->first, C->getParent())) {
+ if (DT->properlyDominates(I->first, C->getParent())) {
if (CallInst* CD = dyn_cast<CallInst>(I->second))
cdep = CD;
else {
More information about the llvm-commits
mailing list