[PATCH] D131953: [PowerPC][Coroutines] Add tail-call check with context information for coroutines
Chuanqi Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 16 18:58:37 PDT 2022
ChuanqiXu added a comment.
In D131953#3725578 <https://reviews.llvm.org/D131953#3725578>, @tingwang wrote:
> Test case clang/test/CodeGenCoroutines/pr56329.cpp with this patch will not generate musttail on ppc.
So will pr56329.cpp fail after this patch? I guess we need `REQUIRE`/`XFAIL` clause to `pr56329.cpp` for pcc.
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:792
+ /// If target supports tail call on \p CB
+ bool supportsTailCallWithContext(const CallBase *CB) const;
+
----------------
================
Comment at: llvm/lib/Transforms/Coroutines/CoroSplit.cpp:1378-1379
+ // Skip targets which don't support tail call on the specific case.
+ if (simplifyTerminatorLeadingToRet(Call->getNextNode()) &&
+ TTI.supportsTailCallWithContext(Call)) {
Call->setTailCallKind(CallInst::TCK_MustTail);
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131953/new/
https://reviews.llvm.org/D131953
More information about the llvm-commits
mailing list