Patent ID: 8869128

Claim:
A compiling method executed by an information processing apparatus for compiling a trace comprising the steps of: generating an intermediate code from said trace, which is an instruction sequence described in machine language; computing an offset between (i) an address value, which is a base point of an indirect branch instruction, and (ii) a start address of a memory page, which includes a virtual address referred to by said information processing apparatus, wherein said virtual address is referred to immediately after processing a first instruction contained in said intermediate code, wherein the computing comprises computing an offset of said first instruction by subtracting a memory size of one memory page from an offset of an instruction preceding said first instruction; determining whether a second indirect branch instruction, which is subsequent to said first instruction, causes processing to jump from a memory page that includes said second indirect branch instruction to another memory page by using a value obtained from adding said offset to a displacement made by said second indirect branch instruction, wherein the determining step obtains a result; and optimizing said intermediate code, using said result of the determining step, by deleting from said intermediate code processing of determining whether said second indirect branch instruction causes page boundary crossing, and by deleting from said intermediate code processing of updating a program counter of said information processing apparatus if it is determined that processing does not jump from said memory page that includes said second indirect branch instruction to another memory page; wherein at least one of the steps is carried out by said information processing apparatus.