This paper introduces a domain-specific optimization component that encodes knowledge specific to a particular application domain. The component has the access to the results of static data-flow analysis that is sharpen by control-flow information obtained at run-time. These results are used by domain-specific optimization component to find the points in the application program that are candidates for the optimization. At these points Department of Computing, Imperial College London intercept the execution of the application and apply the optimization from domain-specific optimization component. Initial testing shows that the framework present here can result in significant performance gains for the applications.