[llvm-commits] [llvm] r58593 - /llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
Nick Lewycky
nicholas at mxc.ca
Sun Nov 2 19:49:14 PST 2008
Author: nicholas
Date: Sun Nov 2 21:49:14 2008
New Revision: 58593
URL: http://llvm.org/viewvc/llvm-project?rev=58593&view=rev
Log:
Replace explicit loop with utility function.
Modified:
llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SCCP.cpp?rev=58593&r1=58592&r2=58593&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SCCP.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Sun Nov 2 21:49:14 2008
@@ -1638,10 +1638,8 @@
} else if (isa<InvokeInst>(*UI) || isa<CallInst>(*UI)) {
// Make sure we are calling the function, not passing the address.
CallSite CS = CallSite::get(cast<Instruction>(*UI));
- for (CallSite::arg_iterator AI = CS.arg_begin(),
- E = CS.arg_end(); AI != E; ++AI)
- if (*AI == GV)
- return true;
+ if (CS.hasArgument(GV))
+ return true;
} else if (LoadInst *LI = dyn_cast<LoadInst>(*UI)) {
if (LI->isVolatile())
return true;
More information about the llvm-commits
mailing list