14#ifndef LLVM_LIB_TARGET_SPIRV_SPIRVDUPLICATESTRACKER_H
15#define LLVM_LIB_TARGET_SPIRV_SPIRVDUPLICATESTRACKER_H
39 FlagsTy() : IsFunc(0), IsGV(0) {}
47 bool getIsGV()
const {
return Flags.IsGV; }
81 unsigned Sampled,
unsigned ImageFormat,
unsigned AQ = 0) {
95 unsigned Arrayed,
unsigned MS,
unsigned Sampled,
96 unsigned ImageFormat,
unsigned AQ = 0) {
97 return std::make_tuple(
106 return std::make_tuple(
153 typename std::remove_const<
154 typename std::remove_pointer<KeyTy>::type>::type>() ||
156 typename std::remove_const<
157 typename std::remove_pointer<KeyTy>::type>::type>())
158 Storage[V].setIsFunc(
true);
160 typename std::remove_const<
161 typename std::remove_pointer<KeyTy>::type>::type>())
162 Storage[V].setIsGV(
true);
166 auto iter = Storage.
find(V);
167 if (iter != Storage.
end()) {
168 auto Map = iter->second;
169 auto iter2 = Map.find(MF);
170 if (iter2 != Map.end())
171 return iter2->second;
212 template <
typename T>
287 return ST.find(TD, MF);
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file defines the DenseMap class.
This file declares the MachineIRBuilder class.
This file implements a map that provides insertion order iteration.
static bool isValid(const char C)
Returns true if C is a valid mangled character: <0-9a-zA-Z_>.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class represents an incoming formal argument to a Function.
This is an important base class in LLVM.
Representation of each machine instruction.
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
const MachineOperand & getOperand(unsigned i) const
This class contains meta information specific to a module.
This class implements a map that also provides access to all stored values in a deterministic order.
iterator find(const KeyT &Key)
Wrapper class representing virtual and physical registers.
void add(KeyTy V, const MachineFunction *MF, Register R)
Register find(KeyTy V, const MachineFunction *MF) const
MapVector< KeyTy, SPIRV::DTSortableEntry > StorageTy
const StorageTy & getAllUses() const
void add(const GlobalVariable *GV, const MachineFunction *MF, Register R)
Register find(const Function *F, const MachineFunction *MF)
void add(const SPIRV::SpecialTypeDescriptor &TD, const MachineFunction *MF, Register R)
void add(const Type *Ty, const MachineFunction *MF, Register R)
void add(const MachineInstr *MI, const MachineFunction *MF, Register R)
void add(const Function *F, const MachineFunction *MF, Register R)
Register find(const Type *Ty, const MachineFunction *MF)
void buildDepsGraph(std::vector< SPIRV::DTSortableEntry * > &Graph, MachineModuleInfo *MMI)
Register find(const Constant *C, const MachineFunction *MF)
Register find(const Argument *Arg, const MachineFunction *MF)
void add(const Argument *Arg, const MachineFunction *MF, Register R)
void add(const Type *PointeeTy, unsigned AddressSpace, const MachineFunction *MF, Register R)
Register find(const SPIRV::SpecialTypeDescriptor &TD, const MachineFunction *MF)
Register find(const Type *PointeeTy, unsigned AddressSpace, const MachineFunction *MF)
void add(const Constant *C, const MachineFunction *MF, Register R)
const SPIRVDuplicatesTracker< Type > * getTypes()
Register find(const GlobalVariable *GV, const MachineFunction *MF)
Register find(const MachineInstr *MI, const MachineFunction *MF)
const SmallVector< DTSortableEntry *, 2 > & getDeps() const
void addDep(DTSortableEntry *E)
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
The instances of the Type class are immutable: once they are created, they are never changed.
@ C
The default llvm calling convention, compatible with C.
SpecialTypeDescriptor make_descr_pipe(uint8_t AQ)
SpecialTypeDescriptor make_descr_sampler()
std::tuple< const Type *, unsigned, unsigned > SpecialTypeDescriptor
SpecialTypeDescriptor make_descr_event()
SpecialTypeDescriptor make_descr_image(const Type *SampledTy, unsigned Dim, unsigned Depth, unsigned Arrayed, unsigned MS, unsigned Sampled, unsigned ImageFormat, unsigned AQ=0)
SpecialTypeDescriptor make_descr_pointee(const Type *ElementType, unsigned AddressSpace)
SpecialTypeDescriptor make_descr_sampled_image(const Type *SampledTy, const MachineInstr *ImageTy)
This is an optimization pass for GlobalISel generic memory operations.
const Type * unifyPtrType(const Type *Ty)
struct llvm::SPIRV::ImageAttrs::BitFlags Flags
ImageAttrs(unsigned Dim, unsigned Depth, unsigned Arrayed, unsigned MS, unsigned Sampled, unsigned ImageFormat, unsigned AQ=0)