Consider the program
fn main(b: Field) -> pub Field {
unsafe {
identity(b)
}
}
unconstrained fn identity(b: Field) -> Field {
b
}
This compiles down to the SSA
acir(inline) predicate_pure fn main f0 {
b0(v0: Field):
v2 = call f1(v0) -> Field
return v2
}
brillig(inline) predicate_pure fn identity f1 {
b0(v0: Field):
return v0
}
We should be able to determine that f1 is pure and we can write some/all of its outputs directly in terms of its inputs. We can then replace any references to the outputs with the associated input and simplify the function signature (or remove the function call) accordingly