You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This appears to be hitting on some bug in the expansive inliner that runs on the CPS IR.
A workaround for this right now would be to turn off that particular inliner by passing -Ccps.enable-inline=false to the compiler. Note that other function inlining will still happen in the compiler.
Thanks for the bug report! I've summarized the cases below for when we can get around to fixing this.
funnonrecF x = x + 1funrecF n = if n <= 0then0else1 + recF (n - 1)
val xs = PArray.fromRope (Rope.tabulateSequential (fn x => x) (1, 3))
(* broken *)val _ = PArray.map recF xs
(* works if you eta-expand *)(* val _ = PArray.map (fn x => recF x) xs *)(* not an issue for non-recursive function *)(* val _ = PArray.map nonrecF xs *)
Greetings from Sweden and Chalmers University of Technology!
I may have found something when exploring parallel arrays in Manticore. Here is a piece of code that works perfectly fine:
Here is a similar program with a parallel array and
PArray.map
instead of a list and the regularmap
:That code also works. But watch what happens when I eta-reduce the mapped function:
val _ = PArray.map f xs
The code doesn't compile anymore:
The dumped file is 1.7 MB, but I can't really extract any useful information from it.
It also turns out that everything works fine if
f
is not recursive:I'm not an expert, but there seems to be something going on here. What do you think?
The text was updated successfully, but these errors were encountered: