[all-commits] [llvm/llvm-project] b5132b: [SPIR-V] Improve type inference: fix types of retu...

Vyacheslav Levytskyy via All-commits all-commits at lists.llvm.org
Fri Nov 29 11:44:46 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b5132b7d044a5bc83eba9b09bd158cd77a511403
      https://github.com/llvm/llvm-project/commit/b5132b7d044a5bc83eba9b09bd158cd77a511403
  Author: Vyacheslav Levytskyy <vyacheslav.levytskyy at intel.com>
  Date:   2024-11-29 (Fri, 29 Nov 2024)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp
    M llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp
    M llvm/lib/Target/SPIRV/SPIRVDuplicatesTracker.cpp
    M llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
    M llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp
    M llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.h
    M llvm/lib/Target/SPIRV/SPIRVISelLowering.cpp
    M llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp
    M llvm/lib/Target/SPIRV/SPIRVPostLegalizer.cpp
    M llvm/lib/Target/SPIRV/SPIRVUtils.cpp
    M llvm/lib/Target/SPIRV/SPIRVUtils.h
    M llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_function_pointers/fp_const.ll
    M llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_function_pointers/fp_two_calls.ll
    M llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_subgroups/cl_intel_sub_groups.ll
    M llvm/test/CodeGen/SPIRV/instructions/ret-type.ll
    A llvm/test/CodeGen/SPIRV/pointers/builtin-ret-reg-type.ll
    A llvm/test/CodeGen/SPIRV/pointers/gep-types-1.ll
    A llvm/test/CodeGen/SPIRV/pointers/gep-types-2.ll
    A llvm/test/CodeGen/SPIRV/pointers/phi-chain-types.ll
    M llvm/test/CodeGen/SPIRV/pointers/phi-valid-operand-types.ll
    A llvm/test/CodeGen/SPIRV/pointers/type-deduce-via-store-load-args-rev.ll
    M llvm/test/CodeGen/SPIRV/transcoding/OpGenericCastToPtr.ll
    M llvm/test/CodeGen/SPIRV/transcoding/spirv-event-null.ll
    A llvm/test/CodeGen/SPIRV/validate/sycl-hier-par-basic.ll

  Log Message:
  -----------
  [SPIR-V] Improve type inference: fix types of return values in call lowering (#116609)

Goals of the PR are:
* to ensure that correct types are applied to virtual registers which
were used as return values in call lowering. A reproducer is attached as
a new test case, before the PR it fails because spirv-val considers
output invalid due to wrong result/operand types in OpPhi's;
* improve type inference by speeding up postprocessing of types: by
limiting iterations by checking what remains to process, and processing
each instruction just once for any number of operands with uncomplete
types;
* improve type inference by more accurate work with uncomplete types
(pass uncomplete property to dependent operands, ensure consistency of
uncomplete-types data structure);
* change processing order and add traversing of PHI nodes when type
inference apply instructions results to specify/update/cast operands
type (fixes an issue with OpPhi's result type mismatch with operand
types).



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