aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorNatalie Chouinard <sudonatalie@google.com>2024-02-08 14:35:44 -0500
committerGitHub <noreply@github.com>2024-02-08 14:35:44 -0500
commit3b57b647a9bb821137f91dfbc2172a9947f620cc (patch)
treefd583345deedf7cee98c6aa7820c3400528fe57c /llvm/lib/IR/Function.cpp
parent35c4f025f9d4c398eff0c8e49a47a5c7067939ba (diff)
downloadllvm-3b57b647a9bb821137f91dfbc2172a9947f620cc.zip
llvm-3b57b647a9bb821137f91dfbc2172a9947f620cc.tar.gz
llvm-3b57b647a9bb821137f91dfbc2172a9947f620cc.tar.bz2
[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
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r--llvm/lib/IR/Function.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index 22e2455..fceffbc 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -44,6 +44,7 @@
#include "llvm/IR/IntrinsicsR600.h"
#include "llvm/IR/IntrinsicsRISCV.h"
#include "llvm/IR/IntrinsicsS390.h"
+#include "llvm/IR/IntrinsicsSPIRV.h"
#include "llvm/IR/IntrinsicsVE.h"
#include "llvm/IR/IntrinsicsWebAssembly.h"
#include "llvm/IR/IntrinsicsX86.h"