LLVM  16.0.0git
SPIRVDuplicatesTracker.h
Go to the documentation of this file.
1 //===-- SPIRVDuplicatesTracker.h - SPIR-V Duplicates Tracker ----*- 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 // General infrastructure for keeping track of the values that according to
10 // the SPIR-V binary layout should be global to the whole module.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_SPIRV_SPIRVDUPLICATESTRACKER_H
15 #define LLVM_LIB_TARGET_SPIRV_SPIRVDUPLICATESTRACKER_H
16 
19 #include "llvm/ADT/DenseMap.h"
20 #include "llvm/ADT/MapVector.h"
23 
24 #include <type_traits>
25 
26 namespace llvm {
27 namespace SPIRV {
28 // NOTE: using MapVector instead of DenseMap because it helps getting
29 // everything ordered in a stable manner for a price of extra (NumKeys)*PtrSize
30 // memory and expensive removals which do not happen anyway.
31 class DTSortableEntry : public MapVector<const MachineFunction *, Register> {
33 
34  struct FlagsTy {
35  unsigned IsFunc : 1;
36  unsigned IsGV : 1;
37  // NOTE: bit-field default init is a C++20 feature.
38  FlagsTy() : IsFunc(0), IsGV(0) {}
39  };
40  FlagsTy Flags;
41 
42 public:
43  // Common hoisting utility doesn't support function, because their hoisting
44  // require hoisting of params as well.
45  bool getIsFunc() const { return Flags.IsFunc; }
46  bool getIsGV() const { return Flags.IsGV; }
47  void setIsFunc(bool V) { Flags.IsFunc = V; }
48  void setIsGV(bool V) { Flags.IsGV = V; }
49 
50  const SmallVector<DTSortableEntry *, 2> &getDeps() const { return Deps; }
51  void addDep(DTSortableEntry *E) { Deps.push_back(E); }
52 };
53 
56  STK_Empty = 0,
62  STK_Last = -1
63  };
65 
66  unsigned Hash;
67 
68  SpecialTypeDescriptor() = delete;
70 
71  unsigned getHash() const { return Hash; }
72 
74 };
75 
77  union ImageAttrs {
78  struct BitFlags {
79  unsigned Dim : 3;
80  unsigned Depth : 2;
81  unsigned Arrayed : 1;
82  unsigned MS : 1;
83  unsigned Sampled : 2;
84  unsigned ImageFormat : 6;
85  unsigned AQ : 2;
86  } Flags;
87  unsigned Val;
88  };
89 
90  ImageTypeDescriptor(const Type *SampledTy, unsigned Dim, unsigned Depth,
91  unsigned Arrayed, unsigned MS, unsigned Sampled,
92  unsigned ImageFormat, unsigned AQ = 0)
95  Attrs.Val = 0;
96  Attrs.Flags.Dim = Dim;
97  Attrs.Flags.Depth = Depth;
98  Attrs.Flags.Arrayed = Arrayed;
99  Attrs.Flags.MS = MS;
100  Attrs.Flags.Sampled = Sampled;
101  Attrs.Flags.ImageFormat = ImageFormat;
102  Attrs.Flags.AQ = AQ;
103  Hash = (DenseMapInfo<Type *>().getHashValue(SampledTy) & 0xffff) ^
104  ((Attrs.Val << 8) | Kind);
105  }
106 
107  static bool classof(const SpecialTypeDescriptor *TD) {
108  return TD->Kind == SpecialTypeKind::STK_Image;
109  }
110 };
111 
113  SampledImageTypeDescriptor(const Type *SampledTy, const MachineInstr *ImageTy)
115  assert(ImageTy->getOpcode() == SPIRV::OpTypeImage);
117  SampledTy, ImageTy->getOperand(2).getImm(),
118  ImageTy->getOperand(3).getImm(), ImageTy->getOperand(4).getImm(),
119  ImageTy->getOperand(5).getImm(), ImageTy->getOperand(6).getImm(),
120  ImageTy->getOperand(7).getImm(), ImageTy->getOperand(8).getImm());
121  Hash = TD.getHash() ^ Kind;
122  }
123 
124  static bool classof(const SpecialTypeDescriptor *TD) {
125  return TD->Kind == SpecialTypeKind::STK_SampledImage;
126  }
127 };
128 
132  Hash = Kind;
133  }
134 
135  static bool classof(const SpecialTypeDescriptor *TD) {
136  return TD->Kind == SpecialTypeKind::STK_Sampler;
137  }
138 };
139 
141 
142  PipeTypeDescriptor(uint8_t AQ)
144  Hash = (AQ << 8) | Kind;
145  }
146 
147  static bool classof(const SpecialTypeDescriptor *TD) {
148  return TD->Kind == SpecialTypeKind::STK_Pipe;
149  }
150 };
151 
153 
156  Hash = Kind;
157  }
158 
159  static bool classof(const SpecialTypeDescriptor *TD) {
160  return TD->Kind == SpecialTypeKind::STK_DeviceEvent;
161  }
162 };
163 } // namespace SPIRV
164 
165 template <> struct DenseMapInfo<SPIRV::SpecialTypeDescriptor> {
169  }
172  }
174  return Val.getHash();
175  }
178  return getHashValue(LHS) == getHashValue(RHS);
179  }
180 };
181 
182 template <typename KeyTy> class SPIRVDuplicatesTrackerBase {
183 public:
184  // NOTE: using MapVector instead of DenseMap helps getting everything ordered
185  // in a stable manner for a price of extra (NumKeys)*PtrSize memory and
186  // expensive removals which don't happen anyway.
188 
189 private:
190  StorageTy Storage;
191 
192 public:
193  void add(KeyTy V, const MachineFunction *MF, Register R) {
194  if (find(V, MF).isValid())
195  return;
196 
197  Storage[V][MF] = R;
198  if (std::is_same<Function,
199  typename std::remove_const<
200  typename std::remove_pointer<KeyTy>::type>::type>() ||
201  std::is_same<Argument,
202  typename std::remove_const<
204  Storage[V].setIsFunc(true);
205  if (std::is_same<GlobalVariable,
206  typename std::remove_const<
208  Storage[V].setIsGV(true);
209  }
210 
211  Register find(KeyTy V, const MachineFunction *MF) const {
212  auto iter = Storage.find(V);
213  if (iter != Storage.end()) {
214  auto Map = iter->second;
215  auto iter2 = Map.find(MF);
216  if (iter2 != Map.end())
217  return iter2->second;
218  }
219  return Register();
220  }
221 
222  const StorageTy &getAllUses() const { return Storage; }
223 
224 private:
225  StorageTy &getAllUses() { return Storage; }
226 
227  // The friend class needs to have access to the internal storage
228  // to be able to build dependency graph, can't declare only one
229  // function a 'friend' due to the incomplete declaration at this point
230  // and mutual dependency problems.
232 };
233 
234 template <typename T>
236 
237 template <>
238 class SPIRVDuplicatesTracker<SPIRV::SpecialTypeDescriptor>
239  : public SPIRVDuplicatesTrackerBase<SPIRV::SpecialTypeDescriptor> {};
240 
248 
249  // NOTE: using MOs instead of regs to get rid of MF dependency to be able
250  // to use flat data structure.
251  // NOTE: replacing DenseMap with MapVector doesn't affect overall correctness
252  // but makes LITs more stable, should prefer DenseMap still due to
253  // significant perf difference.
254  using SPIRVReg2EntryTy =
256 
257  template <typename T>
258  void prebuildReg2Entry(SPIRVDuplicatesTracker<T> &DT,
259  SPIRVReg2EntryTy &Reg2Entry);
260 
261 public:
262  void buildDepsGraph(std::vector<SPIRV::DTSortableEntry *> &Graph,
263  MachineModuleInfo *MMI);
264 
265  void add(const Type *T, const MachineFunction *MF, Register R) {
266  TT.add(T, MF, R);
267  }
268 
269  void add(const Constant *C, const MachineFunction *MF, Register R) {
270  CT.add(C, MF, R);
271  }
272 
273  void add(const GlobalVariable *GV, const MachineFunction *MF, Register R) {
274  GT.add(GV, MF, R);
275  }
276 
277  void add(const Function *F, const MachineFunction *MF, Register R) {
278  FT.add(F, MF, R);
279  }
280 
281  void add(const Argument *Arg, const MachineFunction *MF, Register R) {
282  AT.add(Arg, MF, R);
283  }
284 
286  Register R) {
287  ST.add(TD, MF, R);
288  }
289 
290  Register find(const Type *T, const MachineFunction *MF) {
291  return TT.find(const_cast<Type *>(T), MF);
292  }
293 
294  Register find(const Constant *C, const MachineFunction *MF) {
295  return CT.find(const_cast<Constant *>(C), MF);
296  }
297 
298  Register find(const GlobalVariable *GV, const MachineFunction *MF) {
299  return GT.find(const_cast<GlobalVariable *>(GV), MF);
300  }
301 
302  Register find(const Function *F, const MachineFunction *MF) {
303  return FT.find(const_cast<Function *>(F), MF);
304  }
305 
306  Register find(const Argument *Arg, const MachineFunction *MF) {
307  return AT.find(const_cast<Argument *>(Arg), MF);
308  }
309 
311  const MachineFunction *MF) {
312  return ST.find(TD, MF);
313  }
314 
315  const SPIRVDuplicatesTracker<Type> *getTypes() { return &TT; }
316 };
317 } // namespace llvm
318 #endif // LLVM_LIB_TARGET_SPIRV_SPIRVDUPLICATESTRACKER_H
llvm::SPIRV::PipeTypeDescriptor::PipeTypeDescriptor
PipeTypeDescriptor(uint8_t AQ)
Definition: SPIRVDuplicatesTracker.h:142
llvm::SPIRV::SamplerTypeDescriptor::SamplerTypeDescriptor
SamplerTypeDescriptor()
Definition: SPIRVDuplicatesTracker.h:130
llvm::Argument
This class represents an incoming formal argument to a Function.
Definition: Argument.h:28
Attrs
Function Attrs
Definition: README_ALTIVEC.txt:215
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::SPIRV::SpecialTypeDescriptor::STK_Empty
@ STK_Empty
Definition: SPIRVDuplicatesTracker.h:56
llvm::SPIRV::SpecialTypeDescriptor::SpecialTypeDescriptor
SpecialTypeDescriptor()=delete
llvm::SPIRV::DTSortableEntry::addDep
void addDep(DTSortableEntry *E)
Definition: SPIRVDuplicatesTracker.h:51
llvm::DenseMapInfo< SPIRV::SpecialTypeDescriptor >::getTombstoneKey
static SPIRV::SpecialTypeDescriptor getTombstoneKey()
Definition: SPIRVDuplicatesTracker.h:170
llvm::Function
Definition: Function.h:60
llvm::SPIRV::ImageTypeDescriptor::ImageAttrs::BitFlags::MS
unsigned MS
Definition: SPIRVDuplicatesTracker.h:82
llvm::SPIRV::ImageTypeDescriptor::ImageAttrs::BitFlags::Sampled
unsigned Sampled
Definition: SPIRVDuplicatesTracker.h:83
llvm::SPIRV::SampledImageTypeDescriptor
Definition: SPIRVDuplicatesTracker.h:112
llvm::SmallVector
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1199
llvm::SPIRV::SampledImageTypeDescriptor::classof
static bool classof(const SpecialTypeDescriptor *TD)
Definition: SPIRVDuplicatesTracker.h:124
llvm::SPIRV::SpecialTypeDescriptor::STK_Sampler
@ STK_Sampler
Definition: SPIRVDuplicatesTracker.h:59
llvm::SPIRVDuplicatesTrackerBase::add
void add(KeyTy V, const MachineFunction *MF, Register R)
Definition: SPIRVDuplicatesTracker.h:193
MapVector.h
llvm::GlobalVariable
Definition: GlobalVariable.h:39
llvm::SPIRVGeneralDuplicatesTracker::buildDepsGraph
void buildDepsGraph(std::vector< SPIRV::DTSortableEntry * > &Graph, MachineModuleInfo *MMI)
Definition: SPIRVDuplicatesTracker.cpp:33
llvm::SPIRV::SamplerTypeDescriptor
Definition: SPIRVDuplicatesTracker.h:129
llvm::SPIRV::SamplerTypeDescriptor::classof
static bool classof(const SpecialTypeDescriptor *TD)
Definition: SPIRVDuplicatesTracker.h:135
llvm::SPIRVGeneralDuplicatesTracker::find
Register find(const Type *T, const MachineFunction *MF)
Definition: SPIRVDuplicatesTracker.h:290
llvm::Depth
@ Depth
Definition: SIMachineScheduler.h:36
llvm::SPIRV::SpecialTypeDescriptor::STK_Pipe
@ STK_Pipe
Definition: SPIRVDuplicatesTracker.h:60
SPIRVMCTargetDesc.h
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::SPIRV::ImageTypeDescriptor
Definition: SPIRVDuplicatesTracker.h:76
DenseMap.h
llvm::SPIRV::ImageTypeDescriptor::ImageAttrs::BitFlags::AQ
unsigned AQ
Definition: SPIRVDuplicatesTracker.h:85
T
#define T
Definition: Mips16ISelLowering.cpp:341
llvm::SPIRV::SpecialTypeDescriptor::getHash
unsigned getHash() const
Definition: SPIRVDuplicatesTracker.h:71
llvm::MapVector
This class implements a map that also provides access to all stored values in a deterministic order.
Definition: MapVector.h:37
MachineIRBuilder.h
RHS
Value * RHS
Definition: X86PartialReduction.cpp:76
llvm::SPIRV::DTSortableEntry::setIsGV
void setIsGV(bool V)
Definition: SPIRVDuplicatesTracker.h:48
F
#define F(x, y, z)
Definition: MD5.cpp:55
llvm::SPIRV::DTSortableEntry
Definition: SPIRVDuplicatesTracker.h:31
llvm::SPIRV::SampledImageTypeDescriptor::SampledImageTypeDescriptor
SampledImageTypeDescriptor(const Type *SampledTy, const MachineInstr *ImageTy)
Definition: SPIRVDuplicatesTracker.h:113
Arg
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
Definition: AMDGPULibCalls.cpp:187
llvm::SPIRVDuplicatesTrackerBase::find
Register find(KeyTy V, const MachineFunction *MF) const
Definition: SPIRVDuplicatesTracker.h:211
LHS
Value * LHS
Definition: X86PartialReduction.cpp:75
llvm::DenseMapInfo
An information struct used to provide DenseMap with the various necessary components for a given valu...
Definition: APInt.h:34
llvm::SPIRV::ImageTypeDescriptor::classof
static bool classof(const SpecialTypeDescriptor *TD)
Definition: SPIRVDuplicatesTracker.h:107
llvm::SPIRVGeneralDuplicatesTracker::find
Register find(const Constant *C, const MachineFunction *MF)
Definition: SPIRVDuplicatesTracker.h:294
llvm::DenseMapInfo< SPIRV::SpecialTypeDescriptor >::getHashValue
static unsigned getHashValue(SPIRV::SpecialTypeDescriptor Val)
Definition: SPIRVDuplicatesTracker.h:173
E
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
llvm::MachineOperand::getImm
int64_t getImm() const
Definition: MachineOperand.h:546
SPIRVBaseInfo.h
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::MachineInstr::getOperand
const MachineOperand & getOperand(unsigned i) const
Definition: MachineInstr.h:526
llvm::DenseMapInfo< SPIRV::SpecialTypeDescriptor >::isEqual
static bool isEqual(SPIRV::SpecialTypeDescriptor LHS, SPIRV::SpecialTypeDescriptor RHS)
Definition: SPIRVDuplicatesTracker.h:176
llvm::SPIRV::ImageTypeDescriptor::ImageTypeDescriptor
ImageTypeDescriptor(const Type *SampledTy, unsigned Dim, unsigned Depth, unsigned Arrayed, unsigned MS, unsigned Sampled, unsigned ImageFormat, unsigned AQ=0)
Definition: SPIRVDuplicatesTracker.h:90
llvm::SPIRV::ImageTypeDescriptor::ImageAttrs::BitFlags::Dim
unsigned Dim
Definition: SPIRVDuplicatesTracker.h:79
llvm::SPIRV::SpecialTypeDescriptor::STK_SampledImage
@ STK_SampledImage
Definition: SPIRVDuplicatesTracker.h:58
llvm::MachineModuleInfo
This class contains meta information specific to a module.
Definition: MachineModuleInfo.h:74
llvm::SPIRVDuplicatesTracker< SPIRV::SpecialTypeDescriptor >
Definition: SPIRVDuplicatesTracker.h:238
llvm::SPIRV::DeviceEventTypeDescriptor::classof
static bool classof(const SpecialTypeDescriptor *TD)
Definition: SPIRVDuplicatesTracker.h:159
llvm::SPIRV::SpecialTypeDescriptor::SpecialTypeDescriptor
SpecialTypeDescriptor(SpecialTypeKind K)
Definition: SPIRVDuplicatesTracker.h:69
llvm::SPIRVGeneralDuplicatesTracker::find
Register find(const Argument *Arg, const MachineFunction *MF)
Definition: SPIRVDuplicatesTracker.h:306
llvm::SPIRV::SpecialTypeDescriptor
Definition: SPIRVDuplicatesTracker.h:54
llvm::SPIRV::SpecialTypeDescriptor::SpecialTypeKind
SpecialTypeKind
Definition: SPIRVDuplicatesTracker.h:55
llvm::SPIRV::DTSortableEntry::setIsFunc
void setIsFunc(bool V)
Definition: SPIRVDuplicatesTracker.h:47
llvm::SPIRVDuplicatesTrackerBase::getAllUses
const StorageTy & getAllUses() const
Definition: SPIRVDuplicatesTracker.h:222
llvm::SPIRV::DeviceEventTypeDescriptor::DeviceEventTypeDescriptor
DeviceEventTypeDescriptor()
Definition: SPIRVDuplicatesTracker.h:154
llvm::Constant
This is an important base class in LLVM.
Definition: Constant.h:41
type
AMD64 Optimization Manual has some nice information about optimizing integer multiplication by a constant How much of it applies to Intel s X86 implementation There are definite trade offs to xmm0 cvttss2siq rdx jb L3 subss xmm0 rax cvttss2siq rdx xorq rdx rax ret instead of xmm1 cvttss2siq rcx movaps xmm2 subss xmm2 cvttss2siq rax rdx xorq rax ucomiss xmm0 cmovb rax ret Seems like the jb branch has high likelihood of being taken It would have saved a few instructions It s not possible to reference and DH registers in an instruction requiring REX prefix divb and mulb both produce results in AH If isel emits a CopyFromReg which gets turned into a movb and that can be allocated a r8b r15b To get around isel emits a CopyFromReg from AX and then right shift it down by and truncate it It s not pretty but it works We need some register allocation magic to make the hack go which would often require a callee saved register Callees usually need to keep this value live for most of their body so it doesn t add a significant burden on them We currently implement this in however this is suboptimal because it means that it would be quite awkward to implement the optimization for callers A better implementation would be to relax the LLVM IR rules for sret arguments to allow a function with an sret argument to have a non void return type
Definition: README-X86-64.txt:70
llvm::SPIRV::SpecialTypeDescriptor::~SpecialTypeDescriptor
virtual ~SpecialTypeDescriptor()
Definition: SPIRVDuplicatesTracker.h:73
llvm::MapVector::find
iterator find(const KeyT &Key)
Definition: MapVector.h:148
llvm::MachineInstr
Representation of each machine instruction.
Definition: MachineInstr.h:66
llvm::SPIRV::PipeTypeDescriptor::classof
static bool classof(const SpecialTypeDescriptor *TD)
Definition: SPIRVDuplicatesTracker.h:147
llvm::SPIRV::DTSortableEntry::getIsGV
bool getIsGV() const
Definition: SPIRVDuplicatesTracker.h:46
llvm::SPIRV::PipeTypeDescriptor
Definition: SPIRVDuplicatesTracker.h:140
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
MachineModuleInfo.h
llvm::SPIRV::ImageTypeDescriptor::ImageAttrs::BitFlags::Depth
unsigned Depth
Definition: SPIRVDuplicatesTracker.h:80
llvm::MachineFunction
Definition: MachineFunction.h:257
llvm::SPIRV::ImageTypeDescriptor::ImageAttrs::Val
unsigned Val
Definition: SPIRVDuplicatesTracker.h:87
llvm::SPIRV::DeviceEventTypeDescriptor
Definition: SPIRVDuplicatesTracker.h:152
llvm::MachineInstr::getOpcode
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
Definition: MachineInstr.h:516
llvm::SPIRVGeneralDuplicatesTracker::add
void add(const SPIRV::SpecialTypeDescriptor &TD, const MachineFunction *MF, Register R)
Definition: SPIRVDuplicatesTracker.h:285
llvm::SPIRVGeneralDuplicatesTracker
Definition: SPIRVDuplicatesTracker.h:241
llvm::SPIRV::SpecialTypeDescriptor::STK_DeviceEvent
@ STK_DeviceEvent
Definition: SPIRVDuplicatesTracker.h:61
llvm::SPIRV::SpecialTypeDescriptor::Kind
SpecialTypeKind Kind
Definition: SPIRVDuplicatesTracker.h:64
llvm::Register
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
llvm::MapVector::end
iterator end()
Definition: MapVector.h:72
llvm::SPIRV::ImageTypeDescriptor::ImageAttrs::Flags
struct llvm::SPIRV::ImageTypeDescriptor::ImageAttrs::BitFlags Flags
llvm::SPIRV::DTSortableEntry::getIsFunc
bool getIsFunc() const
Definition: SPIRVDuplicatesTracker.h:45
llvm::SPIRVGeneralDuplicatesTracker::find
Register find(const GlobalVariable *GV, const MachineFunction *MF)
Definition: SPIRVDuplicatesTracker.h:298
llvm::SPIRV::ImageTypeDescriptor::ImageAttrs
Definition: SPIRVDuplicatesTracker.h:77
llvm::SPIRV::SpecialTypeDescriptor::STK_Last
@ STK_Last
Definition: SPIRVDuplicatesTracker.h:62
llvm::SPIRVGeneralDuplicatesTracker::find
Register find(const Function *F, const MachineFunction *MF)
Definition: SPIRVDuplicatesTracker.h:302
llvm::DenseMapInfo< SPIRV::SpecialTypeDescriptor >::getEmptyKey
static SPIRV::SpecialTypeDescriptor getEmptyKey()
Definition: SPIRVDuplicatesTracker.h:166
llvm::SPIRV::ImageTypeDescriptor::ImageAttrs::BitFlags::ImageFormat
unsigned ImageFormat
Definition: SPIRVDuplicatesTracker.h:84
llvm::SPIRVGeneralDuplicatesTracker::add
void add(const Function *F, const MachineFunction *MF, Register R)
Definition: SPIRVDuplicatesTracker.h:277
llvm::SPIRV::ImageTypeDescriptor::ImageAttrs::BitFlags::Arrayed
unsigned Arrayed
Definition: SPIRVDuplicatesTracker.h:81
isValid
static bool isValid(const char C)
Returns true if C is a valid mangled character: <0-9a-zA-Z_>.
Definition: RustDemangle.cpp:184
llvm::SPIRV::SpecialTypeDescriptor::Hash
unsigned Hash
Definition: SPIRVDuplicatesTracker.h:66
llvm::SPIRVGeneralDuplicatesTracker::add
void add(const GlobalVariable *GV, const MachineFunction *MF, Register R)
Definition: SPIRVDuplicatesTracker.h:273
llvm::SPIRVDuplicatesTrackerBase
Definition: SPIRVDuplicatesTracker.h:182
llvm::SPIRVDuplicatesTrackerBase::StorageTy
MapVector< KeyTy, SPIRV::DTSortableEntry > StorageTy
Definition: SPIRVDuplicatesTracker.h:187
llvm::SPIRVGeneralDuplicatesTracker::add
void add(const Argument *Arg, const MachineFunction *MF, Register R)
Definition: SPIRVDuplicatesTracker.h:281
llvm::SPIRV::DTSortableEntry::getDeps
const SmallVector< DTSortableEntry *, 2 > & getDeps() const
Definition: SPIRVDuplicatesTracker.h:50
llvm::SPIRVDuplicatesTracker
Definition: SPIRVDuplicatesTracker.h:235
llvm::SPIRV::SpecialTypeDescriptor::STK_Image
@ STK_Image
Definition: SPIRVDuplicatesTracker.h:57
llvm::SPIRVGeneralDuplicatesTracker::find
Register find(const SPIRV::SpecialTypeDescriptor &TD, const MachineFunction *MF)
Definition: SPIRVDuplicatesTracker.h:310
llvm::SPIRVGeneralDuplicatesTracker::getTypes
const SPIRVDuplicatesTracker< Type > * getTypes()
Definition: SPIRVDuplicatesTracker.h:315
llvm::SPIRVGeneralDuplicatesTracker::add
void add(const Type *T, const MachineFunction *MF, Register R)
Definition: SPIRVDuplicatesTracker.h:265
llvm::SPIRV::ImageTypeDescriptor::ImageAttrs::BitFlags
Definition: SPIRVDuplicatesTracker.h:78
llvm::SPIRVGeneralDuplicatesTracker::add
void add(const Constant *C, const MachineFunction *MF, Register R)
Definition: SPIRVDuplicatesTracker.h:269