1. A method comprising: identifying one or more optimization speculations with respect to a first code region when compiling code; and speculatively performing transformation, in accordance with a first optimization speculation, on an intermediate representation of the first code region.