[llvm-branch-commits] [llvm-branch] r99397 - /llvm/branches/ggreif/InvokeInst-operands/lib/Transforms/Scalar/SCCP.cpp

Gabor Greif ggreif at gmail.com
Wed Mar 24 03:46:18 PDT 2010


Author: ggreif
Date: Wed Mar 24 05:46:18 2010
New Revision: 99397

URL: http://llvm.org/viewvc/llvm-project?rev=99397&view=rev
Log:
use CallSite's functionality

Modified:
    llvm/branches/ggreif/InvokeInst-operands/lib/Transforms/Scalar/SCCP.cpp

Modified: llvm/branches/ggreif/InvokeInst-operands/lib/Transforms/Scalar/SCCP.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/InvokeInst-operands/lib/Transforms/Scalar/SCCP.cpp?rev=99397&r1=99396&r2=99397&view=diff
==============================================================================
--- llvm/branches/ggreif/InvokeInst-operands/lib/Transforms/Scalar/SCCP.cpp (original)
+++ llvm/branches/ggreif/InvokeInst-operands/lib/Transforms/Scalar/SCCP.cpp Wed Mar 24 05:46:18 2010
@@ -1717,7 +1717,8 @@
         return true;  // Storing addr of GV.
     } else if (isa<InvokeInst>(U) || isa<CallInst>(U)) {
       // Make sure we are calling the function, not passing the address.
-      if (UI.getOperandNo() != 0)
+      CallSite CS((Instruction*)U);
+      if (!CS.isCallee(UI))
         return true;
     } else if (const LoadInst *LI = dyn_cast<LoadInst>(U)) {
       if (LI->isVolatile())





More information about the llvm-branch-commits mailing list