Today, I'm done with my Compiler Construction finals paper at university. The finals paper included a question that asked me to convert a for loop into 3-address code. The function it asked me to convert was:
for(i=1;i<=10;i++) x=y+z
So, I did loop unrolling and converted the given statements to the equivalent expression:
x=(y+z)^10
Then, I made 3-address code of the converted code:
Please let me know if it is correct.