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
According to our current Scope analysis, while_head is free within the scope of zoop, as it does not use any of zoop's parameters. consequently, while_head is later processed a scope on it's own, which breaks the codegen_prepare pass that expects a valid return parameter on all scope entries.
This is a problem for both master and app-node (though I just added an assert against this scenario in codegen_prepare instead of letting it segfault).
Any comments ?
The text was updated successfully, but these errors were encountered:
We could do that, but we're still facing a problem since the incriminated free continuation won't be processed/emitted (since it's not part of another scope either). So broken codegen at least still.
One way I thought this could be made to work is reversing the criteria: instead of considering everything that uses the entry continuation params, we could perhaps look at everything (odd ordered?) that doesn't use foreign parameters. But thinking about it it seems to create more problems than anything.
Another possibility is doing an analysis based on a control flow graph, and including/rejecting callees based on their order (so you avoid including fn calls). That also sounds quite brittle but maybe it would work ?
I should point out Impala doesn't suffer from this, because the loop header gets another (unused) parameter, and that "grounds" it in the scope. However the unused parameter is undesirable and should even be taken care of by an smarter parameter elimination pass (aware of loops)
We could do that, but we're still facing a problem since the incriminated free continuation won't be processed/emitted (since it's not part of another scope either). So broken codegen at least still.
Well that's another bug. The backends and other analyses/transformations should rely on the CFG to determine the list of basic blocks, not on the scope.
This delightful snippet (for Artic) tricks Thorin into thinking a basic block should be the entry of a scope:
we get the following IR after
opt()
:According to our current Scope analysis,
while_head
is free within the scope ofzoop
, as it does not use any ofzoop
's parameters. consequently,while_head
is later processed a scope on it's own, which breaks thecodegen_prepare
pass that expects a valid return parameter on all scope entries.This is a problem for both
master
andapp-node
(though I just added an assert against this scenario incodegen_prepare
instead of letting it segfault).Any comments ?
The text was updated successfully, but these errors were encountered: