@[reducible, inline]
Mapping from variable to projections
Equations
Instances For
@[reducible, inline]
Equations
Instances For
@[inline]
Equations
Instances For
Create a mapping from variables to projections. This function assumes variable ids have been normalized
Equations
Instances For
Return true iff x is consumed in all branches of the current block.
Here consumption means the block contains a dec x or reuse x ....
Replace reuse x ctor ... with ctor ..., and remove dec x
Remove unnecessary set/uset/sset operations
replace
x := reset y; b
with
let f_i_1 := proj[i_1] y;
...
let f_i_k := proj[i_k] y;
b'
where i_js are the field indexes
that the code did not touch immediately before the reset.
That is mask[j] == none.
b' is b where y dec x is replaced with del y,
and z := reuse x ctor_i ws; F is replaced with
set x i ws[i] operations, and we replace z with x in F
Equations
Instances For
(Try to) expand reset and reuse instructions.