Execute any Brillig
opcodes which have constant inputs at compile time
#2189
Labels
Brillig
opcodes which have constant inputs at compile time
#2189
Problem
The
brillig_integer_binary_operations
integration test has zero arguments so should be able to be compiled down to an empty circuit. However, because of our usage of brillig opcodes we have 43 gates which need to be handled by the backend.This is low-hanging fruit for compiler optimisation.
Happy Case
When performing ACIR gen on brillig opcodes we should check to see if all of the inputs are known constants. If so then we should execute the brillig opcode within the compiler and return constant
AcirVar
s for the opcode outputs. This will allow us to use these values to perform later optimisations.Alternatives Considered
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
Yes
Support Needs
No response
The text was updated successfully, but these errors were encountered: