Abstract

A compiler optimizes by analyzing source code and determining a representation of the source code in machine language that executes as effectively as possible. Compiler optimizations can be grouped into general optimizations and advanced optimizations. General optimizations are composed of architecture-independent and architecture-dependent optimizations. Architecture-independent optimizations do not rely upon knowledge of the underlying architecture. Architecture-dependent optimizations include register allocation and instruction scheduling. Register allocation is compiler functionality that determines where variables are loaded for computation in the processor and instruction scheduling is the ordering of machine language code based upon internal processor constraints and program dependencies. Compilers typically process one function at a time and in isolation from other functions in the program. During optimization, the compiler must often make conservative assumptions regarding values in the program due to side effects that may occur in other functions, limiting the opportunity for optimization. A compiler is used with interprocedural optimization to optimize each function with detailed knowledge of other functions in the application. Developers can aid compiler optimization in situations where the compiler is restricted in terms of making assumptions about the code, how the code is laid out in memory, and when the developer has prior knowledge about the run-time behavior of the code.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.