Patent ID: 7793277

Claim:
An apparatus comprising: at least one processor; a memory coupled to the at least one processor; source code residing in the memory, the source code including at least one indirect call; and a front-end compiler residing in the memory and executed by the at least one processor, the front-end compiler processing the source code and generating therefrom an instruction stream that includes a first instruction that indicates a first indirect call and at least one other instruction that identifies a potential target for the first indirect call; a back-end compiler residing in the memory and executed by the at least one processor, wherein the back-end compiler processes the instruction stream and generates therefrom machine code that includes an explicit call for at least one potential target for the first indirect call, wherein the back-end compiler comprises a profiler that determines execution frequency for at least one portion of machine code generated by the back-end compiler as the machine code is executed with sample inputs, the execution frequency comprising profile data, wherein the back-end compiler processes the intermediate representation code a first time and generates therefrom first machine code that includes an explicit call for the at least one potential target for the indirect call, and wherein the back-end compiler processes the intermediate representation code a second time using the profile data to determine which, if any, target for the indirect call for which to generate an explicit call in second machine code generated by the back-end compiler.