Skip to content

[NFC][SYCL][Graph] Add successors/predecessors views + cleanup #19332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: sycl
Choose a base branch
from

Conversation

aelovikov-intel
Copy link
Contributor

Part of refactoring to get rid of most (all?) std::weak_ptr<node_impl> and some of std::shared_ptr<node_impl> started in #19295. Use nodes_range from that PR to implement successors/predecessors views and update read-only accesses to the successors/predecessors to go through them.

I'm not changing the data members MSuccessors/MPredecessors yet because it would affect unittests. I'd prefer to refactor most of the code in future PRs before making that change and updating unittests in one go.

I'm updating some APIs to accept node_impl & instead of std::shared_ptr where the change is mostly localized to the callers iterating over successors/predecessors and doesn't spoil into other code too much. For those that weren't updated here we (temporarily) use shared_from_this() but I expect to eliminate those unnecessary copies when those interfaces will be updated in the subsequent PRs.

Part of refactoring to get rid of most (all?) `std::weak_ptr<node_impl>`
and some of `std::shared_ptr<node_impl>` started in
intel#19295. Use `nodes_range` from that PR
to implement `successors`/`predecessors` views and update read-only
accesses to the successors/predecessors to go through them.

I'm not changing the data members `MSuccessors`/`MPredecessors` yet
because it would affect unittests. I'd prefer to refactor most of the
code in future PRs before making that change and updating unittests in
one go.

I'm updating some APIs to accept `node_impl &` instead of
`std::shared_ptr` where the change is mostly localized to the callers
iterating over successors/predecessors and doesn't spoil into other code
too much. For those that weren't updated here we (temporarily) use
`shared_from_this()` but I expect to eliminate those unnecessary copies
when those interfaces will be updated in the subsequent PRs.
@aelovikov-intel aelovikov-intel requested a review from a team as a code owner July 7, 2025 20:13
@aelovikov-intel aelovikov-intel requested a review from Bensuo July 7, 2025 20:13
aelovikov-intel added a commit to aelovikov-intel/llvm that referenced this pull request Jul 7, 2025
aelovikov-intel added a commit to aelovikov-intel/llvm that referenced this pull request Jul 7, 2025
aelovikov-intel added a commit to aelovikov-intel/llvm that referenced this pull request Jul 7, 2025
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.

1 participant