[all-commits] [llvm/llvm-project] 0b5ead: [WebAssembly] Don't set musttail for coroutines wh...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Wed Jun 29 20:19:29 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0b5ead659023dedd6c450657df9f242a2819871a
      https://github.com/llvm/llvm-project/commit/0b5ead659023dedd6c450657df9f242a2819871a
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2022-06-30 (Thu, 30 Jun 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfo.h
    M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
    M llvm/lib/Analysis/TargetTransformInfo.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h
    M llvm/lib/Transforms/Coroutines/CoroSplit.cpp
    A llvm/test/Transforms/Coroutines/coro-split-musttail10.ll
    A llvm/test/Transforms/Coroutines/coro-split-musttail11.ll
    A llvm/test/Transforms/Coroutines/coro-split-musttail8.ll
    A llvm/test/Transforms/Coroutines/coro-split-musttail9.ll

  Log Message:
  -----------
  [WebAssembly] Don't set musttail for coroutines when tail-call is not
enabled

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 patch tries to fix the problem by adding a supportsTailCalls
method to TargetTransformImpl to skip the symmetric transfer when
tail-call feature is not supported.

Reviewed By: tlively

Differential Revision: https://reviews.llvm.org/D128794




More information about the All-commits mailing list