[LLVMdev] RFC: PowerPC tail call optimization patch
arnold.schwaighofer at gmail.com
Thu Apr 24 10:35:50 PDT 2008
Another round :)
I'll post the patch to llvm-commits cause i guess people might get
annoyed by my series of patches :).
On Tue, Apr 22, 2008 at 10:34 PM, Evan Cheng <evan.cheng at apple.com> wrote:
>> +PPCTargetLowering::IsEligibleForTailCallOptimization(SDOperand Call,
> That's fine. Please break it into two parts and move the target
> independent part out.
Done - see CheckTailCallReturnConstraints() in TargetLowering. The
rest of the function is still target dependent. PowerPC currently can
not tail call optimize byval functions, no pic/got code for non-local
calls. On x86 no support for pic/got code on x86-64 for non-local
> I am not sure. Just thinking aloud. It would be nice if all of the
> common code can be handled by SelectionDAGISel. For example, it seems
> possible for SDIsel to determine which operands can be overwritten and
> issued the copies there?
Yes the common code between x86/ppc could be moved to
SelectionDAGISel. See CheckDAGForTailCallsAndFixThem().
> There seem to be quite a bit of duplicated code. Can you refactor?
More information about the llvm-dev