[all-commits] [llvm/llvm-project] 452e51: [SPIRV] LLVM IR DIScope nodes are now emitted afte...

Manuel Carrasco via All-commits all-commits at lists.llvm.org
Tue Sep 29 08:54:29 PDT 2026


  Branch: refs/heads/users/mgcarrasco/di-emission-order
  Home:   https://github.com/llvm/llvm-project
  Commit: 452e51d5c96abbe2a216ea7c0dbc40d7127fdeeb
      https://github.com/llvm/llvm-project/commit/452e51d5c96abbe2a216ea7c0dbc40d7127fdeeb
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-09-29 (Tue, 29 Sep 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-function-declaration-composite-scope.ll
    M llvm/test/CodeGen/SPIRV/debug-info/debug-function-declaration-skip-type-not-in-debug-type-regs.ll
    M llvm/test/CodeGen/SPIRV/debug-info/debug-lexical-block-namespace-in-block.ll
    M llvm/test/CodeGen/SPIRV/debug-info/debug-type-array-of-composite-drop.ll
    M llvm/test/CodeGen/SPIRV/debug-info/debug-type-composite-nested-drop.ll
    M llvm/test/CodeGen/SPIRV/debug-info/debug-type-function-omit.ll
    M llvm/test/CodeGen/SPIRV/debug-info/debug-type-pointer-composite-pointee.ll
    M llvm/test/CodeGen/SPIRV/debug-info/debug-type-pointer-to-composite-drop.ll
    M llvm/test/CodeGen/SPIRV/debug-info/debug-typedef-nested-drop.ll
    M llvm/test/CodeGen/SPIRV/debug-info/debug-value-typedef-cycle.ll

  Log Message:
  -----------
  [SPIRV] LLVM IR DIScope nodes are now emitted after their dependencies.

This allows supporting the following cases:

A pointer, array, typedef, or function type whose operand is a composite.
A nested composite member, and a typedef whose base is another typedef.
A type scoped in a function, lexical block, or namespace, and a function declaration whose parent is a composite.
Cycles are not fully supported. A back edge is not emitted: by design, a composite member that refers back to its own type is dropped, and a cycle that cannot be cut emits nothing.

Emission functions now return an EmitResult, which indicates the status of the emission.
Emitted and Unsupported results are cached. InProgress is not.
For struct S { S *p; }, the edge from p back to S returns InProgress, so member p is dropped and S is still emitted.
S* is left uncached, so a later call emits it once S exists. Caching that InProgress result would completely drop S*.



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