-
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
Post-dominance without exit blocks #31
Comments
Sorry it took me a while to get to this. Very interesting! By the strict definition, if there are no exit blocks then I think B post dominates A holds for all blocks A and B (because there are no paths from A to an exit block, so all 0 of them pass through B.) However, the example looks intuitively wrong, because of the edge from 14 to 15. 14 is the merge block for the loop headed at 13, and 15 is the continue target, so it seems very undesirable for there to be a branch from the merge block to the continue target. Do you see what I mean? Is it possible to come up with an even simpler example that exposes this issue? |
Here's a simpler example: yet SPIRV-VAL says:
Now, the edge 12->13 by definition is not an exit, right? (because 13 is contained in the innermost construct containing 12. Haven't figured out though what constraint should rule out a merge->continue edge here, but will keep thinking.. |
Can we please try two alternative graphs: (1) The same as the above graph, but eliminating nodes 9 and 10, so that 8 branches straight to 11, and there is no edge 12->9 (2) The same as (1), but with an extra node 14, which is an exit node, and an edge 12-14. It would be great to know which (if either) of these is valid according to our model. |
Alternative 1: Alloy model is happy; spirv-val is happy, too. Alternative 2: Alloy reject this (because of 2 edges 10->11 and 10->12 leaving away from 10), but spirv-val accepts it. |
The
The "original" spirv-val accepts |
Our Alloy model generated the valid example attached. SPIRV-VAL however rejects it with the cause:
But here there are no exit blocks (function-return instructions). Looks like SPIRV-VAL “believes” that block 15 is an exit! @afd What do you think should happen with post-dominance if there are no exit blocks?
!BackEdgePostDominatesContinueTarget.zip
The text was updated successfully, but these errors were encountered: