This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Only make copies of registers on stack in variadic function when va_start is called
ClosedPublic

Authored by lkail on Jun 23 2020, 2:41 AM.

Details

Summary

On PPC64, for a variadic function, if va_start is not called, it won't access any variadic argument on stack, thus we can save stores of registers used to pass arguments.

Diff Detail

Event Timeline

lkail created this revision.Jun 23 2020, 2:41 AM
lkail updated this revision to Diff 272649.Jun 23 2020, 2:45 AM
Harbormaster completed remote builds in B61359: Diff 272649.
steven.zhang added inline comments.Jun 28 2020, 7:40 PM
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
4295–4299

Please add some necessary comments here to prove that, we don't need these stores if there is no va_start.

lkail updated this revision to Diff 274313.Jun 29 2020, 7:48 PM

Address @steven.zhang 's comment.

steven.zhang accepted this revision.Jun 30 2020, 11:25 PM

The change makes sense to me. Please hold on for several days in case others have comments.

This revision is now accepted and ready to land.Jun 30 2020, 11:25 PM
This revision was automatically updated to reflect the committed changes.