This is an archive of the discontinued LLVM Phabricator instance.

[LoongArch 3/6] Add target stub for LoongArch
ClosedPublic

Authored by SixWeining on Dec 16 2021, 12:50 AM.

Details

Summary

This patch registers the 'loongarch32' and 'loongarch64' targets. Also adds a
simple testcase to check the output of llc --vesion containing the targets.

Depends on D115859

Diff Detail

Event Timeline

SixWeining created this revision.Dec 16 2021, 12:50 AM
SixWeining requested review of this revision.Dec 16 2021, 12:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 16 2021, 12:50 AM

rename the patches number from n to 5

SixWeining retitled this revision from [LoongArch 3/n] Add target stub for LoongArch to [LoongArch 3/5] Add target stub for LoongArch.Dec 17 2021, 7:56 PM

Minimalistic structure, seems ok.

llvm/lib/Target/LoongArch/TargetInfo/LoongArchTargetInfo.h
17

These functions usually contain the whole name of the targets, so I suggest:

&getTheLoongArch32Target();
&getTheLoongArch64Target();

Adding owners of recent new targets to help onboarding this new target.

SixWeining updated this revision to Diff 395613.EditedDec 21 2021, 12:43 AM

address comments from @rengolin

  1. Change getTheLA{32,64}Target to getTheLoongArch{32,64}Target
  2. Move the change about CODE_OWNERS.txt and CompilerWriterInfo.rst to the 1st LoongArch specific patch.
SixWeining retitled this revision from [LoongArch 3/5] Add target stub for LoongArch to [LoongArch 3/6] Add target stub for LoongArch.Dec 22 2021, 5:09 PM

A gentle ping.

rengolin accepted this revision.Feb 8 2022, 3:23 AM
This revision is now accepted and ready to land.Feb 8 2022, 3:23 AM
xen0n accepted this revision.Feb 8 2022, 4:45 AM
xen0n added a subscriber: xen0n.

For the record: this patch LGTM.

(It's hard to get wrong on stub implementations indeed!)

This revision was landed with ongoing or failed builds.Feb 10 2022, 2:24 AM
This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.Dec 3 2022, 4:24 AM
thakis added inline comments.
llvm/lib/Target/LoongArch/CMakeLists.txt
17

Do you need this? As far as I can tell, the LoongArch target doesn't use GlobalISel.

Herald added a project: Restricted Project. · View Herald TranscriptDec 3 2022, 4:24 AM
SixWeining added inline comments.Dec 8 2022, 5:22 PM
llvm/lib/Target/LoongArch/CMakeLists.txt
17