[llvm] [NFC][LLVM][Intrinsics] Add `hasStructReturnType` helper (PR #195457)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Sat May 2 10:22:19 PDT 2026
jurahul wrote:
> What's the second element of the pair for? It doesn't appear to be used.
You're right. I have removed it now. I also wanted to see if the motivation for this makes sense. It seems the IIT encoding and IIT descriptors are a private implementation detail of intrinsics that most LLVM code is agnostic to. So, my idea was to remove `getIntrinsicInfoTableEntries` from Intrinsics.h and make it (and hence the entire IITDescriptor data structure) private to Intrinsics.cpp. I am removing some uses of `getIntrinsicInfoTableEntries` in other PRs, but one that still remains is in `CIRGenBuiltin.cpp` which essentially is decoding the IIT descriptors to rebuild types in `cir`'s type system as opposed to LLVM's types. If the motivation makes sense, I'll follow up with ClangIR folks to see if they can move away from using `getIntrinsicInfoTableEntries` directly so that we can make IIT descriptors and encoding private.
Even if that doesn't fully work. at least we can try to encapsulate most of it, by adding new APIs like the one in this PR.
https://github.com/llvm/llvm-project/pull/195457
More information about the llvm-commits
mailing list