Design representation for OpenCL builtin types and other types lowered to llvm::TargetExtType
#802
Labels
enhancement
New feature or request
llvm::TargetExtType
#802
In the original SPIR-V CodeGen,
llvm::TargetExtType
is employed for OpenCL built-in types likepipe
andimage
, which encapsulate certain type-specific parameters. This design choice is discussed in the RFC Adding opaque types to LLVM IR.The use of
TargetExtType
, or the previously knownOpaqueType
, is quite limited within LLVM until now, primarily involving OpenCL/SPIR-V and Arm's scalable vector extension. It's important to consider the appropriate level of abstraction for these types collectively, as the LLVM community has done.From LLVM's standpoint, the goal is to maintain a clean type system. These target-specific types function similarly to pointers or unique handles, with the main purpose being to distinguish them from standard types like word-sized integers. This perspective is also relevant for ClangIR. However, we should proceed with caution when introducing an LLVM equivalent in ClangIR.
The text was updated successfully, but these errors were encountered: