This is an archive of the discontinued LLVM Phabricator instance.

[DX] Add pass to pretty-print DXIL metadata in asm
ClosedPublic

Authored by beanz on Oct 12 2022, 11:26 AM.

Details

Summary

When DXC prints IR output it adds a bunch of IR comments in a header
that describe the DXIL metadata in a more human-readable format. This
pass will serve that purpose for LLVM by printing out ahead of the IR
printer.

Diff Detail

Event Timeline

beanz created this revision.Oct 12 2022, 11:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 12 2022, 11:26 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
beanz requested review of this revision.Oct 12 2022, 11:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 12 2022, 11:26 AM
python3kgae accepted this revision.Oct 13 2022, 9:36 AM

LGTM.
Not sure if the format thing is important or not.

llvm/lib/Target/DirectX/DXILPrettyPrinter.cpp
3

Remove some --- so no extra line?

This revision is now accepted and ready to land.Oct 13 2022, 9:36 AM
This revision was automatically updated to reflect the committed changes.