History log of /llvm-project/llvm/unittests/Target/SPIRV/SPIRVAPITest.cpp (Results 1 – 4 of 4)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# df122fc7 28-Jan-2025 Vyacheslav Levytskyy <vyacheslav.levytskyy@intel.com>

[SPIR-V] Change a way SPIR-V Backend API works with user facing options (#124745)

This PR fixes https://github.com/llvm/llvm-project/issues/124703:
* added a new API call `SPIRVTranslate` that is t

[SPIR-V] Change a way SPIR-V Backend API works with user facing options (#124745)

This PR fixes https://github.com/llvm/llvm-project/issues/124703:
* added a new API call `SPIRVTranslate` that is to replace entirely old
`SPIRVTranslateModule` after existing clients switch into the new
function;
* the new `SPIRVTranslate` doesn't require option parsing, replacing the
`Opts` argument with explicit `CodeGenOptLevel` and `Triple` arguments;
* the old `SPIRVTranslateModule` call is a wrapper for `SPIRVTranslate`,
it doesn't require option parsing either and doesn't hold any logic
inside except for converting string options into `CodeGenOptLevel` and
`Triple` arguments;
* usage of the extensions list is reworked to avoid writes to the global
cl::opt variable `lib/Target/SPIRV/SPIRVSubtarget.cpp::Extensions` --
instead a new class member in SPIRVSubtarget.cpp is implemented that
allows to replace supported extensions after SPIRVSubtarget.cpp is
created;
* both API calls don't require option parsing and don't write to global
cl::opt variables.

Other related/required changes:
* SPIRV::Capability::Shader is marked as an capability of lesser
priority for OpenCL environment (to remediate absence of the
"avoid-spirv-capabilities" command line option in API calls);
* unit tests are updated and extended to cover testing of a newer API
call;
* old API call is marked with TODO to remove it after existing clients
switch into the new function.

show more ...


# ac94fade 22-Jan-2025 Vyacheslav Levytskyy <vyacheslav.levytskyy@intel.com>

[SPIR-V] Rename internal command line flags for optimization level and mtriple used when passing options into the translate API call (#123975)

Rename internal command line flags for optimization lev

[SPIR-V] Rename internal command line flags for optimization level and mtriple used when passing options into the translate API call (#123975)

Rename internal command line flags for optimization level and mtriple
used when passing options into the translate API call.

show more ...


# 3ff9368e 21-Jan-2025 Vyacheslav Levytskyy <vyacheslav.levytskyy@intel.com>

[SPIR-V] Ensure that Module resource is managed locally wrt. a unit test case and fix a memory leak (#123725)

Adding SPIRV to LLVM_ALL_TARGETS
(https://github.com/llvm/llvm-project/pull/119653) rev

[SPIR-V] Ensure that Module resource is managed locally wrt. a unit test case and fix a memory leak (#123725)

Adding SPIRV to LLVM_ALL_TARGETS
(https://github.com/llvm/llvm-project/pull/119653) revealed a series of
minor compilation problems and sanitizer complaints. This PR is to move
unit tests resources (a Module ptr) from the class-scope to a local
scope of the class member function to be sure that before the test env
is teared down the ptr is released.

show more ...


Revision tags: llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0
# bca2b6d2 10-Sep-2024 Vyacheslav Levytskyy <vyacheslav.levytskyy@intel.com>

[SPIR-V] Expose an API call to initialize SPIRV target and translate input LLVM IR module to SPIR-V (#107216)

The goal of this PR is to facilitate integration of SPIRV Backend into
misc 3rd party t

[SPIR-V] Expose an API call to initialize SPIRV target and translate input LLVM IR module to SPIR-V (#107216)

The goal of this PR is to facilitate integration of SPIRV Backend into
misc 3rd party tools and libraries by means of exposing an API call that
translate LLVM module to SPIR-V and write results into a string as
binary SPIR-V output, providing diagnostics on fail and means of
configuring translation in a style of command line options.

An example of a use case may be Khronos Translator that provides
bidirectional translation LLVM IR <=> SPIR-V, where LLVM IR => SPIR-V
step may be substituted by the call to SPIR-V Backend API, implemented
by this PR.

show more ...