This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Simplify tablegen for XCV mac and mul instructions. NFC.
ClosedPublic

Authored by Jim on Jul 26 2023, 7:38 AM.

Details

Summary

CVInstMac reuses RVInstR that has the same encoding fields.

Add a new class CVInst16I that has specific encoding fields, and two
new class CVInstMac16I and CVInstMul16I that inherite CVInst16I with
different outs and ins.

Diff Detail

Event Timeline

Jim created this revision.Jul 26 2023, 7:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 26 2023, 7:38 AM
Jim requested review of this revision.Jul 26 2023, 7:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 26 2023, 7:38 AM
craig.topper added inline comments.Jul 26 2023, 9:28 AM
llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td
77–80

Can we use N or something else instead of 16? As it is now, it looks very similar to RVInst16CI where the 16 refers to the instruction encoding size in bits.

Jim updated this revision to Diff 544569.Jul 26 2023, 6:11 PM

Address comment

Jim marked an inline comment as done.Jul 26 2023, 6:12 PM
This revision is now accepted and ready to land.Jul 26 2023, 9:36 PM
This revision was landed with ongoing or failed builds.Jul 26 2023, 10:05 PM
This revision was automatically updated to reflect the committed changes.