LLVM 18.0.0git
DXILOperationCommon.h
Go to the documentation of this file.
1//===-- DXILOperationCommon.h - DXIL Operation ------------------*- C++ -*-===//
2//
3// Part of the LLVM 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 is created to share common definitions used by both the
10// DXILOpBuilder and the table
11// generator.
12// Documentation for DXIL can be found in
13// https://github.com/Microsoft/DirectXShaderCompiler/blob/main/docs/DXIL.rst.
14//
15//===----------------------------------------------------------------------===//
16
17#ifndef LLVM_SUPPORT_DXILOPERATIONCOMMON_H
18#define LLVM_SUPPORT_DXILOPERATIONCOMMON_H
19
21
22namespace llvm {
23namespace dxil {
24
25enum class ParameterKind : uint8_t {
26 INVALID = 0,
27 VOID,
28 HALF,
29 FLOAT,
30 DOUBLE,
31 I1,
32 I8,
33 I16,
34 I32,
35 I64,
40};
41
46 .Case("float", ParameterKind::FLOAT)
47 .Case("double", ParameterKind::DOUBLE)
54 .Case("dx.types.Handle", ParameterKind::DXIL_HANDLE)
55 .Case("dx.types.CBufRet", ParameterKind::CBUFFER_RET)
56 .Case("dx.types.ResRet", ParameterKind::RESOURCE_RET)
58}
59
60} // namespace dxil
61} // namespace llvm
62
63#endif
std::string Name
This file implements the StringSwitch template, which mimics a switch() statement whose cases are str...
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
A switch()-like statement whose cases are string literals.
Definition: StringSwitch.h:44
StringSwitch & Case(StringLiteral S, T Value)
Definition: StringSwitch.h:69
R Default(T Value)
Definition: StringSwitch.h:182
ParameterKind parameterTypeNameToKind(StringRef Name)
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18