aeneas
aeneas copied to clipboard
Add a micro-pass to simplify array updates
trafficstars
Consider the following array update:
a[i] = v;
It gets extracted to:
let (_, index_mut_back) ← Array.index_mut_usize U32 16#usize a i
let a1 ← index_mut_back x
It would be good to implement a micro-pass which updates this pattern to something like this:
let a1 ← Array.update U32 16#usize a i x