[llvm-commits] [llvm] r128194 - /llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
Cameron Zwarich
zwarich at apple.com
Wed Mar 23 21:51:52 PDT 2011
Author: zwarich
Date: Wed Mar 23 23:51:51 2011
New Revision: 128194
URL: http://llvm.org/viewvc/llvm-project?rev=128194&view=rev
Log:
Check for TLI so that -codegenprepare can be used from opt.
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=128194&r1=128193&r2=128194&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Wed Mar 23 23:51:51 2011
@@ -589,6 +589,9 @@
/// ret i32 %tmp2
///
bool CodeGenPrepare::DupRetToEnableTailCallOpts(ReturnInst *RI) {
+ if (!TLI)
+ return false;
+
Value *V = RI->getReturnValue();
if (!V)
return false;
More information about the llvm-commits
mailing list