[PATCH] D11476: Marked call instruction in thunk function with musttail attribute when applicable

Alexey Bataev a.bataev at hotmail.com
Mon Aug 3 06:34:08 PDT 2015


ABataev added a subscriber: ABataev.

================
Comment at: lib/CodeGen/CGVTables.cpp:315-316
@@ -314,2 +314,4 @@
     RV = PerformReturnAdjustment(*this, ResultType, RV, *Thunk);
+  else if (llvm::CallInst* Call = dyn_cast<llvm::CallInst>(CallOrInvoke))
+    Call->setTailCallKind(llvm::CallInst::TCK_MustTail);
 
----------------
I think it would better to improve code in lines 252-262 rather than setting musttail attribute manually.


Repository:
  rL LLVM

http://reviews.llvm.org/D11476







More information about the cfe-commits mailing list