[llvm-commits] [llvm] r106729 - /llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Gabor Greif
ggreif at gmail.com
Thu Jun 24 03:04:07 PDT 2010
Author: ggreif
Date: Thu Jun 24 05:04:07 2010
New Revision: 106729
URL: http://llvm.org/viewvc/llvm-project?rev=106729&view=rev
Log:
use callsite to obtain all arguments
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=106729&r1=106728&r2=106729&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Thu Jun 24 05:04:07 2010
@@ -272,7 +272,8 @@
e.function = C->getCalledFunction();
e.opcode = Expression::CALL;
- for (CallInst::op_iterator I = C->op_begin()+1, E = C->op_end();
+ CallSite CS(C);
+ for (CallInst::op_iterator I = CS.arg_begin(), E = CS.arg_end();
I != E; ++I)
e.varargs.push_back(lookup_or_add(*I));
More information about the llvm-commits
mailing list