This is a followup to #193, which would have been a natural candidate for mutation if the code allowed it. Now it does! We can now mutate a Nir, which will transparently clone the underlying NirKind if needed. In most cases however I expect that no cloning will be necessary, so this should be good for perfs.
I wish we had benchmarks to check that, but that's a lot more effort.
This is a followup to #193, which would have been a natural candidate for mutation if the code allowed it. Now it does! We can now mutate a
Nir
, which will transparently clone the underlyingNirKind
if needed. In most cases however I expect that no cloning will be necessary, so this should be good for perfs. I wish we had benchmarks to check that, but that's a lot more effort.