|
UVa CS
|
If you describe your intermediate forms using Zephyr's Abstract Syntax Description Language (ASDL), we can generate data-structure definitions in C, C++, Java, Standard ML, and Haskell. Your IR can be serialized on disk and freely exchanged among compiler passes written in these languages; asdlGen creates the glue that holds your compiler together. You can also visualize your IR using our graphical browser.
To compile code for multiple targets, the state of the art is to use a code-generator generator, which lets you specify a translation from an intermediate code to a target instruction set. We're trying to separate the intermediate code from the instruction set, so we can develop machine descriptions that can be reused, not just with compilers, but also with other tools. The idea is to generate the machine-dependent parts from descriptions of instructions' semantics, of binary representations, or of other properties. Zephyr's Computer Systems Description Languages (CSDL) let you describe as much or as little as you need for your application.
Getting high-quality code requires optimization. Zephyr's very portable optimizer (vpo) provides instruction selection, instruction scheduling, and classical global optimization. Vpo operates on programs represented as register-transfer lists (RTLs) in SSA form. All vpo optimizations are ``plug and play,'' and it is easy to add new ones. Vpo provides a level playing field for evaluating different optimizations.
Our overview describes Zephyr in more detail.