BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News An Explanation of the Phoenix Compiler Framework

An Explanation of the Phoenix Compiler Framework

This item in japanese

Bookmarks

Andy Ayers, an architect on the Phoenix Framework, tries to explain what the Phoenix Compiler Framework is and how it works in a video made by Channel9. Phoenix works as compiler, but it is more than that. It is a software optimization and analysis framework that can be used by other compilers and tools. It can generate binary code, but it can also write MSIL assemblies. The source code can be analyzed and is represented into an IR (Intermediate Representation) form, which can be later analyzed and manipulated with various tools. It does not work as a JITter.

Like any other compiler, Phoenix takes the source code and transforms it into binaries. One main difference is that Phoenix groups all the Microsoft compilers (more than 25 of them) into one, generating the binaries or MSIL code for all the languages and platforms Microsoft supports.

Phoenix is not just a compiler, it's a framework with an API and being extendable via plug-ins. One can use the API to write tools making use of the Phoenix features. For example, one can write his own tool which analyzes the IR files and generates some conclusions on how the source code should be optimized. The plug-able feature is also very handy. Andy says that Microsoft usually needs 1-2 years to generate all the compilers for a new hardware chip that appears. Now, the hardware manufacturer can deliver a Phoenix plug-in used to compile the source code for the new chip when the chip is released to the market.

As any other major Microsoft compiler, Phoenix must pass the test of compiling Windows, Office, Visual Studio, and other several large products which push the compiler to its limits. This is done to ensure the compiler is tested against real-world, complex software in order to detect any bugs existing in it.

The compiler is internally multithreaded resulting in faster build time depending on the platform used for compilation. On a four processor machine, the build time can be 5 times faster than on a single processor one.

Microsoft Connect has recently released the Phoenix SDK - April 2008 CTP. This release has many enhancements and bug fixes over the previous pre-release version made available on July 2007. More information about Phoenix can be found on Microsoft Connect.

Rate this Article

Adoption
Style

BT