LLVM 20.0.0git
DXILConstants.h
Go to the documentation of this file.
1//===- DXILConstants.h - Essential DXIL constants -------------------------===//
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/// \file This file contains essential DXIL constants.
10//===----------------------------------------------------------------------===//
11
12#ifndef LLVM_LIB_TARGET_DIRECTX_DXILCONSTANTS_H
13#define LLVM_LIB_TARGET_DIRECTX_DXILCONSTANTS_H
14
15namespace llvm {
16namespace dxil {
17
18enum class OpCode : unsigned {
19#define DXIL_OPCODE(Op, Name) Name = Op,
20#include "DXILOperation.inc"
21};
22
23enum class OpCodeClass : unsigned {
24#define DXIL_OPCLASS(Name) Name,
25#include "DXILOperation.inc"
26};
27
28enum class OpParamType : unsigned {
29#define DXIL_OP_PARAM_TYPE(Name) Name,
30#include "DXILOperation.inc"
31};
32
33struct Attributes {
34#define DXIL_ATTRIBUTE(Name) bool Name = false;
35#include "DXILOperation.inc"
36};
37
39 Attributes c;
40#define DXIL_ATTRIBUTE(Name) c.Name = a.Name | b.Name;
41#include "DXILOperation.inc"
42 return c;
43}
44
46 a = a | b;
47 return a;
48}
49
50struct Properties {
51#define DXIL_PROPERTY(Name) bool Name = false;
52#include "DXILOperation.inc"
53};
54
55} // namespace dxil
56} // namespace llvm
57
58#endif
Attributes operator|(Attributes a, Attributes b)
Definition: DXILConstants.h:38
Attributes & operator|=(Attributes &a, Attributes &b)
Definition: DXILConstants.h:45
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18