[llvm-commits] [llvm] r106709 - /llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp

Gabor Greif ggreif at gmail.com
Wed Jun 23 17:48:48 PDT 2010


Author: ggreif
Date: Wed Jun 23 19:48:48 2010
New Revision: 106709

URL: http://llvm.org/viewvc/llvm-project?rev=106709&view=rev
Log:
use getNumArgOperands

Modified:
    llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp?rev=106709&r1=106708&r2=106709&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp Wed Jun 23 19:48:48 2010
@@ -454,7 +454,7 @@
   // Ok, now that we know we have a pseudo-entry block WITH all of the
   // required PHI nodes, add entries into the PHI node for the actual
   // parameters passed into the tail-recursive call.
-  for (unsigned i = 0, e = CI->getNumOperands()-1; i != e; ++i)
+  for (unsigned i = 0, e = CI->getNumArgOperands(); i != e; ++i)
     ArgumentPHIs[i]->addIncoming(CI->getArgOperand(i), BB);
 
   // If we are introducing an accumulator variable to eliminate the recursion,





More information about the llvm-commits mailing list