A computing device to optimize program code, the computing device comprising: a compiler module to: identify a section of program code to be optimized, demarcate at least a portion of the section of program code as an atomic region in response to identification of the section of program code to be optimized, insert speculative checkpoint code at a speculative checkpoint determined to be within the atomic region, and optimize the section of program code in response to identification of the section of program code to be optimized; and a decode module to determine the speculative checkpoint within the atomic region; characterized in that the speculative checkpoint code includes a speculative checkpoint operation to: checkpoint a speculative register file in a speculative checkpoint register file, and checkpoint a store buffer in a speculative cache; and the compiler module is further to insert fix-up code to roll-back to the checkpoint of the speculative register file held in the speculative checkpoint register file in response to the speculative cache or the store buffer running out of resources during execution of the portion of the section of code and to commit the store buffer and the speculative cache to a non-speculative cache memory to free the resources; wherein to insert fix-up code in response to the store buffer running out of resources during execution of the portion of the section of code comprises to insert fix-up code in response to the store buffer not including any available entries during execution of the portion of the section of code; and wherein to insert fix-up code in response to the speculative cache running out of resources during execution of the portion of the section of code comprises to insert fix-up code in response to the speculative cache not including enough available entries to hold entries from the store buffer upon execution of the speculative checkpoint operation by the computing device. a compiler module to: identify a section of program code to be optimized, demarcate at least a portion of the section of program code as an atomic region in response to identification of the section of program code to be optimized, insert speculative checkpoint code at a speculative checkpoint determined to be within the atomic region, and optimize the section of program code in response to identification of the section of program code to be optimized; and a decode module to determine the speculative checkpoint within the atomic region; characterized in that the speculative checkpoint code includes a speculative checkpoint operation to: checkpoint a speculative register file in a speculative checkpoint register file, and checkpoint a store buffer in a speculative cache; and the compiler module is further to insert fix-up code to roll-back to the checkpoint of the speculative register file held in the speculative checkpoint register file in response to the speculative cache or the store buffer running out of resources during execution of the portion of the section of code and to commit the store buffer and the speculative cache to a non-speculative cache memory to free the resources; wherein to insert fix-up code in response to the store buffer running out of resources during execution of the portion of the section of code comprises to insert fix-up code in response to the store buffer not including any available entries during execution of the portion of the section of code; and wherein to insert fix-up code in response to the speculative cache running out of resources during execution of the portion of the section of code comprises to insert fix-up code in response to the speculative cache not including enough available entries to hold entries from the store buffer upon execution of the speculative checkpoint operation by the computing device.