Skip to content

Conversation

@vmaksimo
Copy link
Contributor

@vmaksimo vmaksimo commented Apr 24, 2025

Refine the filtering logic in the getVariableInsertionPoint() function to better handle debug info for mem2reged variables - allow debug instructions that could describe OpVariable to be in the first block in the function as well.

@vmaksimo vmaksimo requested a review from Copilot April 25, 2025 10:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refines the filtering logic in the getVariableInsertionPoint() function to better handle debug instructions when translating debug info for mem2reged variables.

  • Refactored the lambda to use early returns for greater clarity.
  • Added explicit filtering for debug extension instructions matching specific op codes.
  • Updated conditions to ensure that debug instructions which could describe OpVariable are properly skipped.
Files not reviewed (1)
  • test/DebugInfo/mem2reged_local_var_func_start.ll: Language not supported

Comment on lines 105 to 108
if ((ExtSetKind == SPIRVEIS_Debug ||
ExtSetKind == SPIRVEIS_OpenCL_DebugInfo_100 ||
ExtSetKind == SPIRVEIS_NonSemantic_Shader_DebugInfo_100 ||
ExtSetKind == SPIRVEIS_NonSemantic_Shader_DebugInfo_200) &&
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I feel like checks for ExtSetKind here is redundant and checking for the ExtOp is enough.

Copy link
Contributor

Choose a reason for hiding this comment

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

And TODO for me: push an update to DebugInfo specs

@vmaksimo vmaksimo marked this pull request as ready for review April 25, 2025 10:45
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