7. A computer program product, comprising one or more computer readable hardware storage devices having computer readable program instructions stored therein, said program instructions executable by one or more processors of a computer system to implement a method for enhanced local commoning optimization of compilation of a program, said method comprising: performing, by the one or more processors, commoning of volatiles within an extended block for a particular memory model associated with a particular programming language, using a two pass approach by: determining, by the one or more processors, within a first pass, where in the program to evaluate volatile expressions that can be commoned; and commoning, by the one or more processors, in a second pass, all remaining expressions that are not volatile expressions.
12. The computer program product of claim 7 , wherein the particular memory model associated with the particular programming language is selected from a group consisting of a managed runtime language, a scripting environment language, and a procedural language.