1. A method, in a data processing system, for dynamically rewriting branch instructions in a portion of code, comprising: executing, in a processor of the data processing system, a branch instruction in the portion of code; determining, by the processor, if a target instruction of the branch instruction, to which the branch instruction branches, is present in an instruction cache associated with the processor; directly branching, by the processor, execution of the portion of code to the target instruction in the instruction cache, without intervention from an instruction cache runtime system, in response to a determination that the target instruction is present in the instruction cache; and redirecting, by the processor, 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.