[PATCH] D144494: [SPIR-V] Support TargetExtType for SPIR-V builtin types

Michal Paszkowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 21 08:02:12 PST 2023


mpaszkowski created this revision.
mpaszkowski added reviewers: iliya-diyachkov, jcranmer-intel, zuban32, arsenm, MaskRay.
Herald added subscribers: ThomasRaoux, hiraditya, Anastasia.
Herald added a project: All.
mpaszkowski requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

This patch adds support for TargetExtType/target(...) representing SPIR-V builtin types. After D135202 <https://reviews.llvm.org/D135202>, target(...) is the preferred way for representing SPIR-V builtin types in LLVM IR and the only working in the opaque pointer mode.

In order to maintain compatibility with LLVM IR generated by older versions of Clang and LLVM/SPIR-V Translator, pointers-to-opaque-structs denoting SPIR-V/OpenCL builtin types will be translated to equivalent SPIR-V target extension types. This translation is only available in the typed pointer mode (-opaque-pointers=0).

The relevant LIT tests with SPIR-V builtins were converted to use the new target(...) notation.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144494

Files:
  llvm/lib/CodeGen/ValueTypes.cpp
  llvm/lib/IR/Type.cpp
  llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp
  llvm/lib/Target/SPIRV/SPIRVBuiltins.h
  llvm/lib/Target/SPIRV/SPIRVBuiltins.td
  llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp
  llvm/lib/Target/SPIRV/SPIRVUtils.cpp
  llvm/test/CodeGen/SPIRV/image_store.ll
  llvm/test/CodeGen/SPIRV/spirv.Queue.ll
  llvm/test/CodeGen/SPIRV/transcoding/spirv-types.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144494.499182.patch
Type: text/x-patch
Size: 37759 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230221/14a3d3bf/attachment-0001.bin>


More information about the llvm-commits mailing list