Gyoji Compiler
|
Checks for the existence of unreachable code. More...
#include <gyoji-analysis.hpp>
Checks for the existence of unreachable code.
This pass is intended to uncover basic blocks which contain instructions after the terminating instruction (most commonly after a jump, or return statement).
These indicate that the code below those terminating statements is systematically and definitely unreachable. In this case, the program is invalid because it contains such constructs.
The other thing we look for here are basic blocks which are disconnected from the graph, so they cannot be reached in any way.