Commit Graph

11 Commits

Author SHA1 Message Date
Emil Pedersen 04044cbbf3 [DebugInfo] Remove createDebugValueAddr
Remove the now unused SILBuilder::createDebugValueAddr function. Passes
must always update existing debug value instructions rather than
recreating new ones, and emitDebugDescription has been updated to just
prepend an op_deref. This was the last remnant of DebugValueAddrInst.
2026-05-22 12:18:51 +01:00
Emil Pedersen 947b9f2ffa [DebugInfo] Remove unused SILDIExpr operators
Since salvageDebugInfo now uses debug reconstruction basic blocks,
the plus, minus, and constant SILDebugInfoExpression operators were
left unused. This commit removes them, and updates some of their tests
to use debug basic blocks.

Assisted-by: Claude
2026-05-18 18:07:09 +01:00
Emil Pedersen 0bc6ece9db [DebugInfo] [SILGen] Always use emitDebugDescription (NFCI) 2024-05-23 14:05:13 -07:00
Emil Pedersen 0be63d0422 [DebugInfo] Return complete variable info from getVarInfo by default
getVarInfo() now always returns a variable with a location and scope.
To opt out of this change, getVarInfo(false) returns an incomplete variable.
This can be used to work around bugs, but should only really be used for
printing.

The complete var info will also contain the type, except for debug_values,
as its type depends on another instruction, which may be inconsistent if
called mid-pass.

All locations in debug variables are now also stripped of flags, to avoid
issues when comparing or hashing debug variables.
2024-05-10 16:12:56 -07:00
Emil Pedersen f6232a937d [DebugInfo] Fix wrong scope being used in AllocBoxToStack 2024-04-30 16:29:49 -07:00
Emil Pedersen 7e81fd60f1 [docs] Document the lost variables statistics option 2024-04-30 13:18:38 -07:00
Emil Pedersen 84dae7c37a [DebugInfo] Add support for constant debug values 2024-04-26 16:31:16 -07:00
Emil Pedersen 8ad3066011 [DebugInfo] Fix implicit deref on arithmetic expressions 2024-04-26 16:31:16 -07:00
Emil Pedersen c2c16f53dd [DebugInfo] Fix undef debug values being removed 2024-04-26 16:31:16 -07:00
Emil Pedersen 9c9f14f6d3 [docs] Add more details to HowToUpdateDebugInfo 2024-04-26 16:31:11 -07:00
Adrian Prantl 22afb55fb5 Add the beginning of a Debug Info guide for SIL pass authors.
This document describes how debug info works at the SIL level and how to
correctly update debug info in SIL optimization passes. This document is
inspired by its LLVM analog, "How to Update Debug Info: A Guide for LLVM Pass
Authors", which can be found at https://llvm.org/docs/HowToUpdateDebugInfo.html
2024-04-18 16:18:20 -07:00