[llvm-commits] [llvm] r128212 - /llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
Cameron Zwarich
zwarich at apple.com
Thu Mar 24 08:54:11 PDT 2011
Author: zwarich
Date: Thu Mar 24 10:54:11 2011
New Revision: 128212
URL: http://llvm.org/viewvc/llvm-project?rev=128212&view=rev
Log:
It is enough for the CallInst to have no uses to be made a tail call with a ret
void; it doesn't need to have a void type.
Modified:
llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp?rev=128212&r1=128211&r2=128212&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Thu Mar 24 10:54:11 2011
@@ -644,7 +644,7 @@
if (++RI == RE)
continue;
CallInst *CI = dyn_cast<CallInst>(&*RI);
- if (CI && CI->getType()->isVoidTy() && TLI->mayBeEmittedAsTailCall(CI))
+ if (CI && CI->use_empty() && TLI->mayBeEmittedAsTailCall(CI))
TailCalls.push_back(CI);
}
}
More information about the llvm-commits
mailing list