This is an archive of the discontinued LLVM Phabricator instance.

[LoongArch] Add initial support for function calls
ClosedPublic

Authored by wangleiat on Jun 23 2022, 5:12 AM.

Details

Summary

Note that this is just enough for simple function call examples to
generate working code.

A good portion of this patch is the extra functions that needed to be
implemented to support the test case. e.g. storeRegToStackSlot,
loadRegFromStackSlot, eliminateFrameIndex.

Depends on D128428

Diff Detail

Event Timeline

wangleiat created this revision.Jun 23 2022, 5:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 23 2022, 5:12 AM
wangleiat requested review of this revision.Jun 23 2022, 5:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 23 2022, 5:12 AM
wangleiat updated this revision to Diff 440104.Jun 26 2022, 8:44 PM

Update test to use opaque pointers

xen0n accepted this revision.Jul 1 2022, 11:04 AM

LGTM for the LoongArch codegen part, but someone else could take a look.

llvm/lib/Target/LoongArch/LoongArchInstrInfo.cpp
105

"from"

llvm/lib/Target/LoongArch/LoongArchRegisterInfo.cpp
129

"encodable with"

This revision is now accepted and ready to land.Jul 1 2022, 11:04 AM
wangleiat updated this revision to Diff 441855.Jul 1 2022, 7:38 PM

Address @xen0n's comments.

SixWeining accepted this revision.Jul 4 2022, 9:02 PM
This revision was landed with ongoing or failed builds.Jul 4 2022, 9:03 PM
This revision was automatically updated to reflect the committed changes.