1. A method comprising: performing by a compiler a first speculation point phase of compiling code to obtain an intermediate representation of the compiling code, wherein the compiler determines whether there are any opportunities for speculative execution; identifying a first code region of the intermediate representation of the compiling code; identifying a plurality optimization speculation with respect to the same code of the first code region; speculatively performing a transformation in accordance with a first optimization speculation, on the first code region wherein performing the transformation is speculatively performed prior to a modification of the first code region; generating an advice message by the compiler, the advice message corresponding to the first optimization speculation based on the transformation, the advice message being associated with the first code region and expressed in terms of source variable names and source line numbers; performing by the compiler a plurality of the other code compilation phases using the transformation and speculatively performing additional transformations with the other code compilation phases in accordance with the plurality of optimization speculations and generating additional advice message corresponding to each additional transformation being associated with the first code region and expressed in terms of the source variable names and the source line number; displaying advice messages being associated with the first code region to a user, the user being able to decide which of the advice messages to apply; determining whether to accept the first optimization speculation based on the advice message; and if the first optimization speculation is not accepted, backtracking to an earlier speculation point.