Closed SanjitBasker closed 1 year ago
Thanks a bunch for report this! It turned out to be a simple fix in brilirs
. Non-standard test cases like the one you provided are super helpful. Let me know if you have any more issues.
Try out the fix for yourself, let me know what else you run into(or any random questions). brilirs -t -f test/interp/core/non_linear_control_flow.bril false false
Awesome; many thanks to both of you! @Pat-Lafon beat me to it, but FWIW here is a reduced test case that elicits the same issue:
@main() {
jmp .start;
.lab:
ret;
.start:
jmp .lab;
}
I can confirm that #296 fixes this! A round of applause for @Pat-Lafon. :clap:
As part of my dataflow analysis lesson task, I came up with some funky Bril programs to stress the worklist algorithm. The following program (which is easier to understand when the order of the basic blocks is reversed) fails with
brilirs -p false false
but passesbrili -p false false
andbrilck
. It also seems to obey the list of rules given in the Bril documentation.For reference, here is the Python code I used to generate the program.
brilirs
has been super useful thus far, but I'm not super familiar with Rust so it'd be nice if a Rustacean could help us out here :)