[all-commits] [llvm/llvm-project] 90b7fe: [HLSL] Remove `__builtin_hlsl_create_handle` (#109...

Helena Kotas via All-commits all-commits at lists.llvm.org
Thu Sep 26 13:57:10 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 90b7fe42d8e6f8647ce9279d6d026c36ccfcbb8f
      https://github.com/llvm/llvm-project/commit/90b7fe42d8e6f8647ce9279d6d026c36ccfcbb8f
  Author: Helena Kotas <hekotas at microsoft.com>
  Date:   2024-09-26 (Thu, 26 Sep 2024)

  Changed paths:
    M clang/include/clang/Basic/Builtins.td
    M clang/lib/Sema/HLSLExternalSemaSource.cpp
    M clang/test/AST/HLSL/RWBuffer-AST.hlsl
    M clang/test/AST/HLSL/StructuredBuffer-AST.hlsl
    M clang/test/CodeGenHLSL/builtins/RWBuffer-constructor.hlsl
    M clang/test/CodeGenHLSL/builtins/StructuredBuffer-constructor.hlsl
    R clang/test/CodeGenHLSL/builtins/create_handle.hlsl
    M clang/test/ParserHLSL/hlsl_resource_handle_attrs.hlsl
    M llvm/include/llvm/IR/IntrinsicsDirectX.td
    M llvm/include/llvm/IR/IntrinsicsSPIRV.td
    M llvm/unittests/IR/IntrinsicsTest.cpp

  Log Message:
  -----------
  [HLSL] Remove `__builtin_hlsl_create_handle` (#109910)

The `__builtin_hlsl_create_handle` called from the constructor of
resource buffer class was supposed to initialize the resource handle
based on resource type and registry binding information. It is not
possible to do though that because the registry binding information is
not accessible from the constructor during codegen.

Instead, the handle should be initialized to an empty or null handle
with something like `__builtin_hlsl_create_null_handle`. This PR is
removing `__builtin_hlsl_create_handle` first and the
`__builtin_hlsl_create_null_handle` will be added to the constructor
once the handle type changes to `__hlsl_resource_t` and
HLSLAttributeResourceType is updated to be a canonical type, which will
allow the initialization assignment.

The actual handle initialization based on the registry binding will be
implemented part 2/2 of llvm/llvm-project#105076 once the dependent
tasks are completed.

Part 1/2 of llvm/llvm-project#105076.



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