Page MenuHomePhabricator

[LoongArch] Support for varargs
ClosedPublic

Authored by wangleiat on Jul 21 2022, 4:43 AM.

Details

Summary

This patch ensures the $fp always points to the bottom of the vararg
spill region.
Includes support for expand ISD::DYNAMIC_STACKALLOC.

Depends on D130249

Diff Detail

Event Timeline

wangleiat created this revision.Jul 21 2022, 4:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2022, 4:43 AM
wangleiat requested review of this revision.Jul 21 2022, 4:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2022, 4:43 AM

The test cases seem sane enough (after some hard thought). Anyway let's wait for someone more professional than me to take a look ;-)

llvm/lib/Target/LoongArch/LoongArchFrameLowering.cpp
202

nit: "Do not ... if ..."

llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
1184

"varargs"?

Address @xen0n's comments.

The test cases seem sane enough (after some hard thought). Anyway let's wait for someone more professional than me to take a look ;-)

Thanks again, the modification has been completed.

xen0n accepted this revision.Aug 1 2022, 12:04 AM

otherwise LGTM

llvm/lib/Target/LoongArch/LoongArchFrameLowering.cpp
202

"Do not" ;-)

This revision is now accepted and ready to land.Aug 1 2022, 12:04 AM
wangleiat updated this revision to Diff 450215.Aug 4 2022, 8:05 PM

Typo fix.

llvm/lib/Target/LoongArch/LoongArchFrameLowering.cpp
202

Forgive me for my carelessness. Thanks.

This revision was landed with ongoing or failed builds.Aug 7 2022, 11:02 PM
Closed by commit rG0c2b738f8f1d: [LoongArch] Support for varargs (authored by wangleiat, committed by SixWeining). · Explain Why
This revision was automatically updated to reflect the committed changes.