How to Retarget Compilers?
. Changing specifications of a phase can lead to a new compiler
- If machine specifications are changed then compiler can generate code for a different machine without changing any other phase
- If front end specifications are changed then we can get compiler for a new language
. Tool based compiler development cuts down development/maintenance time by almost 30-40%
. Tool development/testing is one time effort
. Compiler performance can be improved by improving a tool and/or specification for a particular phase
In tool based compilers, change in one phase of the compiler doesn't affect other phases. Its phases are independent of each other and hence the cost of maintenance is cut down drastically. Just make a tool for once and then use it as many times as you want. With tools each time you need a compiler you won't have to write it, you can just "generate" it.
|