Skip to content

Implement IR printing functionality of the PassManager #455

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
bitwalker opened this issue Mar 25, 2025 · 1 comment · May be fixed by #494
Open

Implement IR printing functionality of the PassManager #455

bitwalker opened this issue Mar 25, 2025 · 1 comment · May be fixed by #494
Labels
good first issue Good for newcomers ir Improvements to, or bugs in, the implementation of the IR

Comments

@bitwalker
Copy link
Contributor

During development of the new IR, I stubbed out functionality for enabling the PassManager implementation to print the IR before/after each pass is applied, optionally only when modified, etc.

As the size of the programs we're troubleshooting grows, it will become increasingly necessary to be able to filter tracing/debug output to specific functions or operations. As a temporary workaround, I recently added the Print pass in #454 that provides this to a limited degree, but what we really need is for the PassManager to provide this for us, as it can provide much more precision.

The configuration and enablement of the feature is partially implemented, but the main thing missing is the actual handling of that configuration at appropriate points during pass pipeline execution.

We likely also need to come up with a better wrapper around the log crate, so we can emit more precise log targets, enabling us to filter the log output by function and target, but I'll defer that to another issue.

@bitwalker bitwalker added feature good first issue Good for newcomers ir Improvements to, or bugs in, the implementation of the IR and removed feature labels Mar 25, 2025
@mooori
Copy link

mooori commented Apr 23, 2025

I'm giving this a try in #486. Even though it's still a draft, could you perhaps have a quick look and let me know if it's going in the right direction?

@igaray igaray linked a pull request May 1, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers ir Improvements to, or bugs in, the implementation of the IR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants