[RFC] Compress Intrinsic Name Table

@rnk @RKSimon @nhaehnle I have another draft PR where I implemented the scheme above of changing intrinsic IDs to have 8-bit target index in bits 23-16 and a 16-bit intrinsic index in lower 16 bits + trimming intrinsics for disabled targets. I built it on top of my earlier POC so it has all changes together. I wanted to get an overall high level review before I can start cleaning it up and splitting into 3 changes: (a) Just change the intrinsic ID enums to this new format + introduce linear index that is used for various table lookups, (b) Add support for enabling a subset of defined intrinsics (but have them all enabled by default in the makefile), (c) enable only for targets that are enabled (CMake only change) + add appropriate REQUIRES: to tests that fail when only building default enabled targets.

Note that even with this, it’s likely that there are tests that will additionally fail when other subsets of targets are enabled (by individual downstream builds) or may be in build bots post commit. So maybe we can commit the test changes separately and then just a single enablement change, which can be reverted if needed. But it seems we would need to iterate on adding appropriate REQUIRES: to all tests till all bots are green. If there is a way to do this pre-commit, that would be great as well.

I’ll add you folks to the review, where at this stage I am hoping to get a sign-off so I can proceed with the steps outlined above to prepare the diff for committing. Also, do we need compile time measurements as well for this? Would appreciate advice on that as well.

[LLVM] Trim intrinsics by jurahul · Pull Request #112791 · llvm/llvm-project (github.com)

Also @arsenm and @nikic