Álvaro Rodríguez
Álvaro Rodríguez
It's just that the SSA seemed quite large after optimization, I only saw a raduction in instructions of ~500 after inlining to ~300 after all the optimization pipeline, with all...
Interesting, I tried forcing trying to unroll loops in brillig to test how it'd look like with unrolled loops and it seems like it didn't help much reducing instruction count:...
Yeah I think for this to improve mem2reg needs to do more than one pass of the code to gather information about loops ):
Another extreme example, 15% of the runtime in [this test](https://github.com/zac-williamson/noir_bigcurve/blob/main/src/bigcurve_test.nr#L129) is spent evaluating std::compat::is_bn254(), which should be known at compile time (but contains a loop)
> looking into a pass which automatically inlines brilllig functions Do you mean unroll? we are always inlining in brillig currently unless it's part of a recursive loop
For this function: ```rust unconstrained fn main() { assert(std::compat::is_bn254()); } ``` This is the final SSA after all optimizations: ``` After Array Set Optimizations: brillig fn main f0 { b0():...
That sounds great! If we reach this point: ``` After Array Set Optimizations: brillig fn main f0 { b0(): v36 = allocate store u1 1 at v36 v37 = allocate...
fixed in https://github.com/AztecProtocol/aztec-packages/pull/5208