[llvm] [NFC] [Docs] Document IIT encoding flow for intrinsic type signatures (PR #185453)
Dharuni R Acharya via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 13 09:46:22 PDT 2026
================
@@ -684,6 +716,14 @@ class TypeInfoGen<
list<LLVMType> Types = !foreach(ty, AllTypes,
!if(!isa<LLVMMatchType>(ty), ACTys[MappingRIdxs[ty.Number]], ty));
+ // TypeSig layout (See an example in comments above):
+ // - If the intrinsic returns multiple values (struct return), the first
+ // code is IIT_STRUCT followed by a count byte, then the element types.
+ // - If it returns a single void, the first code is IIT_Done (0).
+ // - Otherwise the first code(s) describe the single return type.
+ // - Parameter type codes follow in order.
+ // - The sequence is implicitly terminated: in LongEncodingTable by 0 byte
+ // (IIT_Done), and in the fixed encoding by the natural end of nibbles.
----------------
DharuniRAcharya wrote:
Agreed. Updated the comments to reflect the same.
https://github.com/llvm/llvm-project/pull/185453
More information about the llvm-commits
mailing list