spirv-llvm-translator-15.git
22 months agoreduce the amount of symbols exposed by the library
Andreas Beckmann [Thu, 8 Feb 2024 21:48:18 +0000 (22:48 +0100)]
reduce the amount of symbols exposed by the library

Forwarded: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/issues/1963

Gbp-Pq: Name visibility-hidden.patch

22 months ago[PATCH 79/79] [Backport to 15][SPV -> SPV-IR] Fix image builtin mangling of unsigned...
Wenju He [Fri, 2 Feb 2024 17:31:27 +0000 (01:31 +0800)]
[PATCH 79/79] [Backport to 15][SPV -> SPV-IR] Fix image builtin mangling of unsigned type (#2273) (#2338)

Return type of image read and Texel type of image write builtins may be unsigned. Before this PR, the builtin names in SPIR-V Friendly IR were always mangled with signed type.

(cherry picked from commit e9b95fb)

Gbp-Pq: Name 0079-Backport-to-15-SPV-SPV-IR-Fix-image-builtin-mangling.patch

22 months ago[PATCH 78/79] [Backport to 15] add initial f16 type support for atomicrmw in llvm...
Vyacheslav Levytskyy [Tue, 14 Nov 2023 15:55:37 +0000 (16:55 +0100)]
[PATCH 78/79] [Backport to 15] add initial f16 type support for atomicrmw in llvm-spirv translator (#2210)

This PR aims to add f16 type support for atomicrmw in llvm-spirv translator, with the reference to the extension documented in [1].
There are two concerns related to the subject:

SPIRVAtomicFAddEXTInst::getRequiredExtension() should return a list of required extension to support the requirement to list both SPV_EXT_shader_atomic_float16_add and SPV_EXT_shader_atomic_float_add extensions in the module (see "Extension Name" section of the ref [1]). However, the return type is std::optional<ExtensionID> and returning a vector would need a bigger rework.
Including SPV_EXT_shader_atomic_float16_add into --spirv-ext argument of llvm-spirv doesn't result in producing the correspondent capability (AtomicFloat16AddEXT) and extension in a SPIRV output.
$ llvm-spirv AtomicFAddEXT.ll.tmp.bc --spirv-ext=+SPV_EXT_shader_atomic_float_add,+SPV_EXT_shader_atomic_float16_add -o AtomicFAddEXT.ll.tmp.spv
$ llvm-spirv -to-text AtomicFAddEXT.ll.tmp.spv -o /dev/stdout
...
2 Capability AtomicFloat32AddEXT
2 Capability AtomicFloat64AddEXT
9 Extension "SPV_EXT_shader_atomic_float_add"
...
This prevents extending the test case of AtomicFAddEXT.ll in EXT/SPV_EXT_shader_atomic_float.

References:
[1] https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/EXT/SPV_EXT_shader_atomic_float16_add.asciidoc

Gbp-Pq: Name 0078-Backport-to-15-add-initial-f16-type-support-for-atom.patch

22 months ago[PATCH 77/79] [Backport to 15] Translate atomicrmw fsub into FNegate and AtomicFAddEX...
Nick Sarnie [Thu, 22 Dec 2022 09:47:24 +0000 (04:47 -0500)]
[PATCH 77/79] [Backport to 15] Translate atomicrmw fsub into FNegate and AtomicFAddEXT (#1780)

Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
Gbp-Pq: Name 0077-Backport-to-15-Translate-atomicrmw-fsub-into-FNegate.patch

22 months ago[PATCH 76/79] [Backport to 15] Translate atomicrmw fadd into AtomicFAddEXT (#1757)
Nick Sarnie [Wed, 7 Dec 2022 22:59:17 +0000 (17:59 -0500)]
[PATCH 76/79] [Backport to 15] Translate atomicrmw fadd into AtomicFAddEXT (#1757)

Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
Gbp-Pq: Name 0076-Backport-to-15-Translate-atomicrmw-fadd-into-AtomicF.patch

22 months ago[PATCH 75/79] Preserve DIExpression in DIGlobalVariableExpression (#2324)
LU-JOHN [Wed, 31 Jan 2024 13:08:38 +0000 (07:08 -0600)]
[PATCH 75/79] Preserve DIExpression in DIGlobalVariableExpression (#2324)

Ensure that SPIR-V that uses a DebugGlobalVariable's Variable field to hold an Expression
can be reverse translated. A Variable field can be used to hold an Expression in order to
preserve a DIExpression in a DIGlobalVariableExpression in LLVM IR.

Signed-off-by: Lu, John <john.lu@intel.com>
Gbp-Pq: Name 0075-Preserve-DIExpression-in-DIGlobalVariableExpression-.patch

22 months ago[PATCH 74/79] [Backport to 15] Update LongConstantCompositeINTEL to LongCompositesINT...
Viktoria Maximova [Tue, 23 Jan 2024 11:41:03 +0000 (12:41 +0100)]
[PATCH 74/79] [Backport to 15] Update LongConstantCompositeINTEL to LongCompositesINTEL capability after Headers change (#2310)

The original change:
https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/0166a0fb86dc6c0e8903436bbc3a89bc3273ebc0

* Bump SPIRV-Headers to 1c6bb2743599e6eb6f37b2969acc0aef812e32e3
* replace internal SPV_INTEL_long_composites ext with the published SPV_INTEL_long_composites
* don't rename extension for now

Gbp-Pq: Name 0074-Backport-to-15-Update-LongConstantCompositeINTEL-to-.patch

22 months ago[PATCH 73/79] [Backport to 15] Fix SPIR-V global to function replacement for differin...
Maksim Shelegov [Wed, 29 Nov 2023 11:58:58 +0000 (03:58 -0800)]
[PATCH 73/79] [Backport to 15] Fix SPIR-V global to function replacement for differing load types (#2160) (#2243)

In some cases, we will see IR with the following

@__spirv_BuiltInGlobalInvocationId = external dso_local local_unnamed_addr addrspace(1) constant <3 x i64>, align 32

...

%0 = load <6 x i32>, ptr addrspace(1) @__spirv_BuiltInGlobalInvocationId, align 32
%1 = extractelement <6 x i32> %0, i64 0
Note the global type and load type are different. Change the handling of vector loads from vector globals to reconstruct the global vector type and then bitcast to the load type.

Thanks to @jcranmer-intel for helping me find the simplest solution.

Co-authored-by: Nick Sarnie <sarnex@users.noreply.github.com>
Gbp-Pq: Name 0073-Backport-to-15-Fix-SPIR-V-global-to-function-replace.patch

22 months ago[PATCH 72/79] [Backport to 15] Add JointMatrixGetElementCoordINTEL instruction (...
Dmitry Sidorov [Mon, 20 Nov 2023 20:44:49 +0000 (21:44 +0100)]
[PATCH 72/79] [Backport to 15] Add JointMatrixGetElementCoordINTEL instruction (#2226)

The instruction returns (Row, Column) coordinate of dynamically selected
element of a matrix

Updated version of the spec is here
intel/llvm#8175

Instruction correctness checks will be added later among non-backward
compatible changes.

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0072-Backport-to-15-Add-JointMatrixGetElementCoordINTEL-i.patch

22 months ago[PATCH 71/79] [Backport to 15] Implement support for SPV_KHR_shader_clock (#2026...
Aleksander Mielczarek [Wed, 8 Nov 2023 23:29:03 +0000 (01:29 +0200)]
[PATCH 71/79] [Backport to 15] Implement support for SPV_KHR_shader_clock (#2026) (#2207)

Link to the spec: https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/KHR/SPV_KHR_shader_clock.asciidoc

Co-authored-by: jgstarIntel <joey.genfi@intel.com>
Gbp-Pq: Name 0071-Backport-to-15-Implement-support-for-SPV_KHR_shader_.patch

22 months ago[PATCH 70/79] [Backport to 15][OpaquePointers] Handle llvm.memset intrinsic mangling...
Viktoria Maximova [Wed, 25 Oct 2023 15:14:00 +0000 (17:14 +0200)]
[PATCH 70/79] [Backport to 15][OpaquePointers] Handle llvm.memset intrinsic mangling mismatches. (#2183)

Original change:
https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/bdd765263a0a7184dbd18fe5396313802f731e25

Non-constant @llvm.memset calls are presently lowered by generating synthetic
functions with the mangled name of memset. However, the reader tries to use this
name to generate the intrinsic call again. This causes verification issues if
the SPIRVWriter and SPIRVReader do not agree on whether or not to use opaque
pointers. This change uses the actual type of the function (which will take into
account whether or not it is in opaque pointer mode) to generate the LLVM
intrinsic name, fixing the mismatch issues.

Co-authored-by: Joshua Cranmer <joshua.cranmer@intel.com>
Gbp-Pq: Name 0070-Backport-to-15-OpaquePointers-Handle-llvm.memset-int.patch

22 months ago[PATCH 69/79] [Backport to 15] Backport spirv-preserve-auxdata changes (#2180)
Nick Sarnie [Mon, 16 Oct 2023 11:01:08 +0000 (11:01 +0000)]
[PATCH 69/79] [Backport to 15] Backport spirv-preserve-auxdata changes (#2180)

Backport the below changes to 15:

f729c49
89d658c
9823690
d498f48
d24b9c6

I made the following changes that are not in the original changes:

Use llvm::Optional instead of std::optional
Port tests to not use opaque pointers and related flags
Fix patch fail due to missing unrelated function in this branch

Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
Gbp-Pq: Name 0069-Backport-to-15-Backport-spirv-preserve-auxdata-chang.patch

22 months ago[PATCH 68/79] Support for SPV_INTEL_cache_controls (#2147)
Andrzej Ratajewski [Tue, 12 Sep 2023 08:26:03 +0000 (10:26 +0200)]
[PATCH 68/79] Support for SPV_INTEL_cache_controls (#2147)

Specification: https://github.com/KhronosGroup/SPIRV-Registry/pull/216

Cherry-pick of KhronosGroup/SPIRV-LLVM-Translator#2140

Gbp-Pq: Name 0068-Support-for-SPV_INTEL_cache_controls-2147.patch

22 months ago[PATCH 67/79] Adjust "Source Lang Literal" logic to support multiple CompileUnits...
Mateusz Chudyk [Tue, 1 Aug 2023 16:52:30 +0000 (18:52 +0200)]
[PATCH 67/79] Adjust "Source Lang Literal" logic to support multiple CompileUnits (#2105)

This commit changes "Source Lang Literal" flag from simple a scalar value
to a vector of pairs: (compile unit, source language).

Gbp-Pq: Name 0067-Adjust-Source-Lang-Literal-logic-to-support-multiple.patch

22 months ago[PATCH 66/79] [Backport to 15] [OpaquePointers] Adjust builtin variable tracking...
Mateusz Chudyk [Mon, 3 Jul 2023 16:40:05 +0000 (18:40 +0200)]
[PATCH 66/79] [Backport to 15] [OpaquePointers] Adjust builtin variable tracking to support i8 geps (#2061)

The existing logic for the replacement of builtin variables with calls to
functions relies on relatively brittle tracking that is broken when opaque
pointers is turned on, and will be even more thoroughly broken if/when typed
geps are replaced with i8 geps or ptradd. This patch replaces that logic with a
less brittle variant that is able to handle any sequence of bitcast, gep, or
addrspacecast instructions between the global variable and the ultimate load
instruction.

It still will error out if the variable is used in too insane of a fashion (say,
trying to load an i32 out of the i64, or a misaligned vector type).

Co-authored-by: Joshua Cranmer <joshua.cranmer@intel.com>
Gbp-Pq: Name 0066-Backport-to-15-OpaquePointers-Adjust-builtin-variabl.patch

22 months ago[PATCH 65/79] Fix clang-tidy warnings
Maksimova, Viktoria [Wed, 28 Jun 2023 10:40:37 +0000 (03:40 -0700)]
[PATCH 65/79] Fix clang-tidy warnings

Gbp-Pq: Name 0065-Fix-clang-tidy-warnings.patch

22 months ago[PATCH 64/79] Fix SourceContinued translation and clang-format/tidy warnings
Maksimova, Viktoria [Mon, 19 Jun 2023 16:35:45 +0000 (09:35 -0700)]
[PATCH 64/79] Fix SourceContinued translation and clang-format/tidy warnings

Gbp-Pq: Name 0064-Fix-SourceContinued-translation-and-clang-format-tid.patch

22 months ago[PATCH 63/79] [DebugInfo] Add debug info for bitfield members (#1907)
asudarsa [Tue, 13 Jun 2023 19:23:31 +0000 (15:23 -0400)]
[PATCH 63/79] [DebugInfo] Add debug info for bitfield members (#1907)

Signed-off-by: Arvind Sudarsanam <arvind.sudarsanam@intel.com>
Gbp-Pq: Name 0063-DebugInfo-Add-debug-info-for-bitfield-members-1907.patch

22 months ago[PATCH 62/79] [DebugInfo] Add Column parameter to DebugInlinedAt instruction (#2042)
Viktoria Maximova [Sun, 11 Jun 2023 11:39:02 +0000 (13:39 +0200)]
[PATCH 62/79] [DebugInfo] Add Column parameter to DebugInlinedAt instruction (#2042)

The change is done as a part of NonSemantic.Shader.200 spec, and the new
arguments for the instructions will look like:

| \<id\> Line| \<id\> Column| \<id\> Scope| Optional\<id\> Inlined|
|--------|--------|--------|--------|

Gbp-Pq: Name 0062-DebugInfo-Add-Column-parameter-to-DebugInlinedAt-ins.patch

22 months ago[PATCH 61/79] [DebugInfo] Adjust TypeInheritance for NonSemantic spec (#2039)
Viktoria Maximova [Fri, 9 Jun 2023 12:05:37 +0000 (14:05 +0200)]
[PATCH 61/79] [DebugInfo] Adjust TypeInheritance for NonSemantic spec (#2039)

It does not have Child parameter comparing to OpenCL specification.
https://github.com/KhronosGroup/SPIRV-Registry/blob/main/nonsemantic/NonSemantic.Shader.DebugInfo.100.asciidoc#DebugTypeInheritance

Gbp-Pq: Name 0061-DebugInfo-Adjust-TypeInheritance-for-NonSemantic-spe.patch

22 months ago[PATCH 60/79] Implement DebugLine and DebugNoLine (#2012)
LU-JOHN [Fri, 9 Jun 2023 12:05:17 +0000 (07:05 -0500)]
[PATCH 60/79] Implement DebugLine and DebugNoLine (#2012)

Implement DebugLine/DebugNoLine for NonSemantic.Shader.DebugInfo.100 and NonSemantic.Shader.DebugInfo.200.
Updated test/DebugInfo/NonSemantic/Shader200/DebugInfoStringType.ll to test these changes.

Gbp-Pq: Name 0060-Implement-DebugLine-and-DebugNoLine-2012.patch

22 months ago[PATCH 59/79] Only generate BuildIdentifier if non-semantic debug is enabled (#2040)
LU-JOHN [Fri, 9 Jun 2023 09:23:38 +0000 (04:23 -0500)]
[PATCH 59/79] Only generate BuildIdentifier if non-semantic debug is enabled (#2040)

Only generate BuildIdentifier and StoragePath if non-semantic debug is enabled

Gbp-Pq: Name 0059-Only-generate-BuildIdentifier-if-non-semantic-debug-.patch

22 months ago[PATCH 58/79] [DebugInfo] Adjust TypeMember for NonSemantic spec (#2033)
Dmitry Sidorov [Fri, 2 Jun 2023 13:23:28 +0000 (15:23 +0200)]
[PATCH 58/79] [DebugInfo] Adjust TypeMember for NonSemantic spec (#2033)

It no longer has a Scope (parent) parameter. It results in several changes including how to determine DIBuilder to use for debug info generation.

The patch also fixes a bug of incorrect debug info assignment in case of recursion DebugInfo inst generation.

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0058-DebugInfo-Adjust-TypeMember-for-NonSemantic-spec-203.patch

22 months ago[PATCH 57/79] [DebugInfo] Add Flags operand for DebugTypeBasic for NonSemantic spec...
Viktoria Maximova [Fri, 2 Jun 2023 09:50:45 +0000 (11:50 +0200)]
[PATCH 57/79] [DebugInfo] Add Flags operand for DebugTypeBasic for NonSemantic spec (#2034)

Flags operand is not optional, fill it with DebugInfoNone value (see #1965
for clarifications why it could not be generated by clang or by LLVM
environment).

Gbp-Pq: Name 0057-DebugInfo-Add-Flags-operand-for-DebugTypeBasic-for-N.patch

22 months ago[PATCH 56/79] [DebugInfo] Relax consumer checks for checksum info (#2011)
Dmitry Sidorov [Sun, 28 May 2023 16:41:04 +0000 (18:41 +0200)]
[PATCH 56/79] [DebugInfo] Relax consumer checks for checksum info (#2011)

It's a follow up for
https://github.com/KhronosGroup/SPIRV-LLVM-Translator/pull/1996
since I couldn't update the PR

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0056-DebugInfo-Relax-consumer-checks-for-checksum-info-20.patch

22 months ago[PATCH 55/79] [DebugInfo] Fix DebugTypeVector Component Count (#2006)
Dmitry Sidorov [Fri, 19 May 2023 20:06:06 +0000 (22:06 +0200)]
[PATCH 55/79] [DebugInfo] Fix DebugTypeVector Component Count (#2006)

It should be OpConstant

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0055-DebugInfo-Fix-DebugTypeVector-Component-Count-2006.patch

22 months ago[PATCH 54/79] [DebugInfo] Support translation of DebugBuildIdentifier/DebugStoragePat...
LU-JOHN [Fri, 19 May 2023 20:05:37 +0000 (15:05 -0500)]
[PATCH 54/79] [DebugInfo] Support translation of DebugBuildIdentifier/DebugStoragePath instruction (#1977)

LLVM compileUnit dwoId is translated to/from DebugBuildIdentifier.
LLVM compileUnit splitDebugFilename is translated to/from DebugStoragePath.

Specification:
https://github.com/KhronosGroup/SPIRV-Registry/blob/main/nonsemantic/NonSemantic.Shader.DebugInfo.100.asciidoc#DebugBuildIdentifier
https://github.com/KhronosGroup/SPIRV-Registry/blob/main/nonsemantic/NonSemantic.Shader.DebugInfo.100.asciidoc#DebugStoragePath

Gbp-Pq: Name 0054-DebugInfo-Support-translation-of-DebugBuildIdentifie.patch

22 months ago[PATCH 53/79] [DebugInfo] Fix CU translation when GV goes before CU (#2010)
Dmitry Sidorov [Fri, 19 May 2023 13:24:12 +0000 (15:24 +0200)]
[PATCH 53/79] [DebugInfo] Fix CU translation when GV goes before CU (#2010)

Translation of DebugInfo compilation units and entry points
moved before translation of GVs.

In other case we might end up in a situation when while
quering for CUs we find none of them.

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0053-DebugInfo-Fix-CU-translation-when-GV-goes-before-CU-.patch

22 months ago[PATCH 52/79] [DebugInfo] Translate checksum info inside DebugSource instruction...
Viktoria Maximova [Fri, 19 May 2023 13:16:07 +0000 (06:16 -0700)]
[PATCH 52/79] [DebugInfo] Translate checksum info inside DebugSource instruction (#1996)

It's done in scope of NonSemantic.Shader.200.DebugInfo spec to have a
proper solution for translation of checksum info (instead of the W/A
done for OpenCL DebugInfo spec in #936)

Gbp-Pq: Name 0052-DebugInfo-Translate-checksum-info-inside-DebugSource.patch

22 months ago[PATCH 51/79] [DebugInfo] Fix translation of DebugSource Text argument (#2003)
Viktoria Maximova [Tue, 9 May 2023 17:40:14 +0000 (10:40 -0700)]
[PATCH 51/79] [DebugInfo] Fix translation of DebugSource Text argument (#2003)

Handle the case when we have `DebugInfoNone` for the Text argument
which is usually expected to be `OpString`.

Gbp-Pq: Name 0051-DebugInfo-Fix-translation-of-DebugSource-Text-argume.patch

22 months ago[PATCH 50/79] [DebugInfo] Support translation of DebugSourceContinued (#1993)
Viktoria Maximova [Fri, 5 May 2023 09:29:41 +0000 (02:29 -0700)]
[PATCH 50/79] [DebugInfo] Support translation of DebugSourceContinued (#1993)

Max length of SPIRV instruction is 65535 words by specification.
DebugSourceContinued helps to overcome the limitation and specify full source code text by continuing the string from the previous DebugSource(Continued)instruction.

Spec:
https://github.com/KhronosGroup/SPIRV-Registry/blob/main/nonsemantic/NonSemantic.Shader.DebugInfo.100.asciidoc#DebugSourceContinued

Gbp-Pq: Name 0050-DebugInfo-Support-translation-of-DebugSourceContinue.patch

22 months ago[PATCH 49/79] [Backport to 15] Split JointMatrixMadINTEL instruction into 4 (#1833)
Dmitry Sidorov [Wed, 15 Feb 2023 18:49:45 +0000 (19:49 +0100)]
[PATCH 49/79] [Backport to 15] Split JointMatrixMadINTEL instruction into 4 (#1833)

JointMatrixMadINTEL will stand for signed/signed Matrix type
JointMatrixSUMadINTEL will stand for signed/signed Matrix type
JointMatrixUSMadINTEL will stand for unsigned/signed Matrix type
JointMatrixUUMadINTEL will stand for unsigned/unsigned Matrix type

Spec update:
intel/llvm#8175

Signed-off-by: Dmitry Sidorov dmitry.sidorov@intel.com
Gbp-Pq: Name 0049-Backport-to-15-Split-JointMatrixMadINTEL-instruction.patch

22 months ago[PATCH 48/79] [Backport to 15] [NFC] Remove JointMatrixINTEL W/S (#1658)
Dmitry Sidorov [Mon, 24 Oct 2022 20:35:59 +0000 (22:35 +0200)]
[PATCH 48/79] [Backport to 15] [NFC] Remove JointMatrixINTEL W/S (#1658)

It's not longer needed after https://github.com/intel/llvm/pull/6535

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0048-Backport-to-15-NFC-Remove-JointMatrixINTEL-W-S-1658.patch

22 months ago[PATCH 47/79] [Backport to 15] Fix SPIRV Friendly IR mangling for opcodes from cl_khr...
Mateusz Chudyk [Sun, 4 Jun 2023 18:45:28 +0000 (20:45 +0200)]
[PATCH 47/79] [Backport to 15] Fix SPIRV Friendly IR mangling for opcodes from cl_khr_integer_do_product (#2014) (#2015)

Gbp-Pq: Name 0047-Backport-to-15-Fix-SPIRV-Friendly-IR-mangling-for-op.patch

22 months ago[PATCH 46/79] Restore DebugInfoProducer.ll test to original state
Stanley Gambarin [Fri, 5 May 2023 23:09:13 +0000 (16:09 -0700)]
[PATCH 46/79] Restore DebugInfoProducer.ll test to original state

Gbp-Pq: Name 0046-Restore-DebugInfoProducer.ll-test-to-original-state.patch

22 months ago[PATCH 45/79] [DebugInfo] Fix missing 2nd operand for DebugImportedEntity (#1983)
Dmitry Sidorov [Tue, 2 May 2023 12:39:37 +0000 (14:39 +0200)]
[PATCH 45/79] [DebugInfo] Fix missing 2nd operand for DebugImportedEntity (#1983)

It will be still missing for OpenCL debug info, but for
NonSemantic the correct behavior is preserved.

Signed-off-by: Sidorov, Dmitry dmitry.sidorov@intel.com
Gbp-Pq: Name 0045-DebugInfo-Fix-missing-2nd-operand-for-DebugImportedE.patch

22 months ago[PATCH 44/79] [NFC][DebugInfo] Rewrite NonSemantic/DebugInfoProducer test
Viktoria Maximova [Fri, 28 Apr 2023 14:29:16 +0000 (07:29 -0700)]
[PATCH 44/79] [NFC][DebugInfo] Rewrite NonSemantic/DebugInfoProducer test

There is a bug in -r -spirv-text mode in translation of Strings with spaces.
Temporary avoid running such pipeline until proper fix is delivered.

Gbp-Pq: Name 0044-NFC-DebugInfo-Rewrite-NonSemantic-DebugInfoProducer-.patch

22 months ago[PATCH 43/79] [DebugInfo] Fix translation of Target Function operand (#1982)
Viktoria Maximova [Thu, 27 Apr 2023 18:36:13 +0000 (11:36 -0700)]
[PATCH 43/79] [DebugInfo] Fix translation of Target Function operand (#1982)

Before reading Target function name operand of `DebugFunction` we need
to make sure it's the translation of appropriate debug extension.
Otherwise, we can get in a situation, where we do have 11 operands, but
the last one is not a `String` with name, but the `DebugFunctionDeclaration`.

Gbp-Pq: Name 0043-DebugInfo-Fix-translation-of-Target-Function-operand.patch

22 months ago[PATCH 42/79] [DebugInfo] Translate inline namespace debug info (#1978)
Viktoria Maximova [Thu, 27 Apr 2023 10:00:08 +0000 (03:00 -0700)]
[PATCH 42/79] [DebugInfo] Translate inline namespace debug info (#1978)

In NonSemantic.Shader.DebugInfo.200 DebugLexicalBlock has Inline
namespace parameter, which specifies if C/C++ namespace is inline or not.
It allows us to save `exportSymbols` field of `DINamespace` metadata.

Spec:
https://github.com/KhronosGroup/SPIRV-Registry/pull/186/

Gbp-Pq: Name 0042-DebugInfo-Translate-inline-namespace-debug-info-1978.patch

22 months ago[PATCH 41/79] [Backport to 15][DebugInfo] Add NonSemantic.Shader.200 debug operations...
Dmitry Sidorov [Wed, 26 Apr 2023 18:34:10 +0000 (20:34 +0200)]
[PATCH 41/79] [Backport to 15][DebugInfo] Add NonSemantic.Shader.200 debug operations (#1976)

Spec:
https://github.com/KhronosGroup/SPIRV-Registry/pull/186

The patch also adds Constantness requirement for operands

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0041-Backport-to-15-DebugInfo-Add-NonSemantic.Shader.200-.patch

22 months ago[PATCH 40/79] [Backport to 15][DebugInfo] Support translation of DebugEntryPoint...
Viktoria Maximova [Wed, 26 Apr 2023 11:25:30 +0000 (04:25 -0700)]
[PATCH 40/79] [Backport to 15][DebugInfo] Support translation of DebugEntryPoint instruction (#1973)

This instruction is generated for DWARF `DISPFlagMainSubprogram` flag of
function as well as for `spir_kernel` functions.

Spec:
https://github.com/KhronosGroup/SPIRV-Registry/blob/main/nonsemantic/NonSemantic.Shader.DebugInfo.100.asciidoc#DebugEntryPoint

Gbp-Pq: Name 0040-Backport-to-15-DebugInfo-Support-translation-of-Debu.patch

22 months ago[PATCH 39/79] [DebugInfo] Add Flag parameter to DebugTypeBasic (#1965)
Dmitry Sidorov [Wed, 26 Apr 2023 10:20:30 +0000 (12:20 +0200)]
[PATCH 39/79] [DebugInfo] Add Flag parameter to DebugTypeBasic (#1965)

It can only be FlagUnknownPhysicalLayout. There is no way we can
generate it LLVM environment and get use of it, hence the patch just
ignores it if it come from another SPIR-V generator.

In general, there are following possible debug flags for DIBasicType:
BigEndian, LittleEndian and Artificial. There is not way that clang will
ever generate them, but that can be produced by manually writing
assembly and transforming it to LLVM IR. While it can be potential
improvement for the future - I don't see it useful to add to the spec
and implementation right now.

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0039-DebugInfo-Add-Flag-parameter-to-DebugTypeBasic-1965.patch

22 months ago[PATCH 38/79] [DebugInfo] Fix Composite type translation for NonSemantic spec (#1975)
Dmitry Sidorov [Tue, 25 Apr 2023 20:17:50 +0000 (22:17 +0200)]
[PATCH 38/79] [DebugInfo] Fix Composite type translation for NonSemantic spec (#1975)

Tag should be OpConstant, not Literal.

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0038-DebugInfo-Fix-Composite-type-translation-for-NonSema.patch

22 months ago[PATCH 37/79] [NFC] Use typed pointers for null function pointers debug info (#1969)
Dmitry Sidorov [Fri, 21 Apr 2023 22:02:48 +0000 (00:02 +0200)]
[PATCH 37/79] [NFC] Use typed pointers for null function pointers debug info (#1969)

`PointerType::get(Context` will return typeless/opaque pointer. While it
is OK for KHR translator since it's being built on top of LLVM trunk,
where opaque pointers are enabled by default - it won't work for
intel/llvm, where their generation is disabled.

Upstream of https://github.com/intel/llvm/pull/9118

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0037-NFC-Use-typed-pointers-for-null-function-pointers-de.patch

22 months ago[PATCH 36/79] [Backport to 15][DebugInfo] Add module producer info for NonSemantic...
Viktoria Maximova [Fri, 21 Apr 2023 15:18:00 +0000 (08:18 -0700)]
[PATCH 36/79] [Backport to 15][DebugInfo] Add module producer info for NonSemantic.Shader.DebugInfo.200 (#1968)

Keep existing W/A for other debug info specs, except
NonSemantic.Shader.DebugInfo.100

Gbp-Pq: Name 0036-Backport-to-15-DebugInfo-Add-module-producer-info-fo.patch

22 months ago[PATCH 35/79] [Backport to 15][DebugInfo] Support translation of DebugFunctionDefinit...
Viktoria Maximova [Thu, 20 Apr 2023 21:22:52 +0000 (14:22 -0700)]
[PATCH 35/79] [Backport to 15][DebugInfo] Support translation of DebugFunctionDefinition instruction (#1961)

DebugFunction does not have an Function Id operand in NonSemantic.Shader debug info specification. It's been replaced by the whole new DebugFunctionDefinition instruction to avoid forward references.

This instruction must appear in the entry basic block of an OpFunction.

Specification:
https://github.com/KhronosGroup/SPIRV-Registry/blob/main/nonsemantic/NonSemantic.Shader.DebugInfo.100.asciidoc#DebugFunctionDefinition

Gbp-Pq: Name 0035-Backport-to-15-DebugInfo-Support-translation-of-Debu.patch

22 months ago[PATCH 34/79] [Backport to 15][DebugInfo] Support multiple CompileUnits (#1950)
Dmitry Sidorov [Wed, 19 Apr 2023 13:34:06 +0000 (15:34 +0200)]
[PATCH 34/79] [Backport to 15][DebugInfo] Support multiple CompileUnits (#1950)

It's possible for LLVM IR module to contain multiple CU in case if this module is a result
of llvm-link between two modules compiled for different languages and or compiled with
different options.

This patch introduces handling of such modules.
std::unordered_map<SPIRVId, std::unique_ptr> BuilderMap was introduced
to SPIR-V consumption part and
std::unordered_map<const DICompileUnit *, SPIRVExtInst *> SPIRVCUMap was introduced
to SPIR-V generation part to preserve Scope relations between DI metadata in SPIR-V and vice versa.

Note, that DIBuilder has a single CU field and this class is not trivially copiable.

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0034-Backport-to-15-DebugInfo-Support-multiple-CompileUni.patch

22 months ago[PATCH 33/79] [Backport to 15][DebugInfo] Handle null value of DW_TAG_template_value_...
Dmitry Sidorov [Fri, 14 Apr 2023 15:03:07 +0000 (17:03 +0200)]
[PATCH 33/79] [Backport to 15][DebugInfo] Handle null value of DW_TAG_template_value_parameter (#1956)

It might be set as null in case if a function pointer is passed as auto
template parameter.

The patch also adds a test for a 'good' DW_TAG_template_value_parameter
value for function pointers, just because this case was untested.

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0033-Backport-to-15-DebugInfo-Handle-null-value-of-DW_TAG.patch

22 months ago[PATCH 32/79] [DebugInfo] Add DW_ATE_complex_float translation (#1946)
Dmitry Sidorov [Wed, 12 Apr 2023 14:24:16 +0000 (16:24 +0200)]
[PATCH 32/79] [DebugInfo] Add DW_ATE_complex_float translation (#1946)

It's mapped on new Encoding value for DebugBasicType in NonSemantic.Shader.DebugInfo.200 spec.
If another DebugInfo instruction set is specified - it's mapped to DW_TAG_unspecified_type

Spec:
KhronosGroup/SPIRV-Registry#186

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0032-DebugInfo-Add-DW_ATE_complex_float-translation-1946.patch

22 months ago[PATCH 31/79] [Backport to 15] Check for nullptr from getDbgInst (#1919)
LU-JOHN [Fri, 31 Mar 2023 16:53:15 +0000 (11:53 -0500)]
[PATCH 31/79] [Backport to 15] Check for nullptr from getDbgInst (#1919)

Ensure that ExprLB is non-NULL before using it.

Signed-off-by: Lu, John <john.lu@intel.com>
Gbp-Pq: Name 0031-Backport-to-15-Check-for-nullptr-from-getDbgInst-191.patch

22 months ago[PATCH 30/79] [Backport to 15] Preserve invalid SPIRV source lang literal in module...
Mateusz Chudyk [Thu, 4 May 2023 11:32:55 +0000 (13:32 +0200)]
[PATCH 30/79] [Backport to 15] Preserve invalid SPIRV source lang literal in module metadata (#1951) (#1980)

Some SPIR-V producers generate invalid source language value (invalid =
other than the enum values defined in spv::SourceLanguage). While in
many cases this is rightly translated to DW_LANG_OpenCL, the original
source language value should be preserved in LLVM module metadata for
later use by LLVM IR consumers.

Co-authored-by: Michal Paszkowski <michal@paszkowski.org>
Gbp-Pq: Name 0030-Backport-to-15-Preserve-invalid-SPIRV-source-lang-li.patch

22 months ago[PATCH 29/79] Rename ConvertFToTF32INTEL to RoundFToTF32INTEL
Dmitry Sidorov [Tue, 4 Apr 2023 08:49:01 +0000 (10:49 +0200)]
[PATCH 29/79] Rename ConvertFToTF32INTEL to RoundFToTF32INTEL

Extension name will be preserved for a while for binary compatibility.

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0029-Rename-ConvertFToTF32INTEL-to-RoundFToTF32INTEL.patch

22 months ago[PATCH 28/79] [Backport to 15][DebugInfo] Align Instruction names to the specificatio...
Viktoria Maximova [Thu, 23 Mar 2023 16:20:23 +0000 (09:20 -0700)]
[PATCH 28/79] [Backport to 15][DebugInfo] Align Instruction names to the specification (#1896)

This patch fixes the discovered typos in Debug Instruction names, so we
can generate spec-conformant SPIR-V module.
https://registry.khronos.org/SPIR-V/specs/unified1/DebugInfo.html

Gbp-Pq: Name 0028-Backport-to-15-DebugInfo-Align-Instruction-names-to-.patch

22 months ago[PATCH 27/79] [Backport to 15][DebugInfo] Add more source languages and align to...
Viktoria Maximova [Tue, 21 Mar 2023 20:13:51 +0000 (13:13 -0700)]
[PATCH 27/79] [Backport to 15][DebugInfo] Add more source languages and align to spec changes (#1894)

Spec: KhronosGroup/SPIRV-Registry#186

Gbp-Pq: Name 0027-Backport-to-15-DebugInfo-Add-more-source-languages-a.patch

22 months ago[PATCH 26/79] [Backport to 15][DebugInfo] Rename NonSemantic.Kernel.DebugInfo.100...
Dmitry Sidorov [Mon, 20 Mar 2023 12:42:49 +0000 (13:42 +0100)]
[PATCH 26/79] [Backport to 15][DebugInfo] Rename NonSemantic.Kernel.DebugInfo.100 (#1891)

To NonSemantic.Shader.DebugInfo.200

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0026-Backport-to-15-DebugInfo-Rename-NonSemantic.Kernel.D.patch

22 months ago[PATCH 25/79] [Backport to 15][DebugInfo] Start adopting debug info instructions...
Dmitry Sidorov [Tue, 21 Mar 2023 22:20:39 +0000 (23:20 +0100)]
[PATCH 25/79] [Backport to 15][DebugInfo] Start adopting debug info instructions for NonSemantic set (#1887)

List of changes:

All Literal parameters of instructions in OpenCL.DebugInfo.100
are OpConstants in NonSemantic.Shader.DebugInfo.100 and
NonSemantic.Shader.DebugInfo.200;
SPV_KHR_non_semantic_info is being implicitly added for nonsemantic
debug info;

Gbp-Pq: Name 0025-Backport-to-15-DebugInfo-Start-adopting-debug-info-i.patch

22 months ago[PATCH 24/79] [Backport to 15][DebugInfo] Support translation of DIModule (#1878)
Viktoria Maximova [Mon, 13 Mar 2023 13:15:51 +0000 (06:15 -0700)]
[PATCH 24/79] [Backport to 15][DebugInfo] Support translation of DIModule (#1878)

This entity represents a module in the programming language, for example a Fortran module.
Spec:
KhronosGroup/SPIRV-Registry#186

The implementation is the same as for SPV_INTEL_debug_module extension. Spec for extension:
https://github.com/intel/llvm/blob/sycl/sycl/doc/design/spirv-extensions/SPV_INTEL_debug_module.asciidoc

Gbp-Pq: Name 0024-Backport-to-15-DebugInfo-Support-translation-of-DIMo.patch

22 months ago[PATCH 23/79] [Backport to 15][DebugInfo] Support translation of DIStringType (#1877)
Viktoria Maximova [Fri, 10 Mar 2023 11:19:02 +0000 (03:19 -0800)]
[PATCH 23/79] [Backport to 15][DebugInfo] Support translation of DIStringType (#1877)

This type instruction describes a string, mostly for Fortran 90.

Spec:
KhronosGroup/SPIRV-Registry#186

Gbp-Pq: Name 0023-Backport-to-15-DebugInfo-Support-translation-of-DISt.patch

22 months ago[PATCH 22/79] [Backport to 15][DebugInfo] Add DebugTypeArrayDynamic translation ...
Dmitry Sidorov [Wed, 8 Mar 2023 18:22:53 +0000 (19:22 +0100)]
[PATCH 22/79] [Backport to 15][DebugInfo] Add DebugTypeArrayDynamic translation (#1871)

This instruction describes a dynamic array, mostly for Fortran 90.

Unlike DebugTypeArray it has Data Location, Associated, Allocated
and Rank parameters. If the appropriate metadata parameters
appear in LLVM IR in DW_TAG_array_type metadata, then such
debug type becomes treated as dynamic array by the translator
(of course if the appropriate extended instruction set is enabled).

Spec:
https://github.com/KhronosGroup/SPIRV-Registry/pull/186

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0022-Backport-to-15-DebugInfo-Add-DebugTypeArrayDynamic-t.patch

22 months ago[PATCH 21/79] [Backport to 15][DebugInfo] Add an option for NonSemantic.Shader.DebugI...
Dmitry Sidorov [Wed, 1 Mar 2023 18:23:49 +0000 (19:23 +0100)]
[PATCH 21/79] [Backport to 15][DebugInfo] Add an option for NonSemantic.Shader.DebugInfo.100 (#1855)

Under this option this extended instruction set will be implemented
Spec:
https://github.com/KhronosGroup/SPIRV-Registry/blob/main/nonsemantic/NonSemantic.Shader.DebugInfo.100.asciidoc

TODO: to rename NonSemantic.Kernel.DebugInfo.100 to
NonSemantic.Shader.DebugInfo.200 when the name is stable

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0021-Backport-to-15-DebugInfo-Add-an-option-for-NonSemant.patch

22 months ago[PATCH 20/79] [Backport to 15][DebugInfo] Add new Source Languages table used in...
Viktoria Maximova [Thu, 23 Feb 2023 18:10:43 +0000 (10:10 -0800)]
[PATCH 20/79] [Backport to 15][DebugInfo] Add new Source Languages table used in DebugCompilationUnit  (#1854)

This extended source language table is used by DebugCompilationUnit instruction when the extension is enabled. It enables support for more languages than exists in a core specification.
Spec: KhronosGroup/SPIRV-Registry#186

Enabling of Fortran language also allowed to fix FortranArray test that was originally XFAIL-ed in 9e234d9.

Gbp-Pq: Name 0020-Backport-to-15-DebugInfo-Add-new-Source-Languages-ta.patch

22 months ago[PATCH 19/79] [Backport to 15][DebugInfo] Add Target Function optional parameter...
Dmitry Sidorov [Thu, 23 Feb 2023 18:11:30 +0000 (19:11 +0100)]
[PATCH 19/79] [Backport to 15][DebugInfo] Add Target Function optional parameter to DebugFunction (#1853)

It's being added in
KhronosGroup/SPIRV-Registry#186

In DWARF it's used in 'trampoline' functions generated for Fortran external function calls.

Gbp-Pq: Name 0019-Backport-to-15-DebugInfo-Add-Target-Function-optiona.patch

22 months ago[PATCH 18/79] [Backport to 15] Initial support NonSemantic.Kernel.DebugInfo.100 ...
Viktoria Maximova [Mon, 20 Feb 2023 22:22:05 +0000 (14:22 -0800)]
[PATCH 18/79] [Backport to 15] Initial support NonSemantic.Kernel.DebugInfo.100 (#1846)

This patch implements the initial support for the new debug specification NonSemantic.Kernel.DebugInfo.100.
It also introduces support for the new debug instruction DISubrange.

Spec: KhronosGroup/SPIRV-Registry#186

Gbp-Pq: Name 0018-Backport-to-15-Initial-support-NonSemantic.Kernel.De.patch

22 months ago[PATCH 17/79] Update spirv-as invocations (#1933)
Dmitry Sidorov [Fri, 31 Mar 2023 11:40:26 +0000 (13:40 +0200)]
[PATCH 17/79] Update spirv-as invocations (#1933)

After SPIRV-Tools commit 2e0f4b52 ("tools: refactorize tools flags
parsing. (#5111)", 2023-02-27), spirv-as needs to be told explicitly
when reading from stdin.

Co-authored-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Gbp-Pq: Name 0017-Update-spirv-as-invocations-1933.patch

22 months ago[PATCH 16/79] Fix mangling of opcodes from SPV_KHR_bit_instructions in SPV-IR (#1869)
Andrzej Ratajewski [Tue, 7 Mar 2023 12:51:36 +0000 (13:51 +0100)]
[PATCH 16/79] Fix mangling of opcodes from SPV_KHR_bit_instructions in SPV-IR (#1869)

Gbp-Pq: Name 0016-Fix-mangling-of-opcodes-from-SPV_KHR_bit_instruction.patch

22 months ago[PATCH 15/79] Allow ReadNone and ReadOnly as Function attributes
Stanley Gambarin [Tue, 14 Feb 2023 00:24:44 +0000 (16:24 -0800)]
[PATCH 15/79] Allow ReadNone and ReadOnly as Function attributes

Gbp-Pq: Name 0015-Allow-ReadNone-and-ReadOnly-as-Function-attributes.patch

22 months ago[PATCH 14/79] [Backport to 15] Put memory(none) attribute instead of readnone (#1746)
Dmitry Sidorov [Tue, 29 Nov 2022 11:55:12 +0000 (12:55 +0100)]
[PATCH 14/79] [Backport to 15] Put memory(none) attribute instead of readnone (#1746)

Instead of creating readnone attributes on each parameter of
a function it's better to put just memory(none) which was recently
introduced.

See https://reviews.llvm.org/D135780

Co-authored by: Zou, Feng <feng.zou@intel.com>

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0014-Backport-to-15-Put-memory-none-attribute-instead-of-.patch

22 months ago[PATCH 13/79] [Backport to 15] Translate readnone attribute as function parameter...
Dmitry Sidorov [Tue, 8 Nov 2022 09:40:39 +0000 (10:40 +0100)]
[PATCH 13/79] [Backport to 15] Translate readnone attribute as function parameter attribute (#1697)

Community restricted readnone, readonly and writeonly attributes
to be only function parameter attributes. This patch aligns
the translator with llvm.org.

It also fixes a bug, when readnone attribute is being mapped
to NoWrite SPIR-V function parameter attribute.

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0013-Backport-to-15-Translate-readnone-attribute-as-funct.patch

22 months ago[PATCH 12/79] Deprecate SPV_INTEL_non_constant_addrspace_printf extension (#1818)
Viktoria Maximova [Sat, 21 Jan 2023 20:45:36 +0000 (21:45 +0100)]
[PATCH 12/79] Deprecate SPV_INTEL_non_constant_addrspace_printf extension (#1818)

This change continues #1749.
We are removing SPV_INTEL_non_constant_addrspace_printf extension in
favor of SPV_EXT_relaxed_printf_string_address_space, which are
basically the same.

Signed-off-by: Maksimova, Viktoria <viktoria.maksimova@intel.com>
Gbp-Pq: Name 0012-Deprecate-SPV_INTEL_non_constant_addrspace_printf-ex.patch

22 months ago[PATCH 11/79] [Backport to 15] Add SPV_EXT_relaxed_printf_string_address_space extension
Dmitry Sidorov [Fri, 2 Dec 2022 13:05:05 +0000 (14:05 +0100)]
[PATCH 11/79] [Backport to 15] Add SPV_EXT_relaxed_printf_string_address_space extension

The original change: #1749

The extension was added in https://github.com/KhronosGroup/SPIRV-Registry/pull/148

Starting from this PR SPV_INTEL_non_constant_addrspace_printf will
be step by step deprecated.

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0011-Backport-to-15-Add-SPV_EXT_relaxed_printf_string_add.patch

22 months ago[PATCH 10/79] [Backport to 15] Relax OpenCL extended instruction restrictions (#1755)
Stanley Gambarin [Thu, 8 Dec 2022 15:01:41 +0000 (07:01 -0800)]
[PATCH 10/79] [Backport to 15] Relax OpenCL extended instruction restrictions (#1755)

* [Backport to 15] Relax OpenCL extended instruction restrictions (#1724)

When VectorAnyINTEL capability is enabled, OpenCL extended instructions
are able to work on vector types with any number of components greater
then or equal to 2.

* [Backport to 15] Translate LLVM intrinsics into native_* OpenCL instructions (#1729)

When an intrinsic function is called with `afn` flag, it's allowed to
substitute an approximate calculations. So the translator can emit
native versions of OpenCL extended instructions.

Co-authored-by: Victor Mustya <victor.mustya@intel.com>
Gbp-Pq: Name 0010-Backport-to-15-Relax-OpenCL-extended-instruction-res.patch

22 months ago[PATCH 09/79] [Backport to 15] Fix builtin vars translation
Dmitry Sidorov [Tue, 29 Nov 2022 12:57:59 +0000 (13:57 +0100)]
[PATCH 09/79] [Backport to 15] Fix builtin vars translation

The translator was crashing in case if builin GV was accessed via
GEP without AS cast due to incorrect assumption.

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0009-Backport-to-15-Fix-builtin-vars-translation.patch

22 months ago[PATCH 08/79] [Backport to 15] Implement SPV_INTEL_tensor_float32_conversion extensio...
Stanley Gambarin [Fri, 11 Nov 2022 10:31:34 +0000 (02:31 -0800)]
[PATCH 08/79] [Backport to 15] Implement SPV_INTEL_tensor_float32_conversion extension (#1656) (#1700)

This extension adds conversion instruction from float to tensor float (TF32)
data format. TF32 uses 1 bit for a sign, 8 bits for an exponent and 10 bits
for a fraction. This extension doesn’t introduce TF32 type in SPIR-V, instead
instruction below uses 32-bit float type to represent TF32 value.

Spec: https://github.com/intel/llvm/pull/6990

Co-authored-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0008-Backport-to-15-Implement-SPV_INTEL_tensor_float32_co.patch

22 months ago[PATCH 07/79] [Backport to 15] Translate llvm.loop.unroll.full metadata (#1673)
Dmitry Sidorov [Tue, 8 Nov 2022 20:32:27 +0000 (21:32 +0100)]
[PATCH 07/79] [Backport to 15] Translate llvm.loop.unroll.full metadata (#1673)

It can be generated via #pragma clang unroll(full) pragma.
llvm.loop.unroll.full means attempt to do full unroll of the
loop and disable the unrolling if the trip count is not known
at compile time.

Unroll mask to which it was previously mapped doesn't much the
description.

The way the patch represents it in SPIR-V is:
 Unroll mask + PartialCount mask with '1' parameter

This patch also removes some overtesting for unroll metadata.

This backports: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/pull/1664

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0007-Backport-to-15-Translate-llvm.loop.unroll.full-metad.patch

22 months ago[PATCH 06/79] [Backport to 15] Add SPV_INTEL_masked_gather_scatter extension (#1580...
Stanley Gambarin [Tue, 8 Nov 2022 16:04:36 +0000 (08:04 -0800)]
[PATCH 06/79] [Backport to 15] Add SPV_INTEL_masked_gather_scatter extension (#1580) (#1695)

This extension allows TypeVector to have a Physical Pointer Type
Component Type and introduces gather/scatter instructions.
It will be useful for explicitly vectorized kernels.

Spec: https://github.com/intel/llvm/pull/6613

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com
Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com
Co-authored-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0006-Backport-to-15-Add-SPV_INTEL_masked_gather_scatter-e.patch

22 months ago[PATCH 05/79] [NFC] Initialize a variable
Sidorov, Dmitry [Tue, 8 Nov 2022 09:50:02 +0000 (01:50 -0800)]
[PATCH 05/79] [NFC] Initialize a variable

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0005-NFC-Initialize-a-variable.patch

22 months ago[PATCH 04/79] [NFC] Replace getPointerElementType in SPIRVRegularizeLLVM
Sidorov, Dmitry [Tue, 8 Nov 2022 09:43:49 +0000 (01:43 -0800)]
[PATCH 04/79] [NFC] Replace getPointerElementType in SPIRVRegularizeLLVM

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
Gbp-Pq: Name 0004-NFC-Replace-getPointerElementType-in-SPIRVRegularize.patch

22 months ago[PATCH 03/79] [CI] Upgrade to Ubuntu 20.04
Sven van Haastregt [Thu, 18 Aug 2022 08:46:20 +0000 (09:46 +0100)]
[PATCH 03/79] [CI] Upgrade to Ubuntu 20.04

The Ubuntu 18.04 image is marked deprecated [1], so move to a newer
image.

[1] https://github.com/actions/runner-images

Gbp-Pq: Name 0003-CI-Upgrade-to-Ubuntu-20.04.patch

22 months ago[PATCH 02/79] Add support for split barriers extension SPV_INTEL_split_barrier (...
Haonan Yang [Thu, 20 Oct 2022 11:46:13 +0000 (19:46 +0800)]
[PATCH 02/79] Add support for split barriers extension SPV_INTEL_split_barrier (#1424) (#1663)

This PR adds support for split barriers and the SPV_INTEL_split_barrier extension.

The related SPIR-V extension spec can be found here:

* https://github.com/KhronosGroup/SPIRV-Registry/pull/136

The related OpenCL C extension spec can be found here:

* https://github.com/KhronosGroup/OpenCL-Docs/pull/765

Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
Gbp-Pq: Name 0002-Add-support-for-split-barriers-extension-SPV_INTEL_s.patch

22 months ago[PATCH 01/79] Integer dot product 4x8 packed translation (#1654)
Jakub Czarnecki [Mon, 17 Oct 2022 15:24:28 +0000 (17:24 +0200)]
[PATCH 01/79] Integer dot product 4x8 packed translation (#1654)

Changed the integer dot translation to use the correct function names
(i.e. dot_4x8packed or dot_acc_sat_4x8packed) to translate them into
proper OpCodes. Additionally removed unused variables from visitCallDot

Gbp-Pq: Name 0001-Integer-dot-product-4x8-packed-translation-1654.patch

22 months agospirv-llvm-translator-15 (15.0.0-6) unstable; urgency=medium
Andreas Beckmann [Thu, 8 Feb 2024 21:48:18 +0000 (22:48 +0100)]
spirv-llvm-translator-15 (15.0.0-6) unstable; urgency=medium

  * Add build-needed autopkgtest for spirv-headers compat check.
  * Update from llvm_release_150 branch.
  * Bump spirv-headers dependency to 1.6.1+1.3.275.0.

[dgit import unpatched spirv-llvm-translator-15 15.0.0-6]

22 months agoImport spirv-llvm-translator-15_15.0.0-6.debian.tar.xz
Andreas Beckmann [Thu, 8 Feb 2024 21:48:18 +0000 (22:48 +0100)]
Import spirv-llvm-translator-15_15.0.0-6.debian.tar.xz

[dgit import tarball spirv-llvm-translator-15 15.0.0-6 spirv-llvm-translator-15_15.0.0-6.debian.tar.xz]

3 years agoImport spirv-llvm-translator-15_15.0.0.orig.tar.gz
Andreas Beckmann [Mon, 3 Oct 2022 00:09:37 +0000 (02:09 +0200)]
Import spirv-llvm-translator-15_15.0.0.orig.tar.gz

[dgit import orig spirv-llvm-translator-15_15.0.0.orig.tar.gz]