[all-commits] [llvm/llvm-project] fb4ce4: [DirectX] Add DXILDebugInfo pass (#191254)

Harald van Dijk via All-commits all-commits at lists.llvm.org
Mon Apr 27 10:17:06 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fb4ce472adb9f65acb150d4e2db5446524458b90
      https://github.com/llvm/llvm-project/commit/fb4ce472adb9f65acb150d4e2db5446524458b90
  Author: Harald van Dijk <hdijk at accesssoftek.com>
  Date:   2026-04-27 (Mon, 27 Apr 2026)

  Changed paths:
    M llvm/lib/Target/DirectX/CMakeLists.txt
    M llvm/lib/Target/DirectX/DXILWriter/CMakeLists.txt
    M llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp
    M llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.h
    M llvm/lib/Target/DirectX/DXILWriter/DXILValueEnumerator.cpp
    M llvm/lib/Target/DirectX/DXILWriter/DXILValueEnumerator.h
    M llvm/lib/Target/DirectX/DXILWriter/DXILWriterPass.cpp
    M llvm/lib/Target/DirectX/DirectXIRPasses/CMakeLists.txt
    A llvm/lib/Target/DirectX/DirectXIRPasses/DXILDebugInfo.cpp
    A llvm/lib/Target/DirectX/DirectXIRPasses/DXILDebugInfo.h
    M llvm/unittests/Target/DirectX/CMakeLists.txt

  Log Message:
  -----------
  [DirectX] Add DXILDebugInfo pass (#191254)

The pass is enabled for DXILBitcodeWriter and ValueEnumerator to
transform LLVM IR and provide data required to lower it to DXIL.

There are 3 ways how DXILDebugInfo pass can change lowering to DXIL:

1. Transform LLVM IR directly in DXILDebugInfoPass::run. This works well
when the target IR does not break any invariants of LLVM IR.

2. Add extra metadata for ValueEnumerator to process with MDExtra map.
When ValueEnumerator enumerates a Key of MDExtra, it also follows the
Value and all its operands.

3. Replace a metadata for ValueEnumerator with a another metadata. When
ValueEnumerator enumerates a Key of MDReplace, or when the writer uses
getMetadataID, the corresponding value of MDReplace map is returned
instead.

Co-authored-by: Andrew Savonichev <andrew.savonichev at gmail.com>



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