6 Commits

Author SHA1 Message Date
Damyan Pepper
24b6b82487
[NFC] Add llvm_unreachable to getRCPrefix (#106822) 2024-09-03 10:54:57 -07:00
Justin Bogner
87157ab0f6
[DirectX] Add resource handling to the DXIL pretty printer
Handle target extension type resources when printing resources to textual IR.

Pull Request: https://github.com/llvm/llvm-project/pull/104448
2024-08-26 17:42:24 -07:00
Justin Bogner
58eec851cb
[DirectX] Move resource logic into PrettyPrinter and TranslateMetadata. NFC
Move the module level logic for resources into the pretty printer and translate
metadata passes rather than embedding them in the DXILResource helper. This
will make it easier to migrate towards the target extension type based approach
to resources.

Pull Request: https://github.com/llvm/llvm-project/pull/104446
2024-08-26 16:44:41 -07:00
Justin Bogner
81ee38551f
[DirectX] Register a few DXIL passes with the new PM
This wires up dxil-op-lower, dxil-intrinsic-expansion, dxil-translate-metadata,
and dxil-pretty-printer to the new pass manager, both as a matter of future
proofing the backend and so that they can be used more flexibly in tests.

A few arbitrary tests are updated in order to test the new PM path, and we drop
the "print-dxil-resource-md" pass since it's redundant with the pretty printer.

Pull Request: https://github.com/llvm/llvm-project/pull/104250
2024-08-20 16:33:25 -07:00
Justin Bogner
1c5f6cfc35
[DirectX] Rename backend DXIL resource analysis passes to DXILResourceMD*. NFC
These passes will be replaced soon as we move to the target extension based
resource handling in the DirectX backend, but removing them now before the
replacement stuff is all up and running would be very disruptive. However, we
do need to move these passes out of the way to avoid symbol conflicts with the
new DXILResourceAnalysis in the Analysis library.

Note: I tried an even simpler hack in #100698 but it doesn't really work. A
rename is the most expedient path forward here.

Pull Request: https://github.com/llvm/llvm-project/pull/101393
2024-07-31 17:29:15 -07:00
Chris Bieneman
e530a1188e [DX] Add pass to pretty-print DXIL metadata in asm
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.

Reviewed By: python3kgae

Differential Revision: https://reviews.llvm.org/D135802
2022-10-14 13:32:59 -05:00