This is an archive of the discontinued LLVM Phabricator instance.

[CSKY 2/n] Add basic tablegen infra for CSKY
ClosedPublic

Authored by zixuan-wu on Oct 10 2020, 12:08 AM.

Details

Summary

This introduce basic tablegen infra such as CSKY{InstrFormats,InstrInfo,RegisterInfo,}.td. For now, only add instruction definitions for basic CSKY ISA operations, and the instruction format and register info are almost complete.

Our initial target is a working MC layer rather than codegen, so appropriate SelectionDAG patterns will come later.

Diff Detail

Event Timeline

zixuan-wu created this revision.Oct 10 2020, 12:08 AM
zixuan-wu requested review of this revision.Oct 10 2020, 12:08 AM
zixuan-wu updated this revision to Diff 300863.Oct 26 2020, 7:53 PM

Gentle ping.

zixuan-wu updated this revision to Diff 301178.Oct 27 2020, 9:33 PM

@theraven Would you like to review it as following?

Gentle ping..

myhsu added inline comments.Nov 17 2020, 5:10 PM
llvm/lib/Target/CSKY/CMakeLists.txt
2

LLVM recently deprecated LLVMBuild, some of the functionalities were migrated to CMake. For example, LibraryGroup is replaced by add_llvm_component_group CMake function. You can take a look at how other targets did the migration

llvm/lib/Target/CSKY/CSKYInstrFormats.td
14

Mind to briefly describe each addressing mode here?

zixuan-wu updated this revision to Diff 306335.Nov 19 2020, 1:09 AM

Address comments

zixuan-wu marked 2 inline comments as done.EditedNov 19 2020, 1:11 AM

Thank you for your review. @myhsu

Anyone else could review it too? Gentle ping....

rengolin accepted this revision.Nov 30 2020, 5:55 AM

I can't possibly comment on the ISA implementation, but this looks like a standard table-gen set of files to me. They also don't affect anything else outside of CSKY, so LGTM.

It would be nice to have more reviews for the CSKY back-end. Feel free to add me as a reviewer on others and I'll do my best to help.

This revision is now accepted and ready to land.Nov 30 2020, 5:55 AM

I can't possibly comment on the ISA implementation, but this looks like a standard table-gen set of files to me. They also don't affect anything else outside of CSKY, so LGTM.

It would be nice to have more reviews for the CSKY back-end. Feel free to add me as a reviewer on others and I'll do my best to help.

Thank you very much!

I would hold this patch for a few days and commit later if no one objects.

This revision was automatically updated to reflect the committed changes.