Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NonSemantic.Shader.DebugInfo.100 & DebugGlobalVariable's Variable field #229

Closed
LU-JOHN opened this issue Jan 10, 2024 · 1 comment
Closed

Comments

@LU-JOHN
Copy link
Contributor

LU-JOHN commented Jan 10, 2024

The NonSemantic.Shader.DebugInfo.100 describes DebugGlobalVariable's Variable field as:

Variable is the of the source global variable or constant that is described by this instruction. If the variable is optimized out, this operand must be DebugInfoNone.

Sometimes when the variable is optimized out, we would like to utilize this field to hold an Expression that contains the constant value of the variable that was optimized out. Is this modification okay?

This change is motivated by llvm/llvm-project#71780 which generates code like:

!5 = !DIGlobalVariableExpression(var: !6, expr: !DIExpression(DW_OP_constu, 1, DW_OP_stack_value))
!6 = distinct !DIGlobalVariable(name: "true", scope: !2, file: !3, line: 3, type: !7, isLocal: true, isDefinition: true)

This change will allow preservation of the DIExpression.

LU-JOHN added a commit to LU-JOHN/SPIRV-Registry that referenced this issue Jan 22, 2024
Signed-off-by: Lu, John <john.lu@intel.com>
bashbaug pushed a commit that referenced this issue Jan 24, 2024
Signed-off-by: Lu, John <john.lu@intel.com>
@bashbaug
Copy link
Collaborator

Since we've merged #231 is there anything more to do for this issue? Thanks!

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

No branches or pull requests

3 participants