mpl icon indicating copy to clipboard operation
mpl copied to clipboard

pull MLton deep flattening fix

Open shwestrick opened this issue 2 months ago • 3 comments

Just keeping track of this, we should pull it into MaPLe too: https://github.com/MLton/mlton/pull/627

shwestrick avatar Oct 31 '25 14:10 shwestrick

Has MaPLe triggered the bug? More generally, should pull upstream MLton into MaPLe.

MatthewFluet avatar Oct 31 '25 14:10 MatthewFluet

I haven't explicitly tested for it yet! I assume it would probably be reproducible in MaPLe.

shwestrick avatar Oct 31 '25 14:10 shwestrick

The interesting thing about that bug is that we didn't see in really "in the wild". It came up in the context of a MS capstone project that is modifying MLton and in the absence of some forthcoming optimizations generates IR-code that is likely inhibiting tail-calls, which don't get turned into loops, which inhibits inlining; so the resulting IR program at deepFlatten is pretty different from what iis typical.

MatthewFluet avatar Oct 31 '25 17:10 MatthewFluet