Skip to content

Introduce OperationLike::walk #708

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

Merged
merged 5 commits into from
Jun 3, 2025
Merged

Introduce OperationLike::walk #708

merged 5 commits into from
Jun 3, 2025

Conversation

jaredhoberock
Copy link
Contributor

This exposes mlir_sys::mlirOperationWalk as OperationLike::walk, OperationLike::walk_pre, & OperationLike::walk_post

There are #[test]s for walk_pre & walk_post

This addresses #707

@jaredhoberock
Copy link
Contributor Author

Ready for review at your convenience @raviqqe

Copy link
Member

@raviqqe raviqqe left a comment

Choose a reason for hiding this comment

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

Thank you for the changes!

}

/// Convenience for a pre-order walk.
fn walk_pre<F>(&self, callback: F)
Copy link
Member

Choose a reason for hiding this comment

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

Can we move these wrapper methods under the helpers module or remove them for now? Currently, we have a policy to have one-to-one correspondence between the Rust API and C API as much as possible in the primary API.

@jaredhoberock
Copy link
Contributor Author

OK, thanks for the feedback. Extra wrapper methods are gone now.

@jaredhoberock jaredhoberock changed the title Introduce OperationLike::walk, ::walk_pre, and ::walk_post Introduce OperationLike::walk Jun 3, 2025
@raviqqe raviqqe enabled auto-merge (squash) June 3, 2025 00:19
@raviqqe
Copy link
Member

raviqqe commented Jun 3, 2025

Thank you for the changes!

@raviqqe raviqqe merged commit 92585d0 into mlir-rs:main Jun 3, 2025
12 checks passed
@jaredhoberock jaredhoberock mentioned this pull request Jun 6, 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.

2 participants