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

Unit TestsFailed

TimeTest
60,090 msx64 debian > AddressSanitizer-x86_64-linux-dynamic.TestCases::scariness_score_test.cpp
Script: -- : 'RUN: at line 4'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -m64 -shared-libasan -O0 /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/asan/TestCases/scariness_score_test.cpp -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/asan/X86_64LinuxDynamicConfig/TestCases/Output/scariness_score_test.cpp.tmp
60,090 msx64 debian > AddressSanitizer-x86_64-linux.TestCases::scariness_score_test.cpp
Script: -- : 'RUN: at line 4'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -m64 -O0 /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/asan/TestCases/scariness_score_test.cpp -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/asan/X86_64LinuxConfig/TestCases/Output/scariness_score_test.cpp.tmp

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
1182

"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.