3 Commits

Author SHA1 Message Date
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
daa79232f7
[DirectX] Implement metadata lowering for resources
Generate metadata from target extension type based resources.

Part of #91366

Pull Request: https://github.com/llvm/llvm-project/pull/104447
2024-08-26 17:19:15 -07:00
Justin Bogner
aa61925eac
[DirectX] Lower @llvm.dx.handle.fromBinding to DXIL ops
The `@llvm.dx.handle.fromBinding` intrinsic is lowered either to the
`CreateHandle` op or a pair of `CreateHandleFromBinding` and `AnnotateHandle`
ops, depending on the DXIL version. Regardless of the DXIL version we need to
emit metadata about the binding, but that's left to a separate change.

These DXIL ops all need to return the `%dx.types.Handle` type, but the llvm
intrinsic returns a target extension type. To facilitate changing the type of
the operation and all of its users, we introduce `%llvm.dx.cast.handle`, which
can cast between the two handle representations.

Pull Request: https://github.com/llvm/llvm-project/pull/104251
2024-08-23 12:58:12 -07:00