[PATCH] D140369: [PowerPC] update PPCTTIImpl::supportsTailCallFor() check conditions

Ting Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 13 06:03:38 PST 2023


tingwang marked an inline comment as done.
tingwang added a comment.

In D140369#4038843 <https://reviews.llvm.org/D140369#4038843>, @shchenz wrote:

> hmm, another issue cause by inconsistent logic for the tail call check between the IR coro-split pass and the instruction selection pass. Should we make them be consistent to avoid more issues?
> For example, can we refactor `IsEligibleForTailCallOptimization_64SVR4` and `IsEligibleForTailCallOptimization()` and call them in the TTI function `supportsTailCallFor`? I see there is a `SelectionDAG &DAG` parameter for these two functions, but the `DAG` is used to get the  Caller `Function`, I think it should be easy to change the `SelectionDAG` to a `Function` parameter?
>
> And for `mayBeEmittedAsTailCall()`, maybe we should also add another patch to extend it for non 64BitELFABI targets?

Thank you! I created D141673 <https://reviews.llvm.org/D141673> to refactor the two functions as you suggested. Regarding `mayBeEmittedAsTailCall()`, it should be easy to extend, and will be addressed separately.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140369/new/

https://reviews.llvm.org/D140369



More information about the llvm-commits mailing list