Skip to content

Commit 0c07993

Browse files
scottp101sys_zuul
authored andcommitted
Move the 'istrue' check up. It is always false so this is NFC.
Change-Id: I09a2d79c31e11c922c4e7afc60819d7a2dec5cf9
1 parent aa9b484 commit 0c07993

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

IGC/AdaptorCommon/ProcessFuncAttributes.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,19 +283,21 @@ bool ProcessFuncAttributes::runOnModule(Module& M)
283283
}
284284
}
285285

286-
if (isEntryFunc(pMdUtils, F))
286+
bool istrue = false;
287+
288+
const bool isKernel = isEntryFunc(pMdUtils, F);
289+
290+
if (isKernel && !istrue)
287291
{
288292
// No need to process kernel funcs any further
289293
continue;
290294
}
291-
else
295+
else if (!isKernel)
292296
{
293297
F->setLinkage(GlobalValue::InternalLinkage);
294298
Changed = true;
295299
}
296300

297-
298-
bool istrue = false;
299301
// Add function attribute for indirectly called functions
300302
if (IGC_IS_FLAG_ENABLED(EnableFunctionPointer))
301303
{
@@ -331,6 +333,9 @@ bool ProcessFuncAttributes::runOnModule(Module& M)
331333
}
332334
}
333335

336+
if (isKernel)
337+
continue;
338+
334339
// Flag for function calls where alwaysinline must be true
335340
bool mustAlwaysInline = false;
336341

0 commit comments

Comments
 (0)