[all-commits] [llvm/llvm-project] b8e154: [SPIRV] add SPIRVPrepareFunctions pass and update ...

Ilia Diachkov via All-commits all-commits at lists.llvm.org
Thu Jul 21 17:19:52 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b8e1544b9df0340b920d1322884e9c5c51885bb1
      https://github.com/llvm/llvm-project/commit/b8e1544b9df0340b920d1322884e9c5c51885bb1
  Author: Ilia Diachkov <iliya.diyachkov at intel.com>
  Date:   2022-07-22 (Fri, 22 Jul 2022)

  Changed paths:
    M llvm/include/llvm/IR/IntrinsicsSPIRV.td
    M llvm/lib/Target/SPIRV/CMakeLists.txt
    M llvm/lib/Target/SPIRV/MCTargetDesc/SPIRVBaseInfo.cpp
    M llvm/lib/Target/SPIRV/MCTargetDesc/SPIRVBaseInfo.h
    M llvm/lib/Target/SPIRV/MCTargetDesc/SPIRVInstPrinter.cpp
    M llvm/lib/Target/SPIRV/SPIRV.h
    M llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp
    M llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp
    M llvm/lib/Target/SPIRV/SPIRVCallLowering.h
    M llvm/lib/Target/SPIRV/SPIRVDuplicatesTracker.h
    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/SPIRVInstrInfo.cpp
    M llvm/lib/Target/SPIRV/SPIRVInstrInfo.h
    M llvm/lib/Target/SPIRV/SPIRVInstrInfo.td
    M llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
    M llvm/lib/Target/SPIRV/SPIRVMCInstLower.cpp
    M llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
    M llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.h
    M llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
    A llvm/lib/Target/SPIRV/SPIRVPrepareFunctions.cpp
    M llvm/lib/Target/SPIRV/SPIRVSubtarget.cpp
    M llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp
    M llvm/lib/Target/SPIRV/SPIRVUtils.cpp
    M llvm/lib/Target/SPIRV/SPIRVUtils.h
    A llvm/test/CodeGen/SPIRV/AtomicCompareExchange.ll
    A llvm/test/CodeGen/SPIRV/branching/if-non-merging.ll
    A llvm/test/CodeGen/SPIRV/constant/global-constants.ll
    A llvm/test/CodeGen/SPIRV/constant/local-aggregate-constant.ll
    A llvm/test/CodeGen/SPIRV/constant/local-bool-constants.ll
    A llvm/test/CodeGen/SPIRV/constant/local-null-constants.ll
    A llvm/test/CodeGen/SPIRV/constant/local-vector-matrix-constants.ll
    A llvm/test/CodeGen/SPIRV/instructions/call-complex-function.ll
    A llvm/test/CodeGen/SPIRV/instructions/nested-composites.ll
    A llvm/test/CodeGen/SPIRV/instructions/scalar-integer-arithmetic.ll
    A llvm/test/CodeGen/SPIRV/instructions/select.ll
    A llvm/test/CodeGen/SPIRV/instructions/vector-floating-point-arithmetic.ll
    A llvm/test/CodeGen/SPIRV/instructions/vector-integer-arithmetic.ll
    A llvm/test/CodeGen/SPIRV/llvm-intrinsics/fshl.ll
    M llvm/test/CodeGen/SPIRV/metadata-opencl.ll
    A llvm/test/CodeGen/SPIRV/opaque_pointers.ll

  Log Message:
  -----------
  [SPIRV] add SPIRVPrepareFunctions pass and update other passes

The patch adds SPIRVPrepareFunctions pass, which modifies function
signatures containing aggregate arguments and/or return values before
IR translation. Information about the original signatures is stored in
metadata. It is used during call lowering to restore correct SPIR-V types
of function arguments and return values. This pass also substitutes some
llvm intrinsic calls to function calls, generating the necessary functions
in the module, as the SPIRV translator does.

The patch also includes changes in other modules, fixing errors and
enabling many SPIR-V features that were omitted earlier. And 15 LIT tests
are also added to demonstrate the new functionality.

Differential Revision: https://reviews.llvm.org/D129730

Co-authored-by: Aleksandr Bezzubikov <zuban32s at gmail.com>
Co-authored-by: Michal Paszkowski <michal.paszkowski at outlook.com>
Co-authored-by: Andrey Tretyakov <andrey1.tretyakov at intel.com>
Co-authored-by: Konrad Trifunovic <konrad.trifunovic at intel.com>




More information about the All-commits mailing list