What does the modifier 'j' do on a vector type in arm_neon.td? I don't know; I don't think I ever knew; and I wouldn't be surprised if no-one knows.
So when implementing new intrinsics everyone just has to keep the magic table of modifiers open in a side-panel. Additionally, we're rapidly running out of letters that we can add when intrinsics with new and strange prototypes come along (I'm looking at you, dot product!). So unless we adopt the mathematicians' trick of starting on Greek and Hebrew alphabets once the Latin letters run out (is TableGen UTF-8 safe?), a solution is needed.
So, the main point of this patch is to allow multiple modifiers per type, and strip the list of modifiers down to something much more orthogonal, and hopefully intuitive. Some things I had to make a choice on to write the patch, and might warrant debate:
- Using '1' for scalar is inconsistent with '2, '3', '4', but '0' seems weird to me.
- Parens to group is a different system from the typespec it's next to (where modifiers precede a canonical base type).
- Switching default from 'd' to '.' might be egregious, but I prefer it and we're rewriting the whole file anyway.
I've included a script which I used to automatically port our .td files, and should be equally useful for any downstream users with changes to these files (I suggest running it on the last downstream version before this change hit).
'd' is gone.