摘要 |
PROBLEM TO BE SOLVED: To reduce insertion of an unnecessary fetch instruction when inserting a prefetch instruction into a machine language program in a compile process.SOLUTION: A compile program makes a computer execute processes of: converting a source program into an intermediate code; detecting data for satisfying an access pattern corresponding to the operation condition of a hardware prefetch function, from among the object data being data of an insertion object of a prefetch instruction for transferring data stored in a memory to a cache memory in advance, on the basis of profile information about the memory access of the object data; calculating the evaluation value of the object data on the basis of the contiguous length of the data that satisfy the access pattern; determining, on the basis of the evaluation value, whether or not to suppress the insertion of the prefetch instruction into the object data; updating the intermediate code on the basis of the determination result; and converting the updated intermediate data into a machine language program. |