[all-commits] [llvm/llvm-project] aaabe2: [SPIRV] Extend NSDI debug handling for DebugTypeFu...

Manuel Carrasco via All-commits all-commits at lists.llvm.org
Fri Jun 5 06:45:36 PDT 2026


  Branch: refs/heads/users/mgcarrasco/nsdi-debug-type-func
  Home:   https://github.com/llvm/llvm-project
  Commit: aaabe242cf31b08c7e624975b21eed1def525f27
      https://github.com/llvm/llvm-project/commit/aaabe242cf31b08c7e624975b21eed1def525f27
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
    A llvm/test/CodeGen/SPIRV/debug-info/debug-type-function-int-string-dedup.ll
    A llvm/test/CodeGen/SPIRV/debug-info/debug-type-function-multi-scalar-params.ll
    A llvm/test/CodeGen/SPIRV/debug-info/debug-type-function-omit.ll
    A llvm/test/CodeGen/SPIRV/debug-info/debug-type-function-pointer-debug-none-base.ll
    A llvm/test/CodeGen/SPIRV/debug-info/debug-type-function-pointer-param.ll
    A llvm/test/CodeGen/SPIRV/debug-info/debug-type-function-scalar-returns.ll
    A llvm/test/CodeGen/SPIRV/debug-info/debug-type-function-subroutine-type-flags.ll
    A llvm/test/CodeGen/SPIRV/debug-info/debug-type-function-void-prototypes.ll

  Log Message:
  -----------
  [SPIRV] Extend NSDI debug handling for DebugTypeFunction.

Changes:

- Collect required types with DebugInfoFinder instead of walking DbgVariableRecords only. This allows processing types that might not be available in these records, and avoids code duplication for the traversals.

- Emit DebugTypeFunction for DISubroutineType when every signature slot maps to an
emitted debug type.

- Reset per-module state in beginModule().

- Replace parallel FileStringRegs/BasicTypeNameRegs with a StringMap OpString
cache, deduplicating identical strings.

- Add LLVM DINode flag lowering for NSDI.

- Cache DebugInfoNone, OpTypeVoid and OpTypeInt32 registers to avoid duplicate instructions.


  Commit: cdb0bbc1e7e87a72ff38de83b5d4a93f96ccdef8
      https://github.com/llvm/llvm-project/commit/cdb0bbc1e7e87a72ff38de83b5d4a93f96ccdef8
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h

  Log Message:
  -----------
  [reviews] Fix docs.


  Commit: ba67fa218abbf8a994fcb5335a630796a7df678c
      https://github.com/llvm/llvm-project/commit/ba67fa218abbf8a994fcb5335a630796a7df678c
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp

  Log Message:
  -----------
  [reviews] Initialize missing member variables.


  Commit: 243cae036372df7f6fe1aed91e7d8e24e117951a
      https://github.com/llvm/llvm-project/commit/243cae036372df7f6fe1aed91e7d8e24e117951a
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp

  Log Message:
  -----------
  [reviews] Use reportFatalInternalError to report internal invariant violation.


  Commit: 32637f370bf607e14b94a767f43150ecebe17840
      https://github.com/llvm/llvm-project/commit/32637f370bf607e14b94a767f43150ecebe17840
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp

  Log Message:
  -----------
  [reviews] Refactor


  Commit: 941b4e566dbae149a5fded7643adcba3f35fb9d7
      https://github.com/llvm/llvm-project/commit/941b4e566dbae149a5fded7643adcba3f35fb9d7
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp

  Log Message:
  -----------
  [review] Switch to assert.


  Commit: 667432612dcf92272c3aee3334d26146cacaf29d
      https://github.com/llvm/llvm-project/commit/667432612dcf92272c3aee3334d26146cacaf29d
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h

  Log Message:
  -----------
  [reviews] Fix docs after clang-format.


  Commit: 606e1725c7060c1a0f4d2d44222925f5cb70b444
      https://github.com/llvm/llvm-project/commit/606e1725c7060c1a0f4d2d44222925f5cb70b444
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h

  Log Message:
  -----------
  [reviews] Use vectors.


  Commit: 3bdcaa7469f00543a9d9b47ece8a3d852fb4a02f
      https://github.com/llvm/llvm-project/commit/3bdcaa7469f00543a9d9b47ece8a3d852fb4a02f
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp

  Log Message:
  -----------
  Fix typo.


  Commit: 57f966b38899e860f8d139fb0d28b429aba3ad72
      https://github.com/llvm/llvm-project/commit/57f966b38899e860f8d139fb0d28b429aba3ad72
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h

  Log Message:
  -----------
  Fix handling for DebugTypeFunction.


  Commit: 072f27425c77991cf3c2c01ed17fc888f9de953c
      https://github.com/llvm/llvm-project/commit/072f27425c77991cf3c2c01ed17fc888f9de953c
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
    A llvm/test/CodeGen/SPIRV/debug-info/debug-type-pointer-composite-pointee.ll

  Log Message:
  -----------
  [reviews] Simplify code and add missing test.


  Commit: f7d08e920ed2752ed53c23b2586d74cf2b4198bb
      https://github.com/llvm/llvm-project/commit/f7d08e920ed2752ed53c23b2586d74cf2b4198bb
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/test/CodeGen/SPIRV/debug-info/debug-type-function-int-string-dedup.ll
    M llvm/test/CodeGen/SPIRV/debug-info/debug-type-function-multi-scalar-params.ll
    M llvm/test/CodeGen/SPIRV/debug-info/debug-type-function-omit.ll
    M llvm/test/CodeGen/SPIRV/debug-info/debug-type-function-pointer-debug-none-base.ll
    M llvm/test/CodeGen/SPIRV/debug-info/debug-type-function-pointer-param.ll
    M llvm/test/CodeGen/SPIRV/debug-info/debug-type-function-scalar-returns.ll
    M llvm/test/CodeGen/SPIRV/debug-info/debug-type-function-subroutine-type-flags.ll
    M llvm/test/CodeGen/SPIRV/debug-info/debug-type-function-void-prototypes.ll

  Log Message:
  -----------
  [reviews] Simplify tests.


  Commit: 46f1d7ac94d0e560cee3bdf6f338fa55b9c832c9
      https://github.com/llvm/llvm-project/commit/46f1d7ac94d0e560cee3bdf6f338fa55b9c832c9
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp

  Log Message:
  -----------
  Improve comment.


  Commit: 0971592362f8ed9a581115d45d44224d7508d4f7
      https://github.com/llvm/llvm-project/commit/0971592362f8ed9a581115d45d44224d7508d4f7
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp

  Log Message:
  -----------
  [reviews] Improve enum value names and add missing ones.


  Commit: 98f19137f425ef479f736dbf3e92efe6849dcc76
      https://github.com/llvm/llvm-project/commit/98f19137f425ef479f736dbf3e92efe6849dcc76
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
    M llvm/test/CodeGen/SPIRV/debug-info/debug-type-function-void-prototypes.ll

  Log Message:
  -----------
  [reviews] Deduplicate DebugTypeFunction by operand ids

Add getOrEmitDebugTypeFunction() to reuse identical DebugTypeFunction
instructions when distinct DISubroutineType nodes lower to the same
operands (e.g. !{} vs !{null} void prototypes). Update the lit test to
assert a single emission.


  Commit: 83cd9783ca3a9c60fbd3fa91635de911e3a3f70e
      https://github.com/llvm/llvm-project/commit/83cd9783ca3a9c60fbd3fa91635de911e3a3f70e
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h

  Log Message:
  -----------
  [reviews] Improve assertions.


  Commit: 33d3654e370f7f26644953ac58b91ab5a9eba58e
      https://github.com/llvm/llvm-project/commit/33d3654e370f7f26644953ac58b91ab5a9eba58e
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp

  Log Message:
  -----------
  Fix format.


  Commit: 8b7f9918d881a6dda1526a90f3495dc6f867ce95
      https://github.com/llvm/llvm-project/commit/8b7f9918d881a6dda1526a90f3495dc6f867ce95
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp

  Log Message:
  -----------
  Add comment.


  Commit: a8f9f255bc19608b4042503b0228b6ed044bd32e
      https://github.com/llvm/llvm-project/commit/a8f9f255bc19608b4042503b0228b6ed044bd32e
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h

  Log Message:
  -----------
  Add comment.


  Commit: 52bfa6de567453c97145a397889bc3dae55720c8
      https://github.com/llvm/llvm-project/commit/52bfa6de567453c97145a397889bc3dae55720c8
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp

  Log Message:
  -----------
  Use [[maybe_unused]].


  Commit: a47854fe2f11a0285946e7cac5933f78a9e087e9
      https://github.com/llvm/llvm-project/commit/a47854fe2f11a0285946e7cac5933f78a9e087e9
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp

  Log Message:
  -----------
  Minor update.


Compare: https://github.com/llvm/llvm-project/compare/dcd0b263d943...a47854fe2f11

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list