[PowerPC][NFC] refactor eligible check for tail call optimization
authorTing Wang <Ting.Wang.SH@ibm.com>
Tue, 21 Feb 2023 11:14:47 +0000 (06:14 -0500)
committerTing Wang <Ting.Wang.SH@ibm.com>
Tue, 21 Feb 2023 11:14:47 +0000 (06:14 -0500)
commitd567e06946b70136d344df3d8601c5e02cb596e1
tree7a30aca9c0c685b0a717a4156bee5916109764b2
parent9f5ae702edbca5e9880a9847d9e869aa516482d8
[PowerPC][NFC] refactor eligible check for tail call optimization

The check logic for TCO is scattered in two functions:
IsEligibleForTailCallOptimization_64SVR4() IsEligibleForTailCallOptimization(),
and serves instruction selection phase only at this moment.

This patch aims to refactor existing logic to export an API for TCO
eligible query before instruction selection phase.

Reviewed By: shchenz, nemanjai

Differential Revision: https://reviews.llvm.org/D141673
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.h