[all-commits] [llvm/llvm-project] b7ac8f: [SPIR-V] Improve type inference: deduce types of c...

Vyacheslav Levytskyy via All-commits all-commits at lists.llvm.org
Thu Mar 28 00:08:28 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b7ac8fddb54816256fab70696ebc176717a391c3
      https://github.com/llvm/llvm-project/commit/b7ac8fddb54816256fab70696ebc176717a391c3
  Author: Vyacheslav Levytskyy <vyacheslav.levytskyy at intel.com>
  Date:   2024-03-28 (Thu, 28 Mar 2024)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp
    M llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
    M llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.h
    M llvm/lib/Target/SPIRV/SPIRVISelLowering.cpp
    M llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
    M llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
    M llvm/lib/Target/SPIRV/SPIRVUtils.h
    A llvm/test/CodeGen/SPIRV/pointers/nested-struct-opaque-pointers.ll
    M llvm/test/CodeGen/SPIRV/pointers/struct-opaque-pointers.ll
    M llvm/test/CodeGen/SPIRV/pointers/type-deduce-by-call-chain.ll

  Log Message:
  -----------
  [SPIR-V] Improve type inference: deduce types of composite data structures (#86782)

This PR improves type inference in general and deduces types of
composite data structures in particular. Also added a way to insert a
bitcast to make a fun call valid in case of arguments types mismatch due
to opaque pointers type inference.

The attached test `pointers/nested-struct-opaque-pointers.ll`
demonstrates new capabilities: the SPIRV code emitted for this test is
now (1) valid in a sense of data field types and (2) accepted by
`spirv-val`.

More strict LIT checks, support of more composite data structures and
improvement of fun calls from the perspective of type correctness are
main todo's at the moment.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list