Page MenuHomePhabricator
Feed Advanced Search

Feb 9 2023

Rot127 added a comment to D138323: [TableGen] RegisterInfo backend - Add abstraction layer between code generation logic and syntax output.

Yes, that's indeed an issue for what you're trying to do. IMHO it is also an issue for the maintainability of these backends as they are today. So I'd say we should try to separate the state-machine generation code from the printing code. It could be moved to CodeGenTarget, though I think it'd be better to keep things slightly more modular and instead split up the current DecoderEmitter into parts:

  • A Decoder class contains all the state-machine description. Think of it as an "intermediate representation for a decoder/disassembler": it contains the data describing the decoder, but essentially no logic.
  • A separate createDecoder function creates a Decoder given a CodeGenTarget
  • The emitDecoder function writes out the generated C++ for a given Decoder object

Does that make sense to you?

Feb 9 2023, 10:12 AM · Restricted Project, Restricted Project

Jan 19 2023

Rot127 added a comment to D138323: [TableGen] RegisterInfo backend - Add abstraction layer between code generation logic and syntax output.

Thank you for the feedback!
Its my first time with LLVM so your critique is very valuable for me.

Jan 19 2023, 12:04 PM · Restricted Project, Restricted Project

Jan 18 2023

Rot127 requested review of D142054: [TableGen] Add high level DecoderEmitter documentation..
Jan 18 2023, 1:28 PM · Restricted Project, Restricted Project

Jan 14 2023

Rot127 added a comment to D138323: [TableGen] RegisterInfo backend - Add abstraction layer between code generation logic and syntax output.

Thanks for the feedback so far!

Jan 14 2023, 2:15 PM · Restricted Project, Restricted Project

Dec 30 2022

Rot127 updated the diff for D138323: [TableGen] RegisterInfo backend - Add abstraction layer between code generation logic and syntax output.

Removes the PrinterInterface. New language printer should simply inherit from PrinterLLVM.

Dec 30 2022, 9:48 AM · Restricted Project, Restricted Project

Nov 24 2022

Rot127 added a comment to D138323: [TableGen] RegisterInfo backend - Add abstraction layer between code generation logic and syntax output.

Wouldn't this break the 'open-close principle' and 'Interface segregation principle' ?

Nov 24 2022, 7:02 AM · Restricted Project, Restricted Project

Nov 22 2022

Rot127 retitled D138323: [TableGen] RegisterInfo backend - Add abstraction layer between code generation logic and syntax output from {TableGen] RegisterInfo backend - Add abstraction layer between code generation logic and syntax output to [TableGen] RegisterInfo backend - Add abstraction layer between code generation logic and syntax output.
Nov 22 2022, 8:16 AM · Restricted Project, Restricted Project

Nov 18 2022

Rot127 added a comment to D138323: [TableGen] RegisterInfo backend - Add abstraction layer between code generation logic and syntax output.

To test the output after the refactor I used the following simple scripts:

Nov 18 2022, 1:48 PM · Restricted Project, Restricted Project
Rot127 abandoned D136808: Refactor Tblgen DecoderEmitter to allow multiple language output.

There is now an implementation open for review: https://reviews.llvm.org/D138323

Nov 18 2022, 12:38 PM · Restricted Project, Restricted Project
Rot127 requested review of D138323: [TableGen] RegisterInfo backend - Add abstraction layer between code generation logic and syntax output.
Nov 18 2022, 12:37 PM · Restricted Project, Restricted Project

Oct 27 2022

Rot127 added a comment to D136808: Refactor Tblgen DecoderEmitter to allow multiple language output.
Oct 27 2022, 7:51 PM · Restricted Project, Restricted Project
Rot127 added a comment to D136808: Refactor Tblgen DecoderEmitter to allow multiple language output.

Thanks for this patch !

It is difficult to see the changes you made. Could you separate this into two patches -- the first one contains the all the changes except the functional change; the second one contains the functional change you made.

Oct 27 2022, 7:34 PM · Restricted Project, Restricted Project
Rot127 updated the diff for D136808: Refactor Tblgen DecoderEmitter to allow multiple language output.

Add diff of Printer implementation.

Oct 27 2022, 7:26 PM · Restricted Project, Restricted Project
Rot127 updated the diff for D136808: Refactor Tblgen DecoderEmitter to allow multiple language output.

Adds the decoder split up/refactor as single diff. separated from the Printer implementation.

Oct 27 2022, 7:04 PM · Restricted Project, Restricted Project

Oct 26 2022

Rot127 requested review of D136808: Refactor Tblgen DecoderEmitter to allow multiple language output.
Oct 26 2022, 6:11 PM · Restricted Project, Restricted Project