9#ifndef LLVM_ANALYSIS_DXILRESOURCE_H
10#define LLVM_ANALYSIS_DXILRESOURCE_H
21 struct ResourceBinding {
28 return std::tie(UniqueID, Space, LowerBound, Size) ==
29 std::tie(
RHS.UniqueID,
RHS.Space,
RHS.LowerBound,
RHS.Size);
32 return !(*
this ==
RHS);
37 bool GloballyCoherent;
42 return std::tie(GloballyCoherent, HasCounter, IsROV) ==
43 std::tie(
RHS.GloballyCoherent,
RHS.HasCounter,
RHS.IsROV);
53 return std::tie(Stride, Alignment) == std::tie(
RHS.Stride,
RHS.Alignment);
64 std::tie(
RHS.ElementTy,
RHS.ElementCount);
90 ResourceBinding Binding = {};
111 bool isCBuffer()
const;
112 bool isSampler()
const;
113 bool isStruct()
const;
114 bool isTyped()
const;
115 bool isFeedback()
const;
116 bool isMultiSample()
const;
120 : Symbol(Symbol), Name(Name), RC(RC), Kind(Kind) {}
139 bool GloballyCoherent,
bool IsROV,
142 bool GloballyCoherent,
bool IsROV);
145 Align Alignment,
bool GloballyCoherent,
146 bool IsROV,
bool HasCounter);
150 bool GloballyCoherent);
155 bool GloballyCoherent);
169 Binding.UniqueID = UniqueID;
170 Binding.Space = Space;
171 Binding.LowerBound = LowerBound;
This is an important class for using LLVM in a threaded context.
StringRef - Represent a constant reference to a string, i.e.
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
void bind(uint32_t UniqueID, uint32_t Space, uint32_t LowerBound, uint32_t Size)
static ResourceInfo RWTexture2DMS(Value *Symbol, StringRef Name, dxil::ElementType ElementTy, uint32_t ElementCount, uint32_t SampleCount, bool GloballyCoherent)
static ResourceInfo RWStructuredBuffer(Value *Symbol, StringRef Name, uint32_t Stride, Align Alignment, bool GloballyCoherent, bool IsROV, bool HasCounter)
std::pair< uint32_t, uint32_t > getAnnotateProps() const
static ResourceInfo RWRawBuffer(Value *Symbol, StringRef Name, bool GloballyCoherent, bool IsROV)
dxil::SamplerType SamplerTy
static ResourceInfo RWTexture2DMSArray(Value *Symbol, StringRef Name, dxil::ElementType ElementTy, uint32_t ElementCount, uint32_t SampleCount, bool GloballyCoherent)
MDTuple * getAsMetadata(LLVMContext &Ctx) const
ResourceBinding getBinding() const
ResourceKind
The kind of resource for an SRV or UAV resource.
ElementType
The element type of an SRV or UAV resource.
This is an optimization pass for GlobalISel generic memory operations.
bool operator!=(uint64_t V1, const APInt &V2)
bool operator==(const AddressRangeValuePair &LHS, const AddressRangeValuePair &RHS)
This struct is a compact representation of a valid (non-zero power of two) alignment.