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 pass which inlines constant arguments into brillig functions #6812

Open
TomAFrench opened this issue Dec 13, 2024 · 0 comments · May be fixed by #7559
Open

Add pass which inlines constant arguments into brillig functions #6812

TomAFrench opened this issue Dec 13, 2024 · 0 comments · May be fixed by #7559
Assignees

Comments

@TomAFrench
Copy link
Member

In the https://github.com/noir-lang/noir-bignum library it's common for programs to pass the same constant Params object to all of the unconstrained functions used as this contains config values for the field. We should be able to recognise this and push this params constant inside of the brillig function's SSA and remove the argument from the function entirely. This would allow us to perform more constant folding optimizations within the brillig function itself as currently we're unable to use the fact that we know the field in use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

Successfully merging a pull request may close this issue.

2 participants