Computer-implemented method for generating a parallelized program for a multiprocessor
system mounted in a vehicle on-board device (400), comprising: Dividing a sequential program into multiple
macro-tasks according to a predetermined procedure using a parallelization
compiler running on a computer, which controls an
embedded system, wherein the sequential program is executed by a single-processor
system; Generating, using the
compiler, a macroflow
graph based on an analysis of control dependencies and data dependencies between the
macro tasks; Specify, by means of the
compiler, based on the control dependency specified in the macroflow graph, at least one pair consisting of a start-end task and a finish-end task, wherein the start-end task is a
macro task having a
conditional branch, and the finish-end task is a macro task that is the first macro task executed common to all of several series of macro tasks executed sequentially from the start-end task as a starting point, wherein the specification includes: analyzing all possible execution paths from the start-end task and identifying the first macro task executed common to all of the series of macro tasks as the finish-end task; Merge, using the compiler, (i) the initiating end task, (ii) the termination end task, and (iii) all macro tasks that are executed after the start-up end-task and before the finish-up end-task into a block task to hide the
conditional branch of the start-up end-task in the block task, wherein the block task is designed such that, from the perspective of tasks outside the block task, the
conditional branch in the start-up end-task is hidden from tasks outside the block task, and the merging is performed in such a way as to eliminate control dependencies between block tasks, thereby enabling static scheduling; Extracting, by means of the compiler, based on the data dependencies between the macro-tasks, including the block-tasks after fusion, from parallel-
executable macro-tasks that can be executed in parallel by multiple processor units included in the multiprocessor
system mounted in the vehicle on-board device (400), wherein the block-tasks have no control dependencies among themselves after fusion and the extraction is performed based on data dependencies between the block-tasks and remaining macro-tasks, so that static scheduling between the block-tasks is possible; Execution, using the compiler, a static schedule that assigns the parallel-
executable macro tasks to the processor units, thereby executing the parallel-
executable macro tasks in parallel by the multiple processor units; and Generating, by means of the compiler, a parallelized program to be executed by the multiprocessor system mounted in the vehicle on-board device (400), based on a result of the static scheduling.