My Project
TargetAndABI.h
Go to the documentation of this file.
1 //===- TargetAndABI.h - SPIR-V target and ABI utilities --------*- C++ -*-===//
2 //
3 // Part of the MLIR Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares utilities for SPIR-V target and shader interface ABI.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef MLIR_DIALECT_SPIRV_TARGETANDABI_H
14 #define MLIR_DIALECT_SPIRV_TARGETANDABI_H
15 
16 #include "mlir/IR/Attributes.h"
17 #include "mlir/Support/LLVM.h"
18 
19 namespace mlir {
20 class OpBuilder;
21 class Operation;
22 class Value;
23 
24 // Pull in SPIR-V attribute definitions.
25 #include "mlir/Dialect/SPIRV/TargetAndABI.h.inc"
26 
27 namespace spirv {
28 enum class StorageClass : uint32_t;
29 
31 StringRef getInterfaceVarABIAttrName();
32 
34 InterfaceVarABIAttr getInterfaceVarABIAttr(unsigned descriptorSet,
35  unsigned binding,
36  StorageClass storageClass,
37  MLIRContext *context);
38 
40 StringRef getEntryPointABIAttrName();
41 
43 EntryPointABIAttr getEntryPointABIAttr(ArrayRef<int32_t> localSize,
44  MLIRContext *context);
45 } // namespace spirv
46 } // namespace mlir
47 
48 #endif // MLIR_DIALECT_SPIRV_TARGETANDABI_H
Definition: InferTypeOpInterface.cpp:20
StringRef getEntryPointABIAttrName()
Attribute name for specifying entry point information.
Definition: TargetAndABI.cpp:34
enum StorageClass uint32_t StringRef getInterfaceVarABIAttrName()
Attribute name for specifying argument ABI information.
Definition: TargetAndABI.cpp:19
EntryPointABIAttr getEntryPointABIAttr(ArrayRef< int32_t > localSize, MLIRContext *context)
Get the EntryPointABIAttr given its fields.
Definition: TargetAndABI.cpp:39
InterfaceVarABIAttr getInterfaceVarABIAttr(unsigned descriptorSet, unsigned binding, StorageClass storageClass, MLIRContext *context)
Get the InterfaceVarABIAttr given its fields.