Conversation
|
The result for Fig 6.a differs to Basil; we only identify two loops whereas basil identifiers 3 (2 irreducible). https://github.com/agle/bincaml/actions/runs/23731415109/job/69125853957?pr=108#step:8:28
Here we pick just |
|
this one before transform? I'll have a think { block = ("%S", 0); dfs_pos = 1; loop = NonLoop }
, { block = ("%h3", 1); dfs_pos = 2;
loop =
PrimaryHeader {primary_header = None; headers = {("%h3", 1)};
nodes =
{("%h3", 1), ("%x", 2), ("%y", 3), ("%b0", 4), ("%h2", 5), ("%h1", 6), ("%b", 7), ("%z", 8), ("%a", 9), ("%back", 10)}}
}
, { block = ("%x", 2); dfs_pos = 3;
loop = LoopParticipant {primary_header = ("%h3", 1)} }
, { block = ("%y", 3); dfs_pos = 4;
loop = LoopParticipant {primary_header = ("%h3", 1)} }
, { block = ("%b0", 4); dfs_pos = 5;
loop = LoopParticipant {primary_header = ("%h3", 1)} }
, { block = ("%b", 7); dfs_pos = 6;
loop =
PrimaryHeader {primary_header = (Some ("%h3", 1));
headers = {("%h2", 5), ("%b", 7)};
nodes = {("%h2", 5), ("%h1", 6), ("%b", 7), ("%z", 8), ("%a", 9)}}
}
, { block = ("%z", 8); dfs_pos = 7;
loop = LoopParticipant {primary_header = ("%b", 7)} }
, { block = ("%h1", 6); dfs_pos = 8;
loop = LoopParticipant {primary_header = ("%b", 7)} }
, { block = ("%a", 9); dfs_pos = 8;
loop = LoopParticipant {primary_header = ("%b", 7)} }
, { block = ("%h2", 5); dfs_pos = 9;
loop = LoopParticipant {primary_header = ("%b", 7)} }
, { block = ("%back", 10); dfs_pos = 9;
loop = LoopParticipant {primary_header = ("%h3", 1)} }
, { block = ("%exit", 11); dfs_pos = 10; loop = NonLoop }
|
|
do you have the full sbasil loop infos? |
|
|
Yeah I'm happy with both the sbasil and bincaml forests. If you visit b first (like bincaml), then there is no sub-loop because all the inner loops go through b. If you visit h2 first, then there's a subloop without h2 via h1. As long as the transform works, it should be fine. |
| { | ||
| name = "irreducible-loops"; | ||
| apply = Proc Transforms.Irreducible_loop.transform; | ||
| doc = "Remove blocks unreachable from entry"; |
There was a problem hiding this comment.
| doc = "Remove blocks unreachable from entry"; | |
| doc = "Transform irreducible loops to reducible ones"; |

Add irreducible loop transform and pull across more tests