Skip to content

[DebugInfo] Implement killOperand#89005

Closed
Snowy1803 wants to merge 3 commits into
swiftlang:mainfrom
Snowy1803:drop-debug-value
Closed

[DebugInfo] Implement killOperand#89005
Snowy1803 wants to merge 3 commits into
swiftlang:mainfrom
Snowy1803:drop-debug-value

Conversation

@Snowy1803
Copy link
Copy Markdown
Member

@Snowy1803 Snowy1803 commented May 11, 2026

Based on #89422

Add killOperand function to clear DebugValueInst operand. This function should be used in passes where the value cannot be salvaged.

Calls to this function should ideally be added:

  • Wherever we currently just remove the debug_value instruction when dropping it
  • In salvageDebugInfo when we can't salvage

Calls to this function should not be added:

  • When deleting a debug value to reallocate a new one (for an added fragment)
  • When deleting a whole scope/basic block

Snowy1803 added 2 commits May 26, 2026 15:39
Rather than having two ways of storing an op_deref (prependDeref bit,
or start of DIExpr), always use the prependDeref bit when creating a
debug_value instruction. The stored DIExpr should only have fragments.
@Snowy1803 Snowy1803 changed the title [DebugInfo] Add dropDebugValue function to clear DVI operand [DebugInfo] Implement killOperand May 26, 2026
This function drops debug_value operands by making them undef, rather
than deleting them.
@Snowy1803
Copy link
Copy Markdown
Member Author

Moved to be part of #89412

@Snowy1803 Snowy1803 closed this May 26, 2026
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.

1 participant