[m-rev.] [m-dev.] gh72 test failures at higher optimization levels

Peter Wang novalazy at gmail.com
Thu Jan 28 16:46:02 AEDT 2021


On Tue, 26 Jan 2021 11:22:57 +1100 Peter Wang <novalazy at gmail.com> wrote:
> 
> I don't like the idea of leaving the HLDS in an inconsistent state,
> even if it's limited to daio clones. I might take another look at
> fixing it.

I put some work into this, i.e. fixing up higher order types and insts:

 1. when constructing a closure based on a clone procedure
 2. in the higher order arguments of a clone procedure

(N.B. higher order terms can have arguments that are themselves
higher order, so "fixing up" types and insts is recursive)

But there are yet more places that would need to be updated,
at least:

 3. any call could return a higher order term that is subject to the
    daio transformation; the variable bound to that term would
    need to have its type and inst fixed

 4. even a closure based on a procedure without daio arguments could
    have a higher order argument that does have daio arguments,
    so the variable bound to that closure would potentially
    need to have its type and inst fixed

There is also a problem with the entire transformation being skipped
when there are no procedures with daio arguments in the current module,
with the result that:

 5. calls to imported procedures will not be transformed
 6. calls to higher order terms may not be transformed

I think we should just disallow higher order terms with daio arguments.
That will remove the need to solve any of the points above, except (5).

Peter


More information about the reviews mailing list