Patent Document ID: 9898268
Application ID: 15214879

Base Claim:
1. A method for enhanced local commoning optimization of compilation of a program, said method comprising: performing, by one or more processors of a computer system, 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.

---

Claim 2:
2. The method of claim 1 , wherein said determining within the first pass where in the program to evaluate volatile expressions that can be commoned comprises: analyzing each extended basic block in the program according to a set of predetermined criteria in the first pass, to common all volatile fields, wherein the first pass tracks opportunities for commoning local variables and final fields in addition to tracking opportunities to common the volatile fields, and wherein only the volatile fields are commoned in the first pass.