TableGen Style Conventions

This probably qualifies as bikeshedding, but how strict are the style
norms for TableGen? Some aspects of it, like individually and
consecutively declaring all *_ENC variables in this manner:

    class ADDU_QB_ENC : ADDU_QB_FMT<0b00000>;

To be used only once, in this manner:

    def ADDU_QB : ADDU_QB_ENC, ADDU_QB_DESC;

Seem like avoidable clutter to me. The files tend to be pretty big, and
I think that collapsing assignments like that could make them more
readable.

I'm new to this, so let me know if I'm missing something.

Thanks,
Michael

Hi,

Different targets organize their definitions in different ways. This particular style is from the Mips target.

The creation of this style pre-dates my work on LLVM but readability and de-cluttering are two of the reasons I encouraged its use for new Mips ISA's and ASE's. The main benefit is the ability to pick and choose which types of information you want to see and hide the rest. Disassembler work finds *_FMT and *_ENC more useful, CodeGen work finds *_DESC more useful and finds encodings irrelevant, etc. It's also quite nice for comparing information against the architecture documentation.