@@ -441,7 +441,7 @@ class AMDGPULowerModuleLDS {
441441 return KernelSet;
442442
443443 for (Function &Func : M.functions ()) {
444- if (Func.isDeclaration () || !isKernelLDS (& Func))
444+ if (Func.isDeclaration () || !isKernel ( Func))
445445 continue ;
446446 for (GlobalVariable *GV : LDSUsesInfo.indirect_access [&Func]) {
447447 if (VariableSet.contains (GV)) {
@@ -555,7 +555,7 @@ class AMDGPULowerModuleLDS {
555555 for (Function &Func : M->functions ()) {
556556 if (Func.isDeclaration ())
557557 continue ;
558- if (!isKernelLDS (& Func))
558+ if (!isKernel ( Func))
559559 continue ;
560560
561561 if (KernelsThatAllocateTableLDS.contains (&Func) ||
@@ -703,15 +703,15 @@ class AMDGPULowerModuleLDS {
703703 return false ;
704704 }
705705 Function *F = I->getFunction ();
706- return !isKernelLDS ( F);
706+ return !isKernel (* F);
707707 });
708708
709709 // Replace uses of module scope variable from kernel functions that
710710 // allocate the module scope variable, otherwise leave them unchanged
711711 // Record on each kernel whether the module scope global is used by it
712712
713713 for (Function &Func : M.functions ()) {
714- if (Func.isDeclaration () || !isKernelLDS (& Func))
714+ if (Func.isDeclaration () || !isKernel ( Func))
715715 continue ;
716716
717717 if (KernelsThatAllocateModuleLDS.contains (&Func)) {
@@ -743,7 +743,7 @@ class AMDGPULowerModuleLDS {
743743
744744 DenseMap<Function *, LDSVariableReplacement> KernelToReplacement;
745745 for (Function &Func : M.functions ()) {
746- if (Func.isDeclaration () || !isKernelLDS (& Func))
746+ if (Func.isDeclaration () || !isKernel ( Func))
747747 continue ;
748748
749749 DenseSet<GlobalVariable *> KernelUsedVariables;
@@ -828,7 +828,7 @@ class AMDGPULowerModuleLDS {
828828 // semantics. Setting the alignment here allows this IR pass to accurately
829829 // predict the exact constant at which it will be allocated.
830830
831- assert (isKernelLDS ( func));
831+ assert (isKernel (* func));
832832
833833 LLVMContext &Ctx = M.getContext ();
834834 const DataLayout &DL = M.getDataLayout ();
@@ -878,7 +878,7 @@ class AMDGPULowerModuleLDS {
878878 for (auto &func : OrderedKernels) {
879879
880880 if (KernelsThatIndirectlyAllocateDynamicLDS.contains (func)) {
881- assert (isKernelLDS ( func));
881+ assert (isKernel (* func));
882882 if (!func->hasName ()) {
883883 reportFatalUsageError (" anonymous kernels cannot use LDS variables" );
884884 }
@@ -912,7 +912,7 @@ class AMDGPULowerModuleLDS {
912912 auto *I = dyn_cast<Instruction>(U.getUser ());
913913 if (!I)
914914 continue ;
915- if (isKernelLDS ( I->getFunction ()))
915+ if (isKernel (* I->getFunction ()))
916916 continue ;
917917
918918 replaceUseWithTableLookup (M, Builder, table, GV, U, nullptr );
@@ -938,7 +938,7 @@ class AMDGPULowerModuleLDS {
938938 VariableFunctionMap LDSToKernelsThatNeedToAccessItIndirectly;
939939 for (auto &K : LDSUsesInfo.indirect_access ) {
940940 Function *F = K.first ;
941- assert (isKernelLDS ( F));
941+ assert (isKernel (* F));
942942 for (GlobalVariable *GV : K.second ) {
943943 LDSToKernelsThatNeedToAccessItIndirectly[GV].insert (F);
944944 }
@@ -1031,7 +1031,7 @@ class AMDGPULowerModuleLDS {
10311031 const DataLayout &DL = M.getDataLayout ();
10321032
10331033 for (Function &Func : M.functions ()) {
1034- if (Func.isDeclaration () || !isKernelLDS (& Func))
1034+ if (Func.isDeclaration () || !isKernel ( Func))
10351035 continue ;
10361036
10371037 // All three of these are optional. The first variable is allocated at
0 commit comments