[PATCH] D140548: [SPIR-V] Map IR function pointers to registers in ModuleAnalysis

Michal Paszkowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 22 06:05:38 PST 2022


mpaszkowski created this revision.
mpaszkowski added reviewers: iliya-diyachkov, konrad.trifunovic, andreytr, zuban32, rengolin, arsenm, MaskRay.
Herald added subscribers: StephenFan, 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.

SPIRVModuleAnalysis collects module and external function registers (usually result of OpFunction) for use when emitting OpFunctionCall. This patch makes the mapping between the functions and registers using pointers (instead of name strings) to ensure anonymous functions and calls can be resolved properly.

New LIT test multiple-anonymous-functions.ll replaces the old internal-anonymous-function.ll. Additionally, OpenCL CTS spirv_new/function_pure_ptr test <https://spirv-testing.khronos.org/cts_result/33372/> should pass now.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140548

Files:
  llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
  llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.h
  llvm/lib/Target/SPIRV/SPIRVUtils.cpp
  llvm/lib/Target/SPIRV/SPIRVUtils.h
  llvm/test/CodeGen/SPIRV/function/internal-anonymous-function.ll
  llvm/test/CodeGen/SPIRV/function/multiple-anonymous-functions.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140548.484811.patch
Type: text/x-patch
Size: 8038 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221222/4deba8b0/attachment.bin>


More information about the llvm-commits mailing list