Skip to content
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

Add equivalent to Rust's std::hint::blackbox #6471

Closed
TomAFrench opened this issue Nov 7, 2024 · 0 comments · Fixed by #6529
Closed

Add equivalent to Rust's std::hint::blackbox #6471

TomAFrench opened this issue Nov 7, 2024 · 0 comments · Fixed by #6529
Assignees

Comments

@TomAFrench
Copy link
Member

In the short term (and complementary to debug mode in the future), we could add something similar to Rust's blackbox function. This would just be an identity function which is listed as having side-effects, which would block any SSA optimizations from being applied to the outputs.

Originally posted by @TomAFrench in #2128

One tool that I've found myself needing a few times when minimising bug reproductions is a way to block our SSA optimization passes being applied to a value. This would also allow us to prevent test programs from being optimized down to nothing and have them resemble runtime code more closely.

@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Nov 7, 2024
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants