This patch reuse PPCTargetLowering::isEligibleForTCO() to check PPCTTIImpl::supportsTailCallFor().
Fixes #59315
Differential D140369
[PowerPC] update PPCTTIImpl::supportsTailCallFor() check conditions tingwang on Dec 19 2022, 8:44 PM. Authored by
Details
This patch reuse PPCTargetLowering::isEligibleForTCO() to check PPCTTIImpl::supportsTailCallFor(). Fixes #59315
Diff Detail
Unit Tests Event TimelineComment Actions 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? And for mayBeEmittedAsTailCall(), maybe we should also add another patch to extend it for non 64BitELFABI targets?
Comment Actions Seems for patch that addresses github issues, you can add a comment Fixes #59315 in the description. Comment Actions As suggested by Zheng, I'm looking for a solution that reuse existing functions in PPCISelLowering. Comment Actions (1) Use new API to do the check.
Comment Actions Thank you! I created D141673 to refactor the two functions as you suggested. Regarding mayBeEmittedAsTailCall(), it should be easy to extend, and will be addressed separately.
Comment Actions Update according to comments:
Comment Actions LGTM with one nit.
|
we may need a NFC patch to remove the IsByValArg for isEligibleForTCO as all callers pass false to it, we should be able to check the byval parameter inside isEligibleForTCO.