-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling of unused return values from collapsed dataflow functions. #33
Comments
This is already implemented as DeadEndArcs on the Rust backend. |
Not quite, tough the two are definitely related. Because the |
Also used the chance to remove the compound arcs
Oh, I should have stated that more clearly, sorry. |
It has transpired that situation can occur where one of the return values from a collapsed dataflow function is not used.
Example
This creates a graph similar to this
Note that
ctrl
is never used.Similarly we might construct a situation where
smap
is used only for side effects likeHere the
i
binding is unused.The problem is that functions like
smapFun
take care of their own destructuring and expect the corresponding return arcs in the rust backend. The real problem is that our graph representation that the compiler returns does not account for these missing arcs (they simply do not show up).The question is what to do about it. It is, I think, unwise to work around this in the backend by looking whether there are missing indices. Because this only works so long as it is not the last argument (how would we know its index is missing) or we also track how many arguments are expected.
I think its simpler to add a list of "dead arcs" to the graph representation. And the backend can do with it as it pleases.
The text was updated successfully, but these errors were encountered: