[PATCH] D131953: [PowerPC][Coroutines] Add tail-call check with context information for coroutines

Ting Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 16 03:38:28 PDT 2022


tingwang created this revision.
tingwang added reviewers: nemanjai, shchenz, lkail, ChuanqiXu, PowerPC.
tingwang added a project: LLVM.
Herald added subscribers: kbarton, hiraditya.
Herald added a project: All.
tingwang requested review of this revision.
Herald added a subscriber: llvm-commits.

This is an attempt to solve https://github.com/llvm/llvm-project/issues/56679 by rejecting musttail in CoroSplitPass on ppc conditionally based on CallInst and target configuration.

TailCallOptimization is conditionally eligible on PPC as details explained in PPCTargetLowering::IsEligibleForTailCallOptimization_64SVR4(). The check happens during instruction selection.

Coroutines need to know the eligibility during transformation. From the CallInst provided, ppc can decide if indirect call can be turned into tail call.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131953

Files:
  llvm/include/llvm/Analysis/TargetTransformInfo.h
  llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
  llvm/lib/Analysis/TargetTransformInfo.cpp
  llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
  llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h
  llvm/lib/Transforms/Coroutines/CoroSplit.cpp
  llvm/test/Transforms/Coroutines/coro-split-musttail-ppc64le.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131953.452913.patch
Type: text/x-patch
Size: 8949 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220816/ea492560/attachment.bin>


More information about the llvm-commits mailing list