The C++20 Coroutines couldn't be compiled to WebAssembly due to an optimization named symmetric transfer requires the support for musttail calls but WebAssembly doesn't support it yet. This revision tried to address the opinion from https://reviews.llvm.org/D128163 by adding a new method to TTI.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/Transforms/Coroutines/coro-split-musttail8.ll | ||
---|---|---|
4 | I want another test to show the musttail could be added successfully if we enable tail call for warm. I tried to append -mattr=tail-call, -mattr=+tail-call. But both of them are failed. Do you have any suggestion here? |
Comment Actions
Nice! LGTM with those comments.
llvm/include/llvm/Analysis/TargetTransformInfo.h | ||
---|---|---|
780 | "supportTailCall" should probably be either "supportsTailCall" or even better "supportsTailCalls" everywhere it appears. | |
llvm/test/Transforms/Coroutines/coro-split-musttail8.ll | ||
4 | One option would be to append target feature metadata to the function: attributes #0 = { "target-features"="+tail-call" } |
"supportTailCall" should probably be either "supportsTailCall" or even better "supportsTailCalls" everywhere it appears.