[all-commits] [llvm/llvm-project] 3f2275: [DirectX] Lower `@llvm.dx.typedBufferLoad` to DXIL...

Justin Bogner via All-commits all-commits at lists.llvm.org
Mon Sep 9 13:21:43 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3f22756f391e20040fa3581206b77c409433bd9f
      https://github.com/llvm/llvm-project/commit/3f22756f391e20040fa3581206b77c409433bd9f
  Author: Justin Bogner <mail at justinbogner.com>
  Date:   2024-09-09 (Mon, 09 Sep 2024)

  Changed paths:
    M llvm/docs/DirectX/DXILResources.rst
    M llvm/include/llvm/IR/IntrinsicsDirectX.td
    M llvm/lib/Target/DirectX/DXIL.td
    M llvm/lib/Target/DirectX/DXILOpBuilder.cpp
    M llvm/lib/Target/DirectX/DXILOpBuilder.h
    M llvm/lib/Target/DirectX/DXILOpLowering.cpp
    A llvm/test/CodeGen/DirectX/BufferLoad.ll
    M llvm/utils/TableGen/DXILEmitter.cpp

  Log Message:
  -----------
  [DirectX] Lower `@llvm.dx.typedBufferLoad` to DXIL ops

The `@llvm.dx.typedBufferLoad` intrinsic is lowered to `@dx.op.bufferLoad`.
There's some complexity here in translating to scalarized IR, which I've
abstracted out into a function that should be useful for samples, gathers, and
CBuffer loads.

I've also updated the DXILResources.rst docs to match what I'm doing here and
the proposal in llvm/wg-hlsl#59. I've removed the content about stores and raw
buffers for now with the expectation that it will be added along with the work.

Note that this change includes a bit of a hack in how it deals with
`getOverloadKind` for the `dx.ResRet` types - we need to adjust how we deal
with operation overloads to generate a table directly rather than proxy through
the OverloadKind enum, but that's left for a later change here.

Part of #91367

Pull Request: https://github.com/llvm/llvm-project/pull/104252



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