LLVM 20.0.0git
DXILResource.h
Go to the documentation of this file.
1//===- DXILResource.h - Representations of DXIL resources -------*- 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#ifndef LLVM_ANALYSIS_DXILRESOURCE_H
10#define LLVM_ANALYSIS_DXILRESOURCE_H
11
12#include "llvm/ADT/MapVector.h"
13#include "llvm/ADT/StringRef.h"
16#include "llvm/IR/PassManager.h"
17#include "llvm/Pass.h"
20
21namespace llvm {
22class CallInst;
23class DataLayout;
24class LLVMContext;
25class MDTuple;
26class Value;
27
28class DXILResourceTypeMap;
29
30namespace dxil {
31
32/// The dx.RawBuffer target extension type
33///
34/// `target("dx.RawBuffer", Type, IsWriteable, IsROV)`
36public:
37 RawBufferExtType() = delete;
40
41 bool isStructured() const {
42 // TODO: We need to be more prescriptive here, but since there's some debate
43 // over whether byte address buffer should have a void type or an i8 type,
44 // accept either for now.
45 Type *Ty = getTypeParameter(0);
46 return !Ty->isVoidTy() && !Ty->isIntegerTy(8);
47 }
48
50 return isStructured() ? getTypeParameter(0) : nullptr;
51 }
52 bool isWriteable() const { return getIntParameter(0); }
53 bool isROV() const { return getIntParameter(1); }
54
55 static bool classof(const TargetExtType *T) {
56 return T->getName() == "dx.RawBuffer";
57 }
58 static bool classof(const Type *T) {
59 return isa<TargetExtType>(T) && classof(cast<TargetExtType>(T));
60 }
61};
62
63/// The dx.TypedBuffer target extension type
64///
65/// `target("dx.TypedBuffer", Type, IsWriteable, IsROV, IsSigned)`
67public:
71
72 Type *getResourceType() const { return getTypeParameter(0); }
73 bool isWriteable() const { return getIntParameter(0); }
74 bool isROV() const { return getIntParameter(1); }
75 bool isSigned() const { return getIntParameter(2); }
76
77 static bool classof(const TargetExtType *T) {
78 return T->getName() == "dx.TypedBuffer";
79 }
80 static bool classof(const Type *T) {
81 return isa<TargetExtType>(T) && classof(cast<TargetExtType>(T));
82 }
83};
84
85/// The dx.Texture target extension type
86///
87/// `target("dx.Texture", Type, IsWriteable, IsROV, IsSigned, Dimension)`
89public:
90 TextureExtType() = delete;
91 TextureExtType(const TextureExtType &) = delete;
93
94 Type *getResourceType() const { return getTypeParameter(0); }
95 bool isWriteable() const { return getIntParameter(0); }
96 bool isROV() const { return getIntParameter(1); }
97 bool isSigned() const { return getIntParameter(2); }
99 return static_cast<dxil::ResourceKind>(getIntParameter(3));
100 }
101
102 static bool classof(const TargetExtType *T) {
103 return T->getName() == "dx.Texture";
104 }
105 static bool classof(const Type *T) {
106 return isa<TargetExtType>(T) && classof(cast<TargetExtType>(T));
107 }
108};
109
110/// The dx.MSTexture target extension type
111///
112/// `target("dx.MSTexture", Type, IsWriteable, Samples, IsSigned, Dimension)`
114public:
118
119 Type *getResourceType() const { return getTypeParameter(0); }
120 bool isWriteable() const { return getIntParameter(0); }
122 bool isSigned() const { return getIntParameter(2); }
124 return static_cast<dxil::ResourceKind>(getIntParameter(3));
125 }
126
127 static bool classof(const TargetExtType *T) {
128 return T->getName() == "dx.MSTexture";
129 }
130 static bool classof(const Type *T) {
131 return isa<TargetExtType>(T) && classof(cast<TargetExtType>(T));
132 }
133};
134
135/// The dx.FeedbackTexture target extension type
136///
137/// `target("dx.FeedbackTexture", FeedbackType, Dimension)`
139public:
143
145 return static_cast<dxil::SamplerFeedbackType>(getIntParameter(0));
146 }
148 return static_cast<dxil::ResourceKind>(getIntParameter(1));
149 }
150
151 static bool classof(const TargetExtType *T) {
152 return T->getName() == "dx.FeedbackTexture";
153 }
154 static bool classof(const Type *T) {
155 return isa<TargetExtType>(T) && classof(cast<TargetExtType>(T));
156 }
157};
158
159/// The dx.CBuffer target extension type
160///
161/// `target("dx.CBuffer", <Type>, ...)`
163public:
164 CBufferExtType() = delete;
167
168 Type *getResourceType() const { return getTypeParameter(0); }
170
171 static bool classof(const TargetExtType *T) {
172 return T->getName() == "dx.CBuffer";
173 }
174 static bool classof(const Type *T) {
175 return isa<TargetExtType>(T) && classof(cast<TargetExtType>(T));
176 }
177};
178
179/// The dx.Sampler target extension type
180///
181/// `target("dx.Sampler", SamplerType)`
183public:
184 SamplerExtType() = delete;
187
189 return static_cast<dxil::SamplerType>(getIntParameter(0));
190 }
191
192 static bool classof(const TargetExtType *T) {
193 return T->getName() == "dx.Sampler";
194 }
195 static bool classof(const Type *T) {
196 return isa<TargetExtType>(T) && classof(cast<TargetExtType>(T));
197 }
198};
199
200//===----------------------------------------------------------------------===//
201
203public:
204 struct UAVInfo {
207 bool IsROV;
208
209 bool operator==(const UAVInfo &RHS) const {
210 return std::tie(GloballyCoherent, HasCounter, IsROV) ==
211 std::tie(RHS.GloballyCoherent, RHS.HasCounter, RHS.IsROV);
212 }
213 bool operator!=(const UAVInfo &RHS) const { return !(*this == RHS); }
214 bool operator<(const UAVInfo &RHS) const {
215 return std::tie(GloballyCoherent, HasCounter, IsROV) <
216 std::tie(RHS.GloballyCoherent, RHS.HasCounter, RHS.IsROV);
217 }
218 };
219
220 struct StructInfo {
222 // Note: we store an integer here rather than using `MaybeAlign` because in
223 // GCC 7 MaybeAlign isn't trivial so having one in this union would delete
224 // our move constructor.
225 // See https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0602r4.html
227
228 bool operator==(const StructInfo &RHS) const {
229 return std::tie(Stride, AlignLog2) == std::tie(RHS.Stride, RHS.AlignLog2);
230 }
231 bool operator!=(const StructInfo &RHS) const { return !(*this == RHS); }
232 bool operator<(const StructInfo &RHS) const {
233 return std::tie(Stride, AlignLog2) < std::tie(RHS.Stride, RHS.AlignLog2);
234 }
235 };
236
237 struct TypedInfo {
240
241 bool operator==(const TypedInfo &RHS) const {
242 return std::tie(ElementTy, ElementCount) ==
243 std::tie(RHS.ElementTy, RHS.ElementCount);
244 }
245 bool operator!=(const TypedInfo &RHS) const { return !(*this == RHS); }
246 bool operator<(const TypedInfo &RHS) const {
247 return std::tie(ElementTy, ElementCount) <
248 std::tie(RHS.ElementTy, RHS.ElementCount);
249 }
250 };
251
252private:
253 TargetExtType *HandleTy;
254
255 // GloballyCoherent and HasCounter aren't really part of the type and need to
256 // be determined by analysis, so they're just provided directly by the
257 // DXILResourceTypeMap when we construct these.
258 bool GloballyCoherent;
259 bool HasCounter;
260
263
264public:
266 const dxil::ResourceKind Kind, bool GloballyCoherent = false,
267 bool HasCounter = false);
268 ResourceTypeInfo(TargetExtType *HandleTy, bool GloballyCoherent = false,
269 bool HasCounter = false)
271 GloballyCoherent, HasCounter) {}
272
273 TargetExtType *getHandleTy() const { return HandleTy; }
275
276 // Conditions to check before accessing specific views.
277 bool isUAV() const;
278 bool isCBuffer() const;
279 bool isSampler() const;
280 bool isStruct() const;
281 bool isTyped() const;
282 bool isFeedback() const;
283 bool isMultiSample() const;
284
285 // Views into the type.
286 UAVInfo getUAV() const;
287 uint32_t getCBufferSize(const DataLayout &DL) const;
289 StructInfo getStruct(const DataLayout &DL) const;
290 TypedInfo getTyped() const;
293
295 dxil::ResourceKind getResourceKind() const { return Kind; }
296
297 void setGloballyCoherent(bool V) { GloballyCoherent = V; }
298 void setHasCounter(bool V) { HasCounter = V; }
299
300 bool operator==(const ResourceTypeInfo &RHS) const;
301 bool operator!=(const ResourceTypeInfo &RHS) const { return !(*this == RHS); }
302 bool operator<(const ResourceTypeInfo &RHS) const;
303
304 void print(raw_ostream &OS, const DataLayout &DL) const;
305};
306
307//===----------------------------------------------------------------------===//
308
310public:
316
317 bool operator==(const ResourceBinding &RHS) const {
318 return std::tie(RecordID, Space, LowerBound, Size) ==
319 std::tie(RHS.RecordID, RHS.Space, RHS.LowerBound, RHS.Size);
320 }
321 bool operator!=(const ResourceBinding &RHS) const {
322 return !(*this == RHS);
323 }
324 bool operator<(const ResourceBinding &RHS) const {
325 return std::tie(RecordID, Space, LowerBound, Size) <
326 std::tie(RHS.RecordID, RHS.Space, RHS.LowerBound, RHS.Size);
327 }
328 };
329
330private:
331 ResourceBinding Binding;
332 TargetExtType *HandleTy;
333 GlobalVariable *Symbol = nullptr;
334
335public:
336 ResourceBindingInfo(uint32_t RecordID, uint32_t Space, uint32_t LowerBound,
337 uint32_t Size, TargetExtType *HandleTy,
338 GlobalVariable *Symbol = nullptr)
339 : Binding{RecordID, Space, LowerBound, Size}, HandleTy(HandleTy),
340 Symbol(Symbol) {}
341
342 void setBindingID(unsigned ID) { Binding.RecordID = ID; }
343
344 const ResourceBinding &getBinding() const { return Binding; }
345 TargetExtType *getHandleTy() const { return HandleTy; }
346 const StringRef getName() const { return Symbol ? Symbol->getName() : ""; }
347
348 bool hasSymbol() const { return Symbol; }
351
352 std::pair<uint32_t, uint32_t>
354
355 bool operator==(const ResourceBindingInfo &RHS) const {
356 return std::tie(Binding, HandleTy, Symbol) ==
357 std::tie(RHS.Binding, RHS.HandleTy, RHS.Symbol);
358 }
359 bool operator!=(const ResourceBindingInfo &RHS) const {
360 return !(*this == RHS);
361 }
362 bool operator<(const ResourceBindingInfo &RHS) const {
363 return Binding < RHS.Binding;
364 }
365
367 const DataLayout &DL) const;
368};
369
370} // namespace dxil
371
372//===----------------------------------------------------------------------===//
373
376
377public:
378 bool invalidate(Module &M, const PreservedAnalyses &PA,
380
382 auto It = Infos.find(Ty);
383 if (It != Infos.end())
384 return It->second;
385 auto [NewIt, Inserted] = Infos.try_emplace(Ty, Ty);
386 return NewIt->second;
387 }
388};
389
391 : public AnalysisInfoMixin<DXILResourceTypeAnalysis> {
393
394 static AnalysisKey Key;
395
396public:
398
400 // Running the pass just generates an empty map, which will be filled when
401 // users of the pass query the results.
402 return Result();
403 }
404};
405
408
409 virtual void anchor();
410
411public:
412 static char ID;
414
416 const DXILResourceTypeMap &getResourceTypeMap() const { return DRTM; }
417};
418
420
421//===----------------------------------------------------------------------===//
422
426 unsigned FirstUAV = 0;
427 unsigned FirstCBuffer = 0;
428 unsigned FirstSampler = 0;
429
430 /// Populate the map given the resource binding calls in the given module.
431 void populate(Module &M, DXILResourceTypeMap &DRTM);
432
433public:
436
437 iterator begin() { return Infos.begin(); }
438 const_iterator begin() const { return Infos.begin(); }
439 iterator end() { return Infos.end(); }
440 const_iterator end() const { return Infos.end(); }
441
442 bool empty() const { return Infos.empty(); }
443
444 iterator find(const CallInst *Key) {
445 auto Pos = CallMap.find(Key);
446 return Pos == CallMap.end() ? Infos.end() : (Infos.begin() + Pos->second);
447 }
448
449 const_iterator find(const CallInst *Key) const {
450 auto Pos = CallMap.find(Key);
451 return Pos == CallMap.end() ? Infos.end() : (Infos.begin() + Pos->second);
452 }
453
454 iterator srv_begin() { return begin(); }
455 const_iterator srv_begin() const { return begin(); }
456 iterator srv_end() { return begin() + FirstUAV; }
457 const_iterator srv_end() const { return begin() + FirstUAV; }
460 return make_range(srv_begin(), srv_end());
461 }
462
463 iterator uav_begin() { return begin() + FirstUAV; }
464 const_iterator uav_begin() const { return begin() + FirstUAV; }
465 iterator uav_end() { return begin() + FirstCBuffer; }
466 const_iterator uav_end() const { return begin() + FirstCBuffer; }
469 return make_range(uav_begin(), uav_end());
470 }
471
472 iterator cbuffer_begin() { return begin() + FirstCBuffer; }
473 const_iterator cbuffer_begin() const { return begin() + FirstCBuffer; }
474 iterator cbuffer_end() { return begin() + FirstSampler; }
475 const_iterator cbuffer_end() const { return begin() + FirstSampler; }
478 }
481 }
482
483 iterator sampler_begin() { return begin() + FirstSampler; }
484 const_iterator sampler_begin() const { return begin() + FirstSampler; }
485 iterator sampler_end() { return end(); }
486 const_iterator sampler_end() const { return end(); }
489 }
492 }
493
495 const DataLayout &DL) const;
496
499};
500
502 : public AnalysisInfoMixin<DXILResourceBindingAnalysis> {
504
505 static AnalysisKey Key;
506
507public:
509
510 /// Gather resource info for the module \c M.
512};
513
514/// Printer pass for the \c DXILResourceBindingAnalysis results.
516 : public PassInfoMixin<DXILResourceBindingPrinterPass> {
517 raw_ostream &OS;
518
519public:
521
523
524 static bool isRequired() { return true; }
525};
526
528 std::unique_ptr<DXILBindingMap> Map;
530
531public:
532 static char ID; // Class identification, replacement for typeinfo
533
536
537 const DXILBindingMap &getBindingMap() const { return *Map; }
538 DXILBindingMap &getBindingMap() { return *Map; }
539
540 void getAnalysisUsage(AnalysisUsage &AU) const override;
541 bool runOnModule(Module &M) override;
542 void releaseMemory() override;
543
544 void print(raw_ostream &OS, const Module *M) const override;
545 void dump() const;
546};
547
549
550} // namespace llvm
551
552#endif // LLVM_ANALYSIS_DXILRESOURCE_H
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
std::string Name
uint64_t Size
This header defines various interfaces for pass management in LLVM.
This file implements a map that provides insertion order iteration.
raw_pwrite_stream & OS
Value * RHS
API to communicate dependencies between analyses during invalidation.
Definition: PassManager.h:292
A container for analyses that lazily runs them and caches their results.
Definition: PassManager.h:253
Represent the analysis usage information of a pass.
This class represents a function call, abstracting a target machine's calling convention.
iterator_range< const_iterator > srvs() const
Definition: DXILResource.h:459
iterator_range< iterator > cbuffers()
Definition: DXILResource.h:476
iterator find(const CallInst *Key)
Definition: DXILResource.h:444
const_iterator sampler_end() const
Definition: DXILResource.h:486
iterator_range< const_iterator > samplers() const
Definition: DXILResource.h:490
void print(raw_ostream &OS, DXILResourceTypeMap &DRTM, const DataLayout &DL) const
const_iterator sampler_begin() const
Definition: DXILResource.h:484
iterator cbuffer_begin()
Definition: DXILResource.h:472
const_iterator begin() const
Definition: DXILResource.h:438
const_iterator cbuffer_end() const
Definition: DXILResource.h:475
const_iterator srv_begin() const
Definition: DXILResource.h:455
bool empty() const
Definition: DXILResource.h:442
iterator_range< iterator > srvs()
Definition: DXILResource.h:458
iterator sampler_end()
Definition: DXILResource.h:485
const_iterator find(const CallInst *Key) const
Definition: DXILResource.h:449
iterator_range< iterator > samplers()
Definition: DXILResource.h:487
iterator_range< const_iterator > uavs() const
Definition: DXILResource.h:468
iterator_range< const_iterator > cbuffers() const
Definition: DXILResource.h:479
const_iterator end() const
Definition: DXILResource.h:440
const_iterator uav_end() const
Definition: DXILResource.h:466
const_iterator cbuffer_begin() const
Definition: DXILResource.h:473
const_iterator srv_end() const
Definition: DXILResource.h:457
const_iterator uav_begin() const
Definition: DXILResource.h:464
iterator cbuffer_end()
Definition: DXILResource.h:474
iterator_range< iterator > uavs()
Definition: DXILResource.h:467
iterator sampler_begin()
Definition: DXILResource.h:483
DXILBindingMap run(Module &M, ModuleAnalysisManager &AM)
Gather resource info for the module M.
Printer pass for the DXILResourceBindingAnalysis results.
Definition: DXILResource.h:516
DXILResourceBindingPrinterPass(raw_ostream &OS)
Definition: DXILResource.h:520
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
bool runOnModule(Module &M) override
runOnModule - Virtual method overriden by subclasses to process the module being operated on.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
void print(raw_ostream &OS, const Module *M) const override
print - Print out the internal state of the pass.
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
const DXILBindingMap & getBindingMap() const
Definition: DXILResource.h:537
DXILResourceTypeMap run(Module &M, ModuleAnalysisManager &AM)
Definition: DXILResource.h:399
DXILResourceTypeMap Result
Definition: DXILResource.h:397
dxil::ResourceTypeInfo & operator[](TargetExtType *Ty)
Definition: DXILResource.h:381
bool invalidate(Module &M, const PreservedAnalyses &PA, ModuleAnalysisManager::Invalidator &Inv)
DXILResourceTypeMap & getResourceTypeMap()
Definition: DXILResource.h:415
const DXILResourceTypeMap & getResourceTypeMap() const
Definition: DXILResource.h:416
A parsed version of the target data layout string in and methods for querying it.
Definition: DataLayout.h:63
iterator find(const_arg_type_t< KeyT > Val)
Definition: DenseMap.h:156
std::pair< iterator, bool > try_emplace(KeyT &&Key, Ts &&...Args)
Definition: DenseMap.h:226
iterator end()
Definition: DenseMap.h:84
ImmutablePass class - This class is used to provide information that does not need to be run.
Definition: Pass.h:281
Tuple of metadata.
Definition: Metadata.h:1473
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
Definition: Pass.h:251
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
A set of analyses that are preserved following a run of a transformation pass.
Definition: Analysis.h:111
bool empty() const
Definition: SmallVector.h:81
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1196
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:51
Class to represent struct types.
Definition: DerivedTypes.h:218
Class to represent target extensions types, which are generally unintrospectable from target-independ...
Definition: DerivedTypes.h:744
Type * getTypeParameter(unsigned i) const
Definition: DerivedTypes.h:792
unsigned getIntParameter(unsigned i) const
Definition: DerivedTypes.h:801
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
bool isIntegerTy() const
True if this is an instance of IntegerType.
Definition: Type.h:237
bool isVoidTy() const
Return true if this is 'void'.
Definition: Type.h:139
The dx.CBuffer target extension type.
Definition: DXILResource.h:162
static bool classof(const TargetExtType *T)
Definition: DXILResource.h:171
CBufferExtType & operator=(const CBufferExtType &)=delete
CBufferExtType(const CBufferExtType &)=delete
static bool classof(const Type *T)
Definition: DXILResource.h:174
uint32_t getCBufferSize() const
Definition: DXILResource.h:169
Type * getResourceType() const
Definition: DXILResource.h:168
The dx.FeedbackTexture target extension type.
Definition: DXILResource.h:138
dxil::SamplerFeedbackType getFeedbackType() const
Definition: DXILResource.h:144
FeedbackTextureExtType(const FeedbackTextureExtType &)=delete
dxil::ResourceKind getDimension() const
Definition: DXILResource.h:147
FeedbackTextureExtType & operator=(const FeedbackTextureExtType &)=delete
static bool classof(const TargetExtType *T)
Definition: DXILResource.h:151
static bool classof(const Type *T)
Definition: DXILResource.h:154
The dx.MSTexture target extension type.
Definition: DXILResource.h:113
dxil::ResourceKind getDimension() const
Definition: DXILResource.h:123
MSTextureExtType(const MSTextureExtType &)=delete
static bool classof(const TargetExtType *T)
Definition: DXILResource.h:127
Type * getResourceType() const
Definition: DXILResource.h:119
uint32_t getSampleCount() const
Definition: DXILResource.h:121
static bool classof(const Type *T)
Definition: DXILResource.h:130
MSTextureExtType & operator=(const MSTextureExtType &)=delete
The dx.RawBuffer target extension type.
Definition: DXILResource.h:35
static bool classof(const TargetExtType *T)
Definition: DXILResource.h:55
RawBufferExtType(const RawBufferExtType &)=delete
static bool classof(const Type *T)
Definition: DXILResource.h:58
RawBufferExtType & operator=(const RawBufferExtType &)=delete
Type * getResourceType() const
Definition: DXILResource.h:49
const StringRef getName() const
Definition: DXILResource.h:346
bool operator==(const ResourceBindingInfo &RHS) const
Definition: DXILResource.h:355
void setBindingID(unsigned ID)
Definition: DXILResource.h:342
bool operator<(const ResourceBindingInfo &RHS) const
Definition: DXILResource.h:362
GlobalVariable * createSymbol(Module &M, StructType *Ty, StringRef Name="")
std::pair< uint32_t, uint32_t > getAnnotateProps(Module &M, dxil::ResourceTypeInfo &RTI) const
TargetExtType * getHandleTy() const
Definition: DXILResource.h:345
MDTuple * getAsMetadata(Module &M, dxil::ResourceTypeInfo &RTI) const
ResourceBindingInfo(uint32_t RecordID, uint32_t Space, uint32_t LowerBound, uint32_t Size, TargetExtType *HandleTy, GlobalVariable *Symbol=nullptr)
Definition: DXILResource.h:336
const ResourceBinding & getBinding() const
Definition: DXILResource.h:344
bool operator!=(const ResourceBindingInfo &RHS) const
Definition: DXILResource.h:359
void print(raw_ostream &OS, dxil::ResourceTypeInfo &RTI, const DataLayout &DL) const
dxil::ResourceClass getResourceClass() const
Definition: DXILResource.h:294
uint32_t getMultiSampleCount() const
uint32_t getCBufferSize(const DataLayout &DL) const
bool operator<(const ResourceTypeInfo &RHS) const
dxil::SamplerType getSamplerType() const
bool operator!=(const ResourceTypeInfo &RHS) const
Definition: DXILResource.h:301
TargetExtType * getHandleTy() const
Definition: DXILResource.h:273
StructType * createElementStruct()
ResourceTypeInfo(TargetExtType *HandleTy, bool GloballyCoherent=false, bool HasCounter=false)
Definition: DXILResource.h:268
StructInfo getStruct(const DataLayout &DL) const
dxil::SamplerFeedbackType getFeedbackType() const
dxil::ResourceKind getResourceKind() const
Definition: DXILResource.h:295
void print(raw_ostream &OS, const DataLayout &DL) const
The dx.Sampler target extension type.
Definition: DXILResource.h:182
SamplerExtType(const SamplerExtType &)=delete
static bool classof(const Type *T)
Definition: DXILResource.h:195
dxil::SamplerType getSamplerType() const
Definition: DXILResource.h:188
SamplerExtType & operator=(const SamplerExtType &)=delete
static bool classof(const TargetExtType *T)
Definition: DXILResource.h:192
The dx.Texture target extension type.
Definition: DXILResource.h:88
static bool classof(const TargetExtType *T)
Definition: DXILResource.h:102
dxil::ResourceKind getDimension() const
Definition: DXILResource.h:98
Type * getResourceType() const
Definition: DXILResource.h:94
TextureExtType & operator=(const TextureExtType &)=delete
TextureExtType(const TextureExtType &)=delete
static bool classof(const Type *T)
Definition: DXILResource.h:105
The dx.TypedBuffer target extension type.
Definition: DXILResource.h:66
TypedBufferExtType & operator=(const TypedBufferExtType &)=delete
static bool classof(const TargetExtType *T)
Definition: DXILResource.h:77
TypedBufferExtType(const TypedBufferExtType &)=delete
static bool classof(const Type *T)
Definition: DXILResource.h:80
A range adaptor for a pair of iterators.
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Definition: CallingConv.h:24
ResourceKind
The kind of resource for an SRV or UAV resource.
Definition: DXILABI.h:34
ResourceClass
Definition: DXILABI.h:25
SamplerFeedbackType
Definition: DXILABI.h:94
ElementType
The element type of an SRV or UAV resource.
Definition: DXILABI.h:58
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
ModulePass * createDXILResourceTypeWrapperPassPass()
ModulePass * createDXILResourceBindingWrapperPassPass()
A CRTP mix-in that provides informational APIs needed for analysis passes.
Definition: PassManager.h:92
A special type used by analysis passes to provide an address that identifies that particular analysis...
Definition: Analysis.h:28
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:69
bool operator!=(const ResourceBinding &RHS) const
Definition: DXILResource.h:321
bool operator<(const ResourceBinding &RHS) const
Definition: DXILResource.h:324
bool operator==(const ResourceBinding &RHS) const
Definition: DXILResource.h:317
bool operator==(const StructInfo &RHS) const
Definition: DXILResource.h:228
bool operator!=(const StructInfo &RHS) const
Definition: DXILResource.h:231
bool operator<(const StructInfo &RHS) const
Definition: DXILResource.h:232
bool operator<(const TypedInfo &RHS) const
Definition: DXILResource.h:246
bool operator==(const TypedInfo &RHS) const
Definition: DXILResource.h:241
bool operator!=(const TypedInfo &RHS) const
Definition: DXILResource.h:245
bool operator!=(const UAVInfo &RHS) const
Definition: DXILResource.h:213
bool operator==(const UAVInfo &RHS) const
Definition: DXILResource.h:209
bool operator<(const UAVInfo &RHS) const
Definition: DXILResource.h:214