[PATCH] D128163: [Coroutines] Don't add musttail call if WebAssembly are enabled

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 21 20:21:52 PDT 2022


ChuanqiXu added inline comments.


================
Comment at: llvm/lib/Transforms/Coroutines/CoroSplit.cpp:1570
+  // WebAssembly engines.
+  return !Triple(M->getTargetTriple()).isWasm();
+}
----------------
tlively wrote:
> It would be good if we could call out to the TargetTransformInfo to ask the backend whether it supports tail calls. Then we could gracefully handle the case where the WebAssembly `tail-call`  target feature //is// enabled.
I tried to look TargetTransformInfo at first but I don't find the wanted methods.  Then I don't find similar things in CodeGen and Target as well. So it looks like there is not on-the-shelf tool. I prefer the current method as a workaround and replace this workaround later if we or anyone implemented thing interface we want.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128163/new/

https://reviews.llvm.org/D128163



More information about the llvm-commits mailing list