[PATCH] D124416: [SPIRV] Add the SPIRV-specific intrinsics and two passes

Ilia Diachkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 13:47:07 PDT 2022


iliya-diyachkov created this revision.
iliya-diyachkov added reviewers: andreytr, zuban32, mpaszkowski, konrad.trifunovic, rengolin, MaskRay, arsenm.
Herald added subscribers: StephenFan, ThomasRaoux, jdoerfert, hiraditya, mgorny.
Herald added a project: All.
iliya-diyachkov requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

The patch adds the SPIRV-specific intrinsics required to keep information critical to SPIR-V consistency (types, constants, etc.) during translation from IR to MIR. Two passes have also been added: SPIRVEmitIntrinsics pass inserts calls to SPIR-V intrinsics before IRTranslator, SPIRVPreLegalizer pass utilizes some intrinsic calls to save SPIR-V specific info in SPIR-V instructions and prepares MIR for Legalizer and InstructionSelect passes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124416

Files:
  llvm/include/llvm/IR/CMakeLists.txt
  llvm/include/llvm/IR/Intrinsics.td
  llvm/include/llvm/IR/IntrinsicsSPIRV.td
  llvm/lib/Target/SPIRV/CMakeLists.txt
  llvm/lib/Target/SPIRV/SPIRV.h
  llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
  llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp
  llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.h
  llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
  llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp
  llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
  llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp
  llvm/lib/Target/SPIRV/SPIRVUtils.cpp
  llvm/lib/Target/SPIRV/SPIRVUtils.h
  llvm/test/CodeGen/SPIRV/branching/if-merging.ll
  llvm/test/CodeGen/SPIRV/function/alloca-load-store.ll
  llvm/test/CodeGen/SPIRV/function/trivial-function-with-attributes.ll
  llvm/test/CodeGen/SPIRV/instructions/atomic.ll
  llvm/test/CodeGen/SPIRV/instructions/atomic_acqrel.ll
  llvm/test/CodeGen/SPIRV/instructions/atomic_seq.ll
  llvm/test/CodeGen/SPIRV/instructions/fcmp.ll
  llvm/test/CodeGen/SPIRV/instructions/float-casts.ll
  llvm/test/CodeGen/SPIRV/instructions/icmp.ll
  llvm/test/CodeGen/SPIRV/instructions/integer-casts.ll
  llvm/test/CodeGen/SPIRV/instructions/ptrcmp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124416.425009.patch
Type: text/x-patch
Size: 115818 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220425/ac92392b/attachment-0001.bin>


More information about the llvm-commits mailing list