One of the most important steps in the process of compilation is optimization, with which compiler outputs quicker and more efficient machine code. Compilers have to optimize quickly, since programmers do not want to wait long to get compiled programs. In master thesis we want to find out if we can improve already compiled programs when we are not constrained with time. In order to find the answer to this question we have developed an optimizer that optimizes MMIX machine code. We test the optimizer on the set of test programs and analyse the results. We find out that machine code optimization is not constrained with time, but with the quality of designed optimizations. Despite that, we develop an optimizer, that successfully reduces the length of the program and the number of instructions during execution of the program.
|