Chapter 2: Introduction to compilers

Intermediate code generation

Code Generation

CMP Cx, 0 CMOVZ Dx,Cx

 

There is a clear intermediate code optimization - with 2 different sets of codes having 2 different parse trees.The optimized code does away with the redundancy in the original code and produces the same result.