After reading the materials again, I found a small allusion to the book "Modern Implementation of the Compiler" in Java, the second edition - AW Applet on the implicit definition of the variable c0
. A further search showed that the algorithms expect that all variables have an implicit definition immediately before the first base block. This implicit definition is the fact that the variable is a global, parameter, or uninitialized variable.
Adding this implicit definition solves my problem and the example will look like this:
x1 = 1; // A if (P) // A y1 = x1 + 1; // B y2 = y1 + 1; // B y3 = Ο(y0, y2) // C x2 = x1 + 1; // C return; // C
source share