A method of generating a code by a compiler, the code being executable by a processor (101, 111, 121) provided to processing elements (100, 110, 120) of a multiprocessor system, the multiprocessor system including a plurality of processing elements (100, 110, 120) and a shared memory which is any one or both of a main centralized shared memory that can be accessed from each of the plurality of processing elements (100, 110, 120), and a distributed shared memory (103, 113, 123) that can be accessed from each of the plurality of processing elements (100, 110, 120). the plurality of processing elements (100, 110, 120) including a first processing element and a second processing element, each of the plurality of processing elements (100, 110, 120) including a processor (101, 111, 121) for performing arithmetic processing and a cache memory (102, 112, 122) for temporarily storing data used by the processor (101, 111, 121), the data read and transferred by each of the plurality of processing elements (100, 110, 120) from the main memory being temporarily stored in the cache memory (102, 112, 122), the data whose use by each of the plurality of processing elements (100, 110, 120) has been finished being transferred from the cache memory and being written back to the main memory, the data transfer between the main memory and the cache memory being performed in units of a management unit size of the cache memory, characterized in that the method includes the steps of: analyzing a program to be executed by the multiprocessor system; analyzing data necessary to execute respective tasks included in the program; determining whether a boundary between the data used by the respective tasks corresponds to a boundary of the units of the management unit size of the cache memory based on results of the analyzing in a case where the program is divided between the first and second processing elements (100, 110) into the respective tasks; and when it is determined that the boundary between the data used by the respective tasks does not correspond to a boundary of the units of the management unit size of the cache memory: generating a code (800, 900, 1000, 1500) for instructing to provide a non-cacheable area from which the data to be stored in a unit of the management unit size including the boundary between the data is not temporarily stored into the cache memory of the second processing element and generating a code (802, 903, 1004, 1502) for instructing to store an arithmetic processing result, computed by said second processing element, in a unit of the management unit size including the boundary between the data in the non-cacheable area, and generating a code (804, 905, 1003, 1504) for instructing to transfer the arithmetic processing result stored in the non-cacheable area to the cache memory of the first processing element. analyzing a program to be executed by the multiprocessor system; analyzing data necessary to execute respective tasks included in the program; determining whether a boundary between the data used by the respective tasks corresponds to a boundary of the units of the management unit size of the cache memory based on results of the analyzing in a case where the program is divided between the first and second processing elements (100, 110) into the respective tasks; and when it is determined that the boundary between the data used by the respective tasks does not correspond to a boundary of the units of the management unit size of the cache memory: generating a code (800, 900, 1000, 1500) for instructing to provide a non-cacheable area from which the data to be stored in a unit of the management unit size including the boundary between the data is not temporarily stored into the cache memory of the second processing element and generating a code (802, 903, 1004, 1502) for instructing to store an arithmetic processing result, computed by said second processing element, in a unit of the management unit size including the boundary between the data in the non-cacheable area, and generating a code (804, 905, 1003, 1504) for instructing to transfer the arithmetic processing result stored in the non-cacheable area to the cache memory of the first processing element. generating a code (800, 900, 1000, 1500) for instructing to provide a non-cacheable area from which the data to be stored in a unit of the management unit size including the boundary between the data is not temporarily stored into the cache memory of the second processing element and generating a code (802, 903, 1004, 1502) for instructing to store an arithmetic processing result, computed by said second processing element, in a unit of the management unit size including the boundary between the data in the non-cacheable area, and generating a code (804, 905, 1003, 1504) for instructing to transfer the arithmetic processing result stored in the non-cacheable area to the cache memory of the first processing element.