-
Notifications
You must be signed in to change notification settings - Fork 7
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
Branch transformation creates invalid edge #80
Comments
I have a python bytecode based reproducer for this: from numba_rvsdg.core.datastructures.byte_flow import ByteFlow
from numba_rvsdg.rendering.rendering import ByteFlowRenderer
def foo(x, y, z):
if x:
while z:
print("A")
z = 0
print("B")
return x, y, z
byteflow = ByteFlow.from_bytecode(foo.__code__)
bcmap = byteflow.scfg.bcmap_from_bytecode(byteflow.bc)
byteflow = byteflow.restructure()
bfr = ByteFlowRenderer()
bfr.bcmap_from_bytecode(byteflow.bc)
byteflow.scfg.view("scfg") |
Debugging this some more with a
I see:
So the But then inside the
I am not sure what is going on here, but it seems like there are multiple For reference, here is the complete printout of the datastructure:
|
Using the patch:
I was able to identify that the error is caused by the call to |
See images below. Loop block has edge violating the region structures.
Reproducer 1
YAML:
original graph:
section of transformed graph showing the bad edge:
Reproducer 2
YAML:
section of transformed graph showing the bad edge:
The text was updated successfully, but these errors were encountered: