发明名称 Program optimizing apparatus, program optimizing method, and program optimizing article of manufacture
摘要 An apparatus having a transactional memory enabling exclusive control to execute a transaction. The apparatus includes: a first code generating unit configured to interpret a program, and generate first code in which a begin instruction to begin a transaction and an end instruction to commit the transaction are inserted before and after an instruction sequence including multiple instructions to execute designated processing in the program; a second code generating unit configured to generate second code at a predetermined timing by using the multiple instructions according to the designated processing; and a code write unit configured to overwrite the instruction sequence of the first code with the second code or to write the second code to a part of the first code in the transaction.
申请公布号 US8990786(B2) 申请公布日期 2015.03.24
申请号 US201113307731 申请日期 2011.11.30
申请人 International Business Machines Corporation 发明人 Nakaike Takuya
分类号 G06F9/45 主分类号 G06F9/45
代理机构 代理人 Tang Jeff
主权项 1. A program optimizing apparatus including a non-transitory transactional memory enabling exclusive control to execute a transaction, comprising: a first code generating unit configured to interpret a program, and to generate a first code in which a begin instruction to begin the transaction and an end instruction to commit the transaction are inserted before and after an instruction sequence including a plurality of instructions to execute a designated processing in the program; a second code generating unit configured to generate a second code at a predetermined timing by using the plurality of instructions according to the designated processing; and a code write unit configured to overwrite the instruction sequence of the first code with the second code or to write the second code to a part of the first code in the transaction, wherein the designated processing is a function call processing, and the plurality of instructions include a set instruction to set an argument, a call instruction to call a function, and a return instruction to read a return value, wherein the predetermined timing is a timing of an interpretation of a called function during execution of the program, wherein in response to the interpretation of the called function, the second code generating unit generates the second code by replacing the call instruction in the instruction sequence with an instruction to read a value in the called function, by changing a parameter in the instruction to read the value, which is placed by the replacement, and then by deleting an unnecessary instruction group including the set instruction and the return instruction in the instruction sequence.
地址 Armonk NY US