Files
revng-revng/tools
Alessandro Di Federico a704926ddc Ensure blocks are always reachable in root
Through `JumpTargetManager::setCFGForm` the `root` function CFG can be
changed so that the `dispatcher` is minimized, i.e., it jumps only to
those basic blocks that would be otherwise unreachable. This allows us
to perform more accurate and simpler analyses.

To bring the function in this state we used to check if there was at
least a non-dispatcher predecessor, however this did not work with loops
reachable only from the dispatcher, since they had a predecessor, but
that didn't mean it was reachable from the entry.

This commit fixes the problem by navigating the CFG in reverse-post
order, registering all the reachable blocks and then restoring the edge
from the dispatcher to those that are not reachable.

Additionally:

* Basic blocks with no predecessors are now purged before
  `JumpTargetManager::harvest`.
* The `CFGForm` enum is now a namespace.
2018-10-16 16:26:35 +02:00
..
2018-10-03 23:11:12 +02:00