This project focuses on the design and implementation of a compiler architecture for dynamically optimizing stand-alone programs. Dynamic optimization uses run-time values and invariants to improve code as it executes, yielding performance superior to that of statically optimal code. Dynamic optimization incurs run-time overhead: time spent optimizing and compiling code at run time detracts from any resulting improvement. This overhead will be reduced using a staged compilation model, which permits static compilation to be suspended after reaching a high-level, mid-level, or low-level intermediate representation. This technique supports lightweight optimizations, which are fast but typically yield minor improvements, as well as heavyweight optimizations, which are time consuming but often provide substantial performance benefits. The proposed system will incorporate automatic program analyses and profiling tools to uncover opportunities for dynamic optimization in ordinary code, and a rich set of optimization directives will give the programmer fine- grained control over dynamic optimization when necessary.