llvm-project/llvm/lib/Target/SPIRV
Ilia Diachkov b8e1544b9d [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@gmail.com>
Co-authored-by: Michal Paszkowski <michal.paszkowski@outlook.com>
Co-authored-by: Andrey Tretyakov <andrey1.tretyakov@intel.com>
Co-authored-by: Konrad Trifunovic <konrad.trifunovic@intel.com>
2022-07-22 04:00:48 +03:00
..
MCTargetDesc [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
TargetInfo [SPIR-V](3/6) Add MC layer, object file support, and InstPrinter 2022-04-20 01:10:25 +02:00
CMakeLists.txt [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRV.h [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRV.td
SPIRVAsmPrinter.cpp [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRVCallLowering.cpp [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRVCallLowering.h [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRVDuplicatesTracker.cpp Ensure newlines at the end of files (NFC) 2022-07-17 15:37:45 -07:00
SPIRVDuplicatesTracker.h [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRVEmitIntrinsics.cpp [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRVEnums.td
SPIRVFrameLowering.h [SPIR-V](4/6) Add target lowering, TargetMachine and AsmPrinter 2022-04-20 01:10:25 +02:00
SPIRVGlobalRegistry.cpp [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRVGlobalRegistry.h [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRVISelLowering.cpp [SPIR-V](4/6) Add target lowering, TargetMachine and AsmPrinter 2022-04-20 01:10:25 +02:00
SPIRVISelLowering.h [SPIR-V](4/6) Add target lowering, TargetMachine and AsmPrinter 2022-04-20 01:10:25 +02:00
SPIRVInstrFormats.td
SPIRVInstrInfo.cpp [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRVInstrInfo.h [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRVInstrInfo.td [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRVInstructionSelector.cpp [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRVLegalizerInfo.cpp [SPIRV] Add SPIR-V specific intrinsics, two passes and tests 2022-05-06 03:02:00 +03:00
SPIRVLegalizerInfo.h [SPIR-V](5/6) Add LegalizerInfo, InstructionSelector and utilities 2022-04-20 01:10:25 +02:00
SPIRVMCInstLower.cpp [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRVMCInstLower.h [SPIRV][NFC] Fix warning on class/struct mismatch 2022-04-26 09:51:46 -05:00
SPIRVModuleAnalysis.cpp [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRVModuleAnalysis.h [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRVPreLegalizer.cpp [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRVPrepareFunctions.cpp [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRVRegisterBankInfo.cpp [SPIR-V](4/6) Add target lowering, TargetMachine and AsmPrinter 2022-04-20 01:10:25 +02:00
SPIRVRegisterBankInfo.h [SPIR-V](4/6) Add target lowering, TargetMachine and AsmPrinter 2022-04-20 01:10:25 +02:00
SPIRVRegisterBanks.td
SPIRVRegisterInfo.cpp [SPIR-V](4/6) Add target lowering, TargetMachine and AsmPrinter 2022-04-20 01:10:25 +02:00
SPIRVRegisterInfo.h [SPIR-V](4/6) Add target lowering, TargetMachine and AsmPrinter 2022-04-20 01:10:25 +02:00
SPIRVRegisterInfo.td
SPIRVSubtarget.cpp [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRVSubtarget.h [SPIR-V](5/6) Add LegalizerInfo, InstructionSelector and utilities 2022-04-20 01:10:25 +02:00
SPIRVTargetMachine.cpp [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRVTargetMachine.h [SPIR-V](4/6) Add target lowering, TargetMachine and AsmPrinter 2022-04-20 01:10:25 +02:00
SPIRVTargetObjectFile.h [SPIR-V](4/6) Add target lowering, TargetMachine and AsmPrinter 2022-04-20 01:10:25 +02:00
SPIRVTargetTransformInfo.h [SPIR-V](4/6) Add target lowering, TargetMachine and AsmPrinter 2022-04-20 01:10:25 +02:00
SPIRVUtils.cpp [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00
SPIRVUtils.h [SPIRV] add SPIRVPrepareFunctions pass and update other passes 2022-07-22 04:00:48 +03:00