[PATCH] D128794: [WebAssembly] Don't set musttail for coroutines is tail call is not enabled
Thomas Lively via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 29 10:36:04 PDT 2022
tlively accepted this revision.
tlively added a comment.
This revision is now accepted and ready to land.
Nice! LGTM with those comments.
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:780
+ /// If the target supports tail calls.
+ bool supportTailCall() const;
+
----------------
"supportTailCall" should probably be either "supportsTailCall" or even better "supportsTailCalls" everywhere it appears.
================
Comment at: llvm/test/Transforms/Coroutines/coro-split-musttail8.ll:3
+; Wasm32.
+; RUN: opt < %s -passes='cgscc(coro-split),simplifycfg,early-cse' -S | FileCheck %s
+
----------------
ChuanqiXu wrote:
> 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?
One option would be to append target feature metadata to the function:
```
attributes #0 = { "target-features"="+tail-call" }
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128794/new/
https://reviews.llvm.org/D128794
More information about the llvm-commits
mailing list