Closed lthls closed 2 weeks ago
We still keep both variables though, I'll see if I can fix that too but I think this PR should be merged anyway (assuming it doesn't cause any regressions).
It looks like I mistakenly ran the test without join points, in which case it is expected that we still get two unboxed variables. With join points we only keep a single unboxed variable, as expected.
This ensures that we don't forget to join head types when several parameters are all aliases of each other without a common alias in the environment at fork
This problem starts appearing very frequently after #2628, and was causing a number of allocations to be kept because the absence of a head type made unboxing fail.
Here is an example that doesn't involve #2628:
With this PR,
a
andb
are unboxed properly and the result contains a single allocation at the end. We still keep both variables though, I'll see if I can fix that too but I think this PR should be merged anyway (assuming it doesn't cause any regressions).