Context
LLVM dialect has a custom directive PrettyLLVMType that allows one to write types from the LLVM dialect without !llvm. prefix when it's already nested inside another LLVM-dialect type. For example, !llvm.array<2 x struct<...>> is the same as !llvm.array<2 x !llvm.struct<...>>.
This convenience syntax is only available for types wrapped inside the PrettyLLVMType custom directive. In practice, this convenience syntax is available wherever a nested type is allowed, so in VeIR, we just always allow it when we know we're parsing inside a !llvm. type.
Status
Since PrettyLLVMType applies to all types from the LLVM dialect, parseLLVMType needs to handle the shorthand form for all 10 types:
Context
LLVM dialect has a custom directive
PrettyLLVMTypethat allows one to write types from the LLVM dialect without!llvm.prefix when it's already nested inside another LLVM-dialect type. For example,!llvm.array<2 x struct<...>>is the same as!llvm.array<2 x !llvm.struct<...>>.This convenience syntax is only available for types wrapped inside the
PrettyLLVMTypecustom directive. In practice, this convenience syntax is available wherever a nested type is allowed, so in VeIR, we just always allow it when we know we're parsing inside a!llvm.type.Status
Since
PrettyLLVMTypeapplies to all types from the LLVM dialect,parseLLVMTypeneeds to handle the shorthand form for all 10 types:voidptrarrayfuncstructfix(parser): allow omitting!llvm.prefix for nested!llvm.struct#951targetx86_amxppc_fp128labelmetadata