RFC: Simplifying intrinsics type signature (IIT Info) generation/encoding in IntrinsicEmitter.cpp

Hi all,

@DharuniRAcharya has been working on a PR to document the IIT info table which encodes intrinsic signatures better as an aid to help implement additional intrinsic related enhancements. As I was going through it and looking into the code to understand the current implementation, I realized that some of the code here can be simplified significantly, which will help any future changes in this area. As a result, I have created a different form of the documentation and listed some of the simplifications that can be added here. Please take a look at:

Notes about LLVM intrinsics type signature encoding

[Note, this document is WIP and not complete].

I wanted feedback from folks (@nikic, @arsenm, @Durga and others familiar with this area) to see if these simplifications make sense and whether we can go ahead and implement them. In addition, I am hoping that the document above (once updated with the simplified implementation details and other missing pieces on the decoding and use of the IIT table on LLVM side) can also be committed into LLVM repo (and kept up to date as changes are made in this area).

Thanks,
Rahul

3 Likes

Also @chapuni who worked on this before.

Can you link the PR?

Dharuni’s Docs PR: [NFC] [Docs] Document IIT encoding flow for intrinsic type signatures by DharuniRAcharya · Pull Request #185453 · llvm/llvm-project · GitHub

I just want to update that over the past several weeks I have implemented these simplifications and improvements and several more. I am hoping to continue to make progress and also try to finish the document above.

1 Like