Lines Matching refs:GlobalVariable
260 const DenseSet<GlobalVariable *> &LocalVars) { in removeLocalVarsFromUsedLists()
264 for (GlobalVariable *LocalVar : LocalVars) in removeLocalVarsFromUsedLists()
270 for (GlobalVariable *LocalVar : LocalVars) in removeLocalVarsFromUsedLists()
274 static void markUsedByKernel(Function *Func, GlobalVariable *SGV) { in markUsedByKernel()
333 using FunctionVariableMap = DenseMap<Function *, DenseSet<GlobalVariable *>>;
335 using VariableFunctionMap = DenseMap<GlobalVariable *, DenseSet<Function *>>;
378 DenseSet<GlobalVariable *> VariablesReachableThroughFunctionPointer; in getTransitiveUsesOfLDS()
466 GlobalVariable *SGV = nullptr;
467 DenseMap<GlobalVariable *, Constant *> LDSVarsToConstantGEP;
476 LLVMContext &Ctx, ArrayRef<GlobalVariable *> Variables, in getAddressesOfVariablesInKernel()
477 const DenseMap<GlobalVariable *, Constant *> &LDSVarsToConstantGEP) { in getAddressesOfVariablesInKernel() argument
489 GlobalVariable *GV = Variables[i]; in getAddressesOfVariablesInKernel()
501 static GlobalVariable *buildLookupTable( in buildLookupTable()
502 Module &M, ArrayRef<GlobalVariable *> Variables, in buildLookupTable()
533 return new GlobalVariable( in buildLookupTable()
540 GlobalVariable *LookupTable, in replaceUseWithTableLookup()
541 GlobalVariable *GV, Use &U, in replaceUseWithTableLookup()
576 Module &M, ArrayRef<GlobalVariable *> ModuleScopeVariables, in replaceUsesInInstructionsWithTableLookup()
577 GlobalVariable *LookupTable) { in replaceUsesInInstructionsWithTableLookup()
599 DenseSet<GlobalVariable *> const &VariableSet) { in kernelsThatIndirectlyAccessAnyOfPassedVariables()
609 for (GlobalVariable *GV : LDSUsesInfo.indirect_access[&Func]) { in kernelsThatIndirectlyAccessAnyOfPassedVariables()
620 static GlobalVariable *
626 GlobalVariable *GV = nullptr; in chooseBestVariableForModuleStrategy()
632 CandidateTy(GlobalVariable *GV, uint64_t UserCount, uint64_t AllocSize) in chooseBestVariableForModuleStrategy()
661 GlobalVariable *GV = K.first; in chooseBestVariableForModuleStrategy()
677 static void recordLDSAbsoluteAddress(Module *M, GlobalVariable *GV, in recordLDSAbsoluteAddress()
760 DenseSet<GlobalVariable *> &ModuleScopeVariables, in partitionVariablesIntoIndirectStrategies()
761 DenseSet<GlobalVariable *> &TableLookupVariables, in partitionVariablesIntoIndirectStrategies()
762 DenseSet<GlobalVariable *> &KernelAccessVariables, in partitionVariablesIntoIndirectStrategies()
763 DenseSet<GlobalVariable *> &DynamicVariables) { in partitionVariablesIntoIndirectStrategies()
765 GlobalVariable *HybridModuleRoot = in partitionVariablesIntoIndirectStrategies()
781 GlobalVariable *GV = K.first; in partitionVariablesIntoIndirectStrategies()
832 static GlobalVariable *lowerModuleScopeStructVariables( in lowerModuleScopeStructVariables()
833 Module &M, DenseSet<GlobalVariable *> const &ModuleScopeVariables, in lowerModuleScopeStructVariables()
903 DenseSet<GlobalVariable *> const &ModuleScopeVariables, in lowerKernelScopeStructVariables()
905 GlobalVariable *MaybeModuleScopeStruct) { in lowerKernelScopeStructVariables()
914 DenseSet<GlobalVariable *> KernelUsedVariables; in lowerKernelScopeStructVariables()
934 for (GlobalVariable *v : ModuleScopeVariables) { in lowerKernelScopeStructVariables()
983 static GlobalVariable *
1002 auto UpdateMaxAlignment = [&MaxDynamicAlignment, &DL](GlobalVariable *GV) { in buildRepresentativeDynamicLDSInstance()
1009 for (GlobalVariable *GV : LDSUsesInfo.indirect_access[func]) { in buildRepresentativeDynamicLDSInstance()
1013 for (GlobalVariable *GV : LDSUsesInfo.direct_access[func]) { in buildRepresentativeDynamicLDSInstance()
1019 GlobalVariable *N = new GlobalVariable( in buildRepresentativeDynamicLDSInstance()
1074 DenseMap<Function *, GlobalVariable *> lowerDynamicLDSVariables( in lowerDynamicLDSVariables()
1077 DenseSet<GlobalVariable *> const &DynamicVariables, in lowerDynamicLDSVariables()
1079 DenseMap<Function *, GlobalVariable *> KernelToCreatedDynamicLDS; in lowerDynamicLDSVariables()
1096 GlobalVariable *N = in lowerDynamicLDSVariables()
1115 GlobalVariable *table = new GlobalVariable( in lowerDynamicLDSVariables()
1120 for (GlobalVariable *GV : DynamicVariables) { in lowerDynamicLDSVariables()
1152 for (GlobalVariable *GV : K.second) { in runOnModule()
1158 DenseSet<GlobalVariable *> ModuleScopeVariables; in runOnModule()
1159 DenseSet<GlobalVariable *> TableLookupVariables; in runOnModule()
1160 DenseSet<GlobalVariable *> KernelAccessVariables; in runOnModule()
1161 DenseSet<GlobalVariable *> DynamicVariables; in runOnModule()
1181 GlobalVariable *MaybeModuleScopeStruct = lowerModuleScopeStructVariables( in runOnModule()
1196 DenseSet<GlobalVariable *> Vec; in runOnModule()
1216 sortByName(std::vector<GlobalVariable *>(TableLookupVariables.begin(), in runOnModule()
1219 GlobalVariable *LookupTable = buildLookupTable( in runOnModule()
1232 DenseMap<Function *, GlobalVariable *> KernelToCreatedDynamicLDS = in runOnModule()
1277 GlobalVariable *KernelStruct = Replacement->second.SGV; in runOnModule()
1288 GlobalVariable *DynamicVariable = KernelToCreatedDynamicLDS[&Func]; in runOnModule()
1371 DenseSet<GlobalVariable *> const &LDSVarsToTransform) { in createLDSVariableReplacement()
1387 auto Sorted = sortByName(std::vector<GlobalVariable *>( in createLDSVariableReplacement()
1390 for (GlobalVariable *GV : Sorted) { in createLDSVariableReplacement()
1400 std::vector<GlobalVariable *> LocalVars; in createLDSVariableReplacement()
1407 GlobalVariable *FGV = static_cast<GlobalVariable *>( in createLDSVariableReplacement()
1420 LocalVars.push_back(new GlobalVariable( in createLDSVariableReplacement()
1438 [](const GlobalVariable *V) -> Type * { return V->getValueType(); }); in createLDSVariableReplacement()
1444 GlobalVariable *SGV = new GlobalVariable( in createLDSVariableReplacement()
1450 DenseMap<GlobalVariable *, Constant *> Map; in createLDSVariableReplacement()
1453 GlobalVariable *GV = LocalVars[I]; in createLDSVariableReplacement()
1469 Module &M, DenseSet<GlobalVariable *> const &LDSVarsToTransformArg, in replaceLDSVariablesWithStruct()
1477 auto LDSVarsToTransform = sortByName(std::vector<GlobalVariable *>( in replaceLDSVariablesWithStruct()
1499 GlobalVariable *GV = LDSVarsToTransform[I]; in replaceLDSVariablesWithStruct()