14#ifndef LLVM_LIB_TARGET_SPIRV_SPIRVDUPLICATESTRACKER_H
15#define LLVM_LIB_TARGET_SPIRV_SPIRVDUPLICATESTRACKER_H
41 FlagsTy() : IsFunc(0), IsGV(0), IsConst(0) {}
49 bool getIsGV()
const {
return Flags.IsGV; }
85 unsigned Sampled,
unsigned ImageFormat,
unsigned AQ = 0) {
99 unsigned Arrayed,
unsigned MS,
unsigned Sampled,
100 unsigned ImageFormat,
unsigned AQ = 0) {
101 return std::make_tuple(
110 unsigned AC = AccessQualifier::AccessQualifier::None;
113 return std::make_tuple(
159 typename std::remove_const<
160 typename std::remove_pointer<KeyTy>::type>::type>() ||
162 typename std::remove_const<
163 typename std::remove_pointer<KeyTy>::type>::type>())
164 Storage[V].setIsFunc(
true);
166 typename std::remove_const<
167 typename std::remove_pointer<KeyTy>::type>::type>())
168 Storage[V].setIsGV(
true);
170 typename std::remove_const<
171 typename std::remove_pointer<KeyTy>::type>::type>())
172 Storage[V].setIsConst(
true);
176 auto iter = Storage.
find(V);
177 if (iter != Storage.
end()) {
178 auto Map = iter->second;
179 auto iter2 = Map.find(MF);
180 if (iter2 != Map.end())
181 return iter2->second;
222 template <
typename T>
298 return ST.find(TD, MF);
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file defines the DenseMap class.
const HexagonInstrInfo * TII
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.
unsigned getNumOperands() const
Retuns the total number of operands.
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)
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)
void buildDepsGraph(std::vector< SPIRV::DTSortableEntry * > &Graph, const SPIRVInstrInfo *TII, MachineModuleInfo *MMI)
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)