摘要 |
<P>PROBLEM TO BE SOLVED: To provide a technique for optimizing a program by reusing an execution result of a subclass test function. <P>SOLUTION: An optimization apparatus 100 includes: a reusability determining unit 120 to determine reusability of a code of a subclass test function based on whether access to a global memory includes only access for reading out type information specified in a function call; a profiling unit 130 configured to store an execution result of the code determined to be reusable and specified information, in a storage device 105 in association with actually accessed type information; a reuse processing unit 140 configured to reuse, in response to detection of a function call for calling the code determined to be reusable, the execution result on condition that the pieces of specified information specified in the function calls match; and a monitoring unit 145 configured to monitor the type information associated with the execution result and prohibit reuse of the execution result if the type information is changed. <P>COPYRIGHT: (C)2013,JPO&INPIT |