Open mfichman opened 11 years ago
Currently, each variable assignment does not use a new register, so the IR is not truly SSA. For example, the code:
x = 9 if (true) { x = 10 }
Generates
main: .L1: t0 <- load 1 t1 <- load 1 if not t1 goto .L3 .L2: t0 <- load 42 .L3:
A truly SSA IR would generate a new temporary for each assignment, and Phi functions at the correct locations:
main: .L1: t0 <- load 1 t1 <- load 1 if not t1 goto .L3 .L2: t2 <- load 42 .L3: phi(t0, t2)
Currently, each variable assignment does not use a new register, so the IR is not truly SSA. For example, the code:
Generates
A truly SSA IR would generate a new temporary for each assignment, and Phi functions at the correct locations: