Lines Matching defs:GV
30 Align getAlign(const DataLayout &DL, const GlobalVariable *GV) {
31 return DL.getValueOrABITypeAlignment(GV->getPointerAlignment(DL),
32 GV->getValueType());
35 bool isDynamicLDS(const GlobalVariable &GV) {
37 const Module *M = GV.getParent();
39 if (GV.getType()->getPointerAddressSpace() != AMDGPUAS::LOCAL_ADDRESS)
41 return DL.getTypeAllocSize(GV.getValueType()) == 0;
44 bool isLDSVariableToLower(const GlobalVariable &GV) {
45 if (GV.getType()->getPointerAddressSpace() != AMDGPUAS::LOCAL_ADDRESS) {
48 if (isDynamicLDS(GV)) {
51 if (GV.isConstant()) {
57 if (GV.hasInitializer() && !isa<UndefValue>(GV.getInitializer())) {
80 for (auto &GV : M.globals())
81 if (AMDGPU::isLDSVariableToLower(GV))
82 LDSGlobals.push_back(&GV);
91 for (auto &GV : M.globals()) {
92 if (!AMDGPU::isLDSVariableToLower(GV))
94 for (User *V : GV.users()) {
98 kernels[F].insert(&GV);
100 Functions[F].insert(&GV);
216 for (auto *GV : GVs) {
217 bool IsAbsolute = GV->isAbsoluteSymbolRef();
218 bool IsDirectMapDynLDSGV = AMDGPU::isDynamicLDS(*GV) && DirectMapKernel.contains(Fn);