Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Verify reducibility of control-flow graphs. #215
SourcePawn is a structured language, which essentially means it does not have
While there are ways to make an irreducible graph reducible, there's an advantage to simply not allowing them: it verifies that the compiler is not generating unstructured control-flow. The language has no
There are many ways to determine reducibility. The implementation here is quite simple, but requires a bunch of preceding data structures:
I read somewhere that step 2 is enough for determining irreducibility, because the number of iterations to reach a fixpoint should be <= 2 for reducible graphs. Indeed that is true for the corpus of .smx files I downloaded. But I can't find where I read this.