File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -1218,6 +1218,8 @@ bool AMDGPUSwLowerLDS::run() {
1218
1218
for (auto &K : FuncLDSAccessInfo.NonKernelToLDSAccessMap ) {
1219
1219
Function *Func = K.first ;
1220
1220
DenseSet<GlobalVariable *> &LDSGlobals = K.second ;
1221
+ if (Func->isDeclaration () || LDSGlobals.empty ())
1222
+ continue ;
1221
1223
SetVector<GlobalVariable *> OrderedLDSGlobals = sortByName (
1222
1224
std::vector<GlobalVariable *>(LDSGlobals.begin (), LDSGlobals.end ()));
1223
1225
lowerNonKernelLDSAccesses (Func, OrderedLDSGlobals, NKLDSParams);
@@ -1226,6 +1228,8 @@ bool AMDGPUSwLowerLDS::run() {
1226
1228
auto &K = FuncLDSAccessInfo.NonKernelToLDSAccessMap ;
1227
1229
if (K.find (Func) != K.end ())
1228
1230
continue ;
1231
+ if (Func->isDeclaration ())
1232
+ continue ;
1229
1233
SetVector<llvm::GlobalVariable *> Vec;
1230
1234
lowerNonKernelLDSAccesses (Func, Vec, NKLDSParams);
1231
1235
}
You can’t perform that action at this time.
0 commit comments