[llvm-commits] [llvm] r47319 - /llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Chris Lattner
sabre at nondot.org
Mon Feb 18 22:52:38 PST 2008
Author: lattner
Date: Tue Feb 19 00:52:38 2008
New Revision: 47319
URL: http://llvm.org/viewvc/llvm-project?rev=47319&view=rev
Log:
simplify this code again, try 2 :)
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=47319&r1=47318&r2=47319&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Tue Feb 19 00:52:38 2008
@@ -1220,13 +1220,11 @@
if (dep == MemoryDependenceAnalysis::None ||
dep == MemoryDependenceAnalysis::NonLocal)
return false;
- else if (CallInst* C = dyn_cast<CallInst>(dep)) {
- if (!isa<MemCpyInst>(C))
- return performReturnSlotOptzn(M, C, toErase);
- } else if (!isa<MemCpyInst>(dep))
- return false;
-
- return processMemCpy(M, cast<MemCpyInst>(dep), toErase);
+ if (isa<MemCpyInst>(dep))
+ return processMemCpy(M, cast<MemCpyInst>(dep), toErase);
+ if (CallInst* C = dyn_cast<CallInst>(dep))
+ return performReturnSlotOptzn(M, C, toErase);
+ return false;
}
unsigned num = VN.lookup_or_add(I);
More information about the llvm-commits
mailing list