fixes the free-vars-by-dominators computation algorithm #907
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This algorithm kicks in in the optimization-level=3 and ... breaks
everything. The bug was trivial, the kill set was computed before
the live set, hence a block was defining its own variables before it
was used.
This bug affects only 1.5 version with optimization-level=3.
Note, there is still a subtle problem with this algorithm that comes
from the "Everything Dominates Unreachable Block" lemma in the
dominators algorithm. And altough this theorem is valid wrt to the
graph theoretic definition of unreachable, which indeed implies that a
block is not reachable under no circumstances, in the binary analysis
an unreachable block is just a block that might be reachable we just
don't know by which paths. In other words, we have an
under-approximation of a control flow graph, and the unsoundness of
the graph is propagated to the unsoundness of the dominator tree
computation. That lies more or less in the vein with the idea of the
optimization-level=3 which is as as unsound as the underlying graph.