[PATCH] D45186: [InstCombine] Don't optimize call target casts inside thunks

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 2 15:14:02 PDT 2018


rnk added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:4011
+  if (CI && CI->isMustTailCall() &&
+      CI->getParent()->getParent()->hasFnAttribute("thunk"))
+    return false;
----------------
efriedma wrote:
> Why does it matter whether the function is a thunk?  It seems like this would be a problem for any musttail call.
That's true. I can imagine LTO situations where this would go wrong without any variadic argument pack forwarding being involved.


https://reviews.llvm.org/D45186





More information about the llvm-commits mailing list