Skip to content

[DebugInfo] Initial support NonSemantic.Kernel.DebugInfo.100#1846

Merged
MrSidims merged 5 commits intoKhronosGroup:mainfrom
vmaksimo:support-di-subrange
Feb 20, 2023
Merged

[DebugInfo] Initial support NonSemantic.Kernel.DebugInfo.100#1846
MrSidims merged 5 commits intoKhronosGroup:mainfrom
vmaksimo:support-di-subrange

Conversation

@vmaksimo
Copy link
Contributor

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

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
@MrSidims
Copy link
Contributor

@svenvh may I ask you to take a look if you (ARM) would be interested in new debug info extended instruction set?

Copy link
Contributor

@MrSidims MrSidims left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow up to the comment to the test:
I see some W/As to preserve subranges in existing DebugTypeArray translation. I suggest not to remove these W/As: instead we may have (temporary) two version of translate DebugTypeArray functions:

  • 1st should be the same implementation as we have now without the patch, and they should be run if OpenCL debug info instruction set is enabled;
  • 2nd should be the changed functions as they are being added in this patch, and they should be run if nonsemantic debug info instruction set is enabled

Copy link
Contributor

@MrSidims MrSidims left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, several minor comments

; and back to .ll. This causes the LLVM IR verifier to fail as there
; are different rules for valid DISubRange depending on language ID.

; RUN: llvm-spirv %t.bc -spirv-text --spirv-debug-info-version=nonsemantic-kernel-100
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets don't change this test in this patch

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not? We just add the run/check lines for new behavior for DISubrange. Or do we plan to preserve only one version of DISubrange translation?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem here is with the Fortran language. As we discussed offline, the lower bound can start from either 0 or 1 depending on the language. So for the older spec, we won't have Fortran language, which means that after the translation, we will have OpenCL encoded in dwarf. In this test, the lower bound seems to be set as 1, causing the LLVM verifier to error out.

Copy link
Contributor

@MrSidims MrSidims left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MrSidims
Copy link
Contributor

Merging do unblock further development. Name of the instruction set and option can be changed.

@MrSidims MrSidims merged commit daad382 into KhronosGroup:main Feb 20, 2023
aratajew pushed a commit to aratajew/SPIRV-LLVM-Translator that referenced this pull request Mar 29, 2023
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
aratajew pushed a commit to aratajew/SPIRV-LLVM-Translator that referenced this pull request Mar 29, 2023
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
@MrSidims MrSidims changed the title Initial support NonSemantic.Kernel.DebugInfo.100 [DebugInfo] Initial support NonSemantic.Kernel.DebugInfo.100 Mar 30, 2023
stanleygambarin pushed a commit to stanleygambarin/SPIRV-LLVM-Translator that referenced this pull request Mar 30, 2023
…ronosGroup#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
stanleygambarin pushed a commit to stanleygambarin/SPIRV-LLVM-Translator that referenced this pull request Mar 30, 2023
…onosGroup#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
MrSidims pushed a commit that referenced this pull request Mar 31, 2023
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
MrSidims pushed a commit that referenced this pull request Apr 3, 2023
)

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
mateuszchudyk pushed a commit to mateuszchudyk/SPIRV-LLVM-Translator that referenced this pull request May 10, 2023
…ronosGroup#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
mateuszchudyk pushed a commit to mateuszchudyk/SPIRV-LLVM-Translator that referenced this pull request Sep 29, 2023
…ronosGroup#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
MrSidims pushed a commit that referenced this pull request Oct 5, 2023
)

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants