@@ -368,14 +368,14 @@ void groupEntryPoints(const Module &M, EntryPointGroupMap &EntryPointsGroups,
368
368
// This function traverses over reversed call graph by BFS algorithm.
369
369
// It means that an edge links some function @func with functions
370
370
// which contain call of function @func. It starts from
371
- // @StartingFunction and lifts up until it reach all reachable functions
371
+ // @StartingFunction and lifts up until it reach all reachable functions,
372
372
// or it reaches some function containing "referenced-indirectly" attribute.
373
373
// If it reaches "referenced-indirectly" attribute than it returns an empty
374
374
// Optional.
375
375
// Otherwise, it returns an Optional containing a list of reached
376
376
// SPIR kernel function's names.
377
377
Optional<std::vector<StringRef>>
378
- TraverseCGToFindSPIRKernels (const Function *StartingFunction) {
378
+ traverseCGToFindSPIRKernels (const Function *StartingFunction) {
379
379
std::queue<const Function *> FunctionsToVisit;
380
380
std::unordered_set<const Function *> VisitedFunctions;
381
381
FunctionsToVisit.push (StartingFunction);
@@ -411,16 +411,16 @@ TraverseCGToFindSPIRKernels(const Function *StartingFunction) {
411
411
}
412
412
}
413
413
414
- return std::move (KernelNames);
414
+ return { std::move (KernelNames)} ;
415
415
}
416
416
417
417
std::vector<StringRef> getKernelNamesUsingAssert (const Module &M) {
418
- auto DevicelibAssertFailFunction = M.getFunction (" __devicelib_assert_fail" );
418
+ auto * DevicelibAssertFailFunction = M.getFunction (" __devicelib_assert_fail" );
419
419
if (!DevicelibAssertFailFunction)
420
420
return {};
421
421
422
422
auto TraverseResult =
423
- TraverseCGToFindSPIRKernels (DevicelibAssertFailFunction);
423
+ traverseCGToFindSPIRKernels (DevicelibAssertFailFunction);
424
424
425
425
if (TraverseResult.hasValue ())
426
426
return std::move (*TraverseResult);
@@ -438,7 +438,7 @@ std::vector<StringRef> getKernelNamesUsingAssert(const Module &M) {
438
438
439
439
// Gets reqd_work_group_size information for function Func.
440
440
std::vector<uint32_t > getKernelReqdWorkGroupSizeMetadata (const Function &Func) {
441
- auto ReqdWorkGroupSizeMD = Func.getMetadata (" reqd_work_group_size" );
441
+ auto * ReqdWorkGroupSizeMD = Func.getMetadata (" reqd_work_group_size" );
442
442
if (!ReqdWorkGroupSizeMD)
443
443
return {};
444
444
// TODO: Remove 3-operand assumption when it is relaxed.
0 commit comments