Skip to content

Conversation

@jinge90
Copy link
Contributor

@jinge90 jinge90 commented Oct 28, 2025

Currently, we have getKernelNamesUsingAssert to detect all SPIR kernels which use assert functions via BFS. This PR extend it in 2 points:

  1. Support passing a general function name to it for detecting all SPIR kernels using it
  2. Support passing a group of special function names for searching SPIR kernels using them.

We may need to check other special function and can easily call it instead of adding a new getKernelNamesUsingXXX.

@jinge90 jinge90 requested a review from a team as a code owner October 28, 2025 08:26
…ion names

Signed-off-by: jinge90 <ge.jin@intel.com>
Copy link
Contributor

@maarquitos14 maarquitos14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, just wondering if you are planning any follow up patches to make use of this extension? Just to understand why we need this extended.

jinge90 and others added 2 commits October 29, 2025 09:31
Co-authored-by: Marcos Maronas <marcos.maronas@intel.com>
Co-authored-by: Marcos Maronas <marcos.maronas@intel.com>
@github-actions
Copy link
Contributor

@intel/llvm-gatekeepers please consider merging

Copy link
Contributor

@aelovikov-intel aelovikov-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why manual BFS instead of llvm/include/llvm/Analysis/{CallGraph.h,LazyCallGraph.h}?

And if call graphs above are not suitable, then GraphTraits specialization to enable generic BFS traversal would still be better, IMO.

@jinge90
Copy link
Contributor Author

jinge90 commented Oct 30, 2025

Why manual BFS instead of llvm/include/llvm/Analysis/{CallGraph.h,LazyCallGraph.h}?

And if call graphs above are not suitable, then GraphTraits specialization to enable generic BFS traversal would still be better, IMO.

Hi, @aelovikov-intel
I am not the original autor of "traverseCGToFindSPIRKernels" but this function is a small function with fewer than 30 lines of code, I prefer not changing it in this PR.
Thanks very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants