- Phoenix (compiler framework)
Phoenix framework, being developed at
Microsoft Research , is a framework for developingcompiler s as well as program analysis, testing and optimization tools, to be used as the back-end for future compiler technologies fromMicrosoft . [cite web | url = http://research.microsoft.com/phoenix/ | title = Phoenix Academic Program | accessdate = 2007-11-16] It is also available as an SDK, a pre-release build of which has been made accessible, to create compilers and code analysis tools using the Phoenix framework.Overview
Phoenix defines an "Intermediate Representation" (IR) for programs, using ASTs, flow graphs, and an exception handling model. For any program to be handled by Phoenix, it needs to be converted to this representation. The specification for these file type-specific converters, called "File Readers" in Phoenix terminology, is also specified. Phoenix comes included with Readers for
Portable Executable binary files, CIL and the output ofVisual C++ front-end.cite web | url = https://connect.microsoft.com/content/content.aspx?ContentID=4527&SiteID=214 | title = Phoenix Compiler Backend | accessdate = 2007-11-16] Readers for other languages can be written using the Phoenix SDK, though separate tools such aslex andyacc need to be used to write thelexer andparser , respectively.Once the program has been converted to the IR, the analysis and optimization tools can operate on that form. Phoenix includes a selection of tools - including block counting, memory analysis,
code coverage , code analysis and optimization. [cite web | url = https://connect.microsoft.com/content/content.aspx?ContentID=4526&SiteID=214 | title = Phoenix based tools | accessdate = 2007-11-16] The Phoenix SDK can be used to write and plug-in other tools as well.Code generation is handled by providing architecture-specific (either physical architecture of the processor or avirtual machine architecture) "File Writers". Phoenix provides thec2.exe
compiler backend, which it shares withVisual C++ , to handle analysis, optimization andcode generation forx86 architecture. Writers for other architectures must be provided separately.As a result of the modular architecture, any component can be replaced with others without affecting the rest of the system. For example, to target the compiler to a different architecture, only the File Writer specific to the architecture needs to be changed, keeping the rest of the stack unchanged. Or to create a compiler for a new language, only the "Readers" need to be provided.
References
External links
* [http://research.microsoft.com/phoenix/ Phoenix Program]
* [https://connect.microsoft.com/Phoenix/Downloads/DownloadDetails.aspx?DownloadID=7540 Pre-Release build of Phoenix SDK]
Wikimedia Foundation. 2010.