Skip to content

Add pass which inlines constant arguments into brillig functions #6812

Open
@TomAFrench

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

  • Status

    📋 Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions