Files
Harald van Dijk fb4ce472ad [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@gmail.com>
2026-04-27 18:16:43 +01:00
..