[all-commits] [llvm/llvm-project] 3b57b6: [HLSL][SPIR-V] Add create.handle intrinsic (#81038)

Natalie Chouinard via All-commits all-commits at lists.llvm.org
Thu Feb 8 11:35:55 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3b57b647a9bb821137f91dfbc2172a9947f620cc
      https://github.com/llvm/llvm-project/commit/3b57b647a9bb821137f91dfbc2172a9947f620cc
  Author: Natalie Chouinard <sudonatalie at google.com>
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
    M clang/lib/Basic/Targets/SPIR.h
    M clang/test/CodeGenHLSL/builtins/RWBuffer-constructor.hlsl
    M llvm/include/llvm/IR/IntrinsicsSPIRV.td
    M llvm/lib/IR/Function.cpp
    M llvm/lib/TargetParser/Triple.cpp

  Log Message:
  -----------
  [HLSL][SPIR-V] Add create.handle intrinsic (#81038)

Add a SPIR-V target-specific intrinsic for creating handles, which is
used for lowering HLSL resources types like RWBuffer.

`llvm/lib/TargetParser/Triple.cpp`: SPIR-V intrinsics use "spv" as the
target prefix, not "spirv". As far as I can tell, this is the first one
that is used via the `CGBuiltin` codepath, which relies on
`getArchTypePrefix`, so I've corrected it here.

`clang/lib/Basic/Targets/SPIR.h`: When records are laid out in the
lowering from AST to IR, they were incorrectly offset because these
Pointer attributes were defaulting to 32.

Related to #81036




More information about the All-commits mailing list