Patent ID: 8631225

Claim:
A computer program product comprising a non-transitory computer readable storage medium having a computer readable program stored therein, wherein the computer readable program, when executed on a data processing system, causes the data processing system to: compile, by a compiler, source code, wherein, during compilation of the source code: in response to encountering a direct branch instruction, the compiler inserts into compiled code a branch descriptor comprising a target instruction space address for redirecting execution to an instruction cache manager of an instruction cache runtime system for translating the target instruction space address, in response to encountering an indirect branch instruction in the source code, inserting a set of instruction tag (ITAG) based instructions for translating the target instruction space address to a target address in order to branch to a target instruction, and wherein branch descriptors are inserted by the compiler only for direct branches; responsive to executing the indirect branch instruction in a portion of code of the compiled code, determine whether the target instruction of the indirect branch instruction, to which the indirect branch instruction branches, is present in an instruction cache of a local store of the data processing system by utilizing the set of instruction tag (ITAG) based instructions to check whether an instruction tag (ITAG) corresponding to the target instruction is located in an ITAG directory of the local store; directly branch execution of the portion of code to the target instruction in the instruction cache, without intervention from the instruction cache runtime system, in response to a determination that the target instruction is present in the instruction cache; and redirect execution of the portion of code to the instruction cache runtime system in response to a determination that the target instruction cannot be determined to be present in the instruction cache.