[all-commits] [llvm/llvm-project] 011b61: [DXIL] Define and generate `DXILAttribute` and `DX...

Finn Plummer via All-commits all-commits at lists.llvm.org
Tue Jan 21 17:34:06 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 011b618644113996e2c0a8e57db40f89d20878e3
      https://github.com/llvm/llvm-project/commit/011b618644113996e2c0a8e57db40f89d20878e3
  Author: Finn Plummer <50529406+inbelic at users.noreply.github.com>
  Date:   2025-01-21 (Tue, 21 Jan 2025)

  Changed paths:
    M llvm/lib/Target/DirectX/DXIL.td
    M llvm/lib/Target/DirectX/DXILConstants.h
    M llvm/lib/Target/DirectX/DXILOpBuilder.cpp
    M llvm/test/CodeGen/DirectX/BufferLoad.ll
    M llvm/test/CodeGen/DirectX/BufferStore.ll
    M llvm/test/CodeGen/DirectX/CreateHandle.ll
    M llvm/test/CodeGen/DirectX/CreateHandleFromBinding.ll
    M llvm/test/CodeGen/DirectX/WaveActiveAllTrue.ll
    M llvm/test/CodeGen/DirectX/WaveActiveAnyTrue.ll
    M llvm/test/CodeGen/DirectX/WaveActiveCountBits.ll
    M llvm/test/CodeGen/DirectX/WaveGetLaneIndex.ll
    M llvm/test/CodeGen/DirectX/WaveReadLaneAt-vec.ll
    M llvm/test/CodeGen/DirectX/WaveReadLaneAt.ll
    M llvm/test/CodeGen/DirectX/abs.ll
    M llvm/test/CodeGen/DirectX/acos.ll
    M llvm/test/CodeGen/DirectX/asin.ll
    M llvm/test/CodeGen/DirectX/atan.ll
    M llvm/test/CodeGen/DirectX/bufferUpdateCounter.ll
    M llvm/test/CodeGen/DirectX/ceil.ll
    M llvm/test/CodeGen/DirectX/comput_ids.ll
    M llvm/test/CodeGen/DirectX/cos.ll
    M llvm/test/CodeGen/DirectX/cosh.ll
    M llvm/test/CodeGen/DirectX/countbits.ll
    M llvm/test/CodeGen/DirectX/dot4add_i8packed.ll
    M llvm/test/CodeGen/DirectX/dot4add_u8packed.ll
    M llvm/test/CodeGen/DirectX/exp.ll
    M llvm/test/CodeGen/DirectX/fdot.ll
    M llvm/test/CodeGen/DirectX/firstbithigh.ll
    M llvm/test/CodeGen/DirectX/floor.ll
    M llvm/test/CodeGen/DirectX/fmad.ll
    M llvm/test/CodeGen/DirectX/fmax.ll
    M llvm/test/CodeGen/DirectX/fmin.ll
    M llvm/test/CodeGen/DirectX/frac.ll
    M llvm/test/CodeGen/DirectX/idot.ll
    M llvm/test/CodeGen/DirectX/imad.ll
    M llvm/test/CodeGen/DirectX/isinf.ll
    M llvm/test/CodeGen/DirectX/log.ll
    M llvm/test/CodeGen/DirectX/log10.ll
    M llvm/test/CodeGen/DirectX/log2.ll
    M llvm/test/CodeGen/DirectX/reversebits.ll
    M llvm/test/CodeGen/DirectX/round.ll
    M llvm/test/CodeGen/DirectX/rsqrt.ll
    M llvm/test/CodeGen/DirectX/saturate.ll
    M llvm/test/CodeGen/DirectX/sin.ll
    M llvm/test/CodeGen/DirectX/sinh.ll
    M llvm/test/CodeGen/DirectX/smax.ll
    M llvm/test/CodeGen/DirectX/smin.ll
    M llvm/test/CodeGen/DirectX/splitdouble.ll
    M llvm/test/CodeGen/DirectX/sqrt.ll
    M llvm/test/CodeGen/DirectX/tan.ll
    M llvm/test/CodeGen/DirectX/tanh.ll
    M llvm/test/CodeGen/DirectX/trunc.ll
    M llvm/test/CodeGen/DirectX/umad.ll
    M llvm/test/CodeGen/DirectX/umax.ll
    M llvm/test/CodeGen/DirectX/umin.ll
    M llvm/test/CodeGen/DirectX/wave_is_first_lane.ll
    M llvm/utils/TableGen/DXILEmitter.cpp

  Log Message:
  -----------
  [DXIL] Define and generate `DXILAttribute` and `DXILProperty` (#117072)

- Redefines `DXILAttribute` to denote a function attribute, compatible
to how it was define in DXC/LLVM 3.7
- Fix how `DXILAttribute` is emitted to be a struct of set attributes
instead of an "or" of the enums
- Implement the lowering of `DXILAttribute` to LLVM function attributes
in `DXILOpBuilder.cpp`. A custom mapping is defined.
- Audit all current ops to specify the correct attributes consistent
with DXC. This is done here to allow for testing.
- Update testcases in `llvm/test/CodeGen/DirectX` of all ops with
attributes to match that attributes are set
- Update testcases of ops that had previously incorrectly set attributes
to check there is no attributes set
- Defines `DXILProperty` to denote the other type of attributes from DXC
used to query properties.
- Emit `DXILProperty` as a struct of set attributes.
- Updates `DXIL.td` to specify applicable `DXILProperty`s on ops

Note: `DXILProperty` was referred to as 'queryable attributes' in design
discussion. Changed to property to allow for better expression in
`DXIL.td`

Resolves #114461
Resolves #115912



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