Compiler Design
Compiler Design
1) Local optimization
2) Global optimization
3) Loop optimization
4) Peephole optimization
❖ Improved performance: The target code generator can generate code that is specifically
optimized for the target architecture. This can lead to significant performance
improvements over code that is generated for a generic architecture.
❖ Reduced code size: The target code generator can often generate code that is smaller
than code that is generated by a generic compiler. This can be beneficial for embedded
systems and other applications where code size is a critical factor.
❖ Improved portability: The target code generator can generate code that is portable to a
variety of target architectures. This can make it easier to port applications to new
platforms.