JP2012103923A - Compiler device, compiling method and compiler program - Google Patents

Compiler device, compiling method and compiler program Download PDF

Info

Publication number
JP2012103923A
JP2012103923A JP2010252280A JP2010252280A JP2012103923A JP 2012103923 A JP2012103923 A JP 2012103923A JP 2010252280 A JP2010252280 A JP 2010252280A JP 2010252280 A JP2010252280 A JP 2010252280A JP 2012103923 A JP2012103923 A JP 2012103923A
Authority
JP
Japan
Prior art keywords
function
core
global variable
allocation target
target function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2010252280A
Other languages
Japanese (ja)
Inventor
Namiyo Nagashima
奈美代 長島
Kazuo Nishikata
和夫 西片
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2010252280A priority Critical patent/JP2012103923A/en
Publication of JP2012103923A publication Critical patent/JP2012103923A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a compiler device for generating an object program for, when the condition determination processing of a condition branching instruction and each instruction after branching depends on a global variable, preventing any malfunction from occurring even when the condition determination processing of the condition branching instruction and each instruction after branching are processed in parallel.SOLUTION: A compiler device of the present invention includes: a core assignment object function extraction part for extracting a function including processing to change the value of a global variable based on the value of the global variable as a core assignment object function; and a source correction part for, when the core assignment object function is a calling function after branching by a condition determination processing of a condition branching instruction, assigning the core assignment object function to each CPU core of a multi-core processor, and for, when the global variable is changed by the condition determination processing of the condition branching instruction, correcting a source program so that the core assignment object function can be made to retry the processing to change the value of the global variable based on the value of the global variable.

Description

本発明は、コンパイラ装置に関し、特にマルチコアプロセッサに対するオブジェクトプログラムを生成するコンパイラ装置に関する。   The present invention relates to a compiler apparatus, and more particularly to a compiler apparatus that generates an object program for a multi-core processor.

近年、半導体集積回路が多くの製品に搭載され、様々な製品において、複雑な制御が行われており、製品の処理能力を向上させるために、複数のコアをプロセッサに搭載したマルチコアプロセッサが利用されることが多くなってきた。そのため、複数のコアを搭載したプロセッサの特性を利用したオブジェクトプログラムを生成することができるコンパイラ装置の必要性が高まってきている。   In recent years, semiconductor integrated circuits have been mounted on many products, and complex control has been performed on various products. To improve the processing capability of products, multi-core processors with multiple cores mounted on processors have been used. There have been many things. Therefore, there is an increasing need for a compiler apparatus that can generate an object program that uses the characteristics of a processor having a plurality of cores.

特開2008−210027号公報(特許文献1)には、複数のCPUコアを有するマルチコアプロセッサにおいて、分岐命令を各CPUコアに割り当てることによって、分岐命令を並列処理させるオブジェクトプログラムを生成するコンパイラ装置が記載されている。このコンパイラ装置では、各CPUコアで所持している分岐命令の処理結果を、共有メモリに書き込む際に、分岐命令の条件判定を行っているメインスレッドの条件判定結果に基づいて、各CPUコアのストア制御機構の共有メモリ更新禁止フラグを利用して、共有メモリへの処理結果の反映を制御するオブジェクトプログラムを生成している。   Japanese Patent Laying-Open No. 2008-210027 (Patent Document 1) discloses a compiler device that generates an object program for parallel processing of branch instructions by assigning branch instructions to each CPU core in a multi-core processor having a plurality of CPU cores. Are listed. In this compiler apparatus, when the processing result of the branch instruction possessed by each CPU core is written to the shared memory, the condition of each CPU core is determined based on the condition determination result of the main thread that performs the condition determination of the branch instruction. Using the shared memory update prohibition flag of the store control mechanism, an object program for controlling the reflection of the processing result to the shared memory is generated.

従来技術では、各CPUコアにおいて、共有メモリ内の同一のグローバル変数を更新して、分岐命令の条件判定処理と、分岐命令の条件判定結果に基づいて実行する各命令を並列処理すると、共有メモリのグローバル変数の値の整合性がとれないという課題がある。例えば、メインスレッドの分岐命令の条件判定処理において、グローバル変数の更新処理を含み、その結果を分岐先の命令で参照・更新する場合である。   In the prior art, in each CPU core, when the same global variable in the shared memory is updated and the branch instruction condition determination process and each instruction executed based on the branch instruction condition determination result are processed in parallel, the shared memory There is a problem that the values of the global variables cannot be consistent. For example, the condition determination process of the branch instruction of the main thread includes a global variable update process, and the result is referred to and updated by the branch destination instruction.

図9は、コンパイルすると分岐命令を含むオブジェクトプログラムを生成するソースプログラムの例である。問題となるのは、図9において、条件判定処理に使用される変数Xが、グローバル変数の更新を含むf(a,b,c,d)の演算結果によって決定され、各CPUコアへの割り当てる対象となるg0(x0)、g1(x1)及びg2(x2)が、同一のグローバル変数の更新処理を含む場合である。各CPUコアによって並列処理が行われるため、各CPUコアに割り当てた分岐命令が参照するグローバル変数は、メインスレッドの分岐命令の条件判定処理後のグローバル変数を参照するという保障がない。そのため、分岐命令を投機的に並列処理させるCPUコアが、メインスレッドによる更新前のグローバル変数に基づいて、演算を行った場合は、共有メモリのグローバル変数の値の整合性がとれなくなる。   FIG. 9 is an example of a source program that generates an object program including a branch instruction when compiled. The problem is that in FIG. 9, the variable X used in the condition determination process is determined by the operation result of f (a, b, c, d) including the update of the global variable, and is assigned to each CPU core. This is a case where the target g0 (x0), g1 (x1), and g2 (x2) include the same global variable update processing. Since parallel processing is performed by each CPU core, there is no guarantee that the global variable referred to by the branch instruction assigned to each CPU core refers to the global variable after the condition determination processing of the branch instruction of the main thread. For this reason, when a CPU core that speculatively processes branch instructions in parallel performs an operation based on a global variable before being updated by the main thread, the consistency of the value of the global variable in the shared memory cannot be obtained.

特開2008−210027号公報JP 2008-210027 A

本発明の目的は、条件分岐命令の条件判定処理と、分岐後の各命令がグローバル変数に依存している場合に、マルチコアプロセッサによって、投機的に条件分岐命令の条件判定処理と、分岐後の各命令が並列処理されても誤動作しないオブジェクトプログラムを生成するコンパイラ装置を提供することにある。   It is an object of the present invention to perform conditional branch instruction condition determination processing and conditional branch instruction condition determination processing speculatively by a multi-core processor when each instruction after branching depends on a global variable. An object of the present invention is to provide a compiler apparatus that generates an object program that does not malfunction even when instructions are processed in parallel.

本発明のコンパイラ装置は、ソースプログラムを読み込む読み込み部と、ソースプログラムの字句解析を行う字句解析部と、ソースプログラムの構文解析を行う構文解析部と、ソースプログラムに含まれる関数から、グローバル変数の値に基づいてグローバル変数の値を変更する処理を含む関数を、コア割り当て対象関数として抽出するコア割り当て対象関数抽出部と、コア割り当て対象関数が、条件分岐命令の条件判定処理による分岐後の呼出し関数となる場合には、マルチコアプロセッサの各CPUコアにコア割り当て対象関数を割り当て、条件分岐命令の条件判定処理と、コア割り当て対象関数の処理を並列処理させ、条件分岐命令の条件判定処理によって、グローバル変数が変更された場合には、グローバル変数の値に基づいてグローバル変数の値を変更する処理を、コア割り当て対象関数にリトライさせるようにソースプログラムを修正するソース修正部と、ソースプログラムをソース修正部により修正したソースプログラムから中間言語による中間語を作成する中間語作成部と、中間語を最適化する最適化部と、最適化された中間語からオブジェクトプログラムを生成するオブジェクト生成部とを備える。   A compiler apparatus according to the present invention includes a reading unit that reads a source program, a lexical analysis unit that performs lexical analysis of the source program, a syntax analysis unit that performs syntax analysis of the source program, and a function included in the source program. A core allocation target function extraction unit that extracts a function including processing for changing the value of a global variable based on a value as a core allocation target function; In the case of a function, a core allocation target function is allocated to each CPU core of the multi-core processor, the condition determination processing of the conditional branch instruction and the processing of the core allocation target function are processed in parallel, and by the condition determination processing of the conditional branch instruction, If a global variable is changed, it is based on the global variable value. A source modification part that modifies the source program so that the process that changes the value of the variable is retried to the core allocation target function, and an intermediate that creates an intermediate language in an intermediate language from the source program that is modified by the source modification part A word creation unit; an optimization unit that optimizes the intermediate language; and an object generation unit that generates an object program from the optimized intermediate language.

本発明のコンパイル方法は、読み込み部が、ソースプログラムを読み込むステップと、字句解析部が、ソースプログラムの字句解析を行うステップと、構文解析部が、ソースプログラムの構文解析を行うステップと、コア割り当て対象関数抽出部が、ソースプログラムに含まれる関数から、グローバル変数の値に基づいてグローバル変数の値を変更する処理を含む関数を、コア割り当て対象関数として抽出するステップと、ソース修正部が、コア割り当て対象関数が、条件分岐命令の条件判定処理による分岐後の呼出し関数となる場合には、マルチコアプロセッサの各CPUコアにコア割り当て対象関数を割り当て、条件分岐命令の条件判定処理と、コア割り当て対象関数の処理を並列処理させ、条件分岐命令の条件判定処理によって、グローバル変数が変更された場合には、グローバル変数の値に基づいてグローバル変数の値を変更する処理を、コア割り当て対象関数にリトライさせるようにソースプログラムを修正するステップと、中間語作成部が、ソースプログラムをソース修正部により修正したソースプログラムから中間言語による中間語を作成するステップと、最適化部が、中間語を最適化するステップと、オブジェクト生成部が、最適化された中間語からオブジェクトプログラムを生成するステップとを含む。   In the compiling method of the present invention, the reading unit reads the source program, the lexical analysis unit performs the lexical analysis of the source program, the syntax analysis unit performs the syntax analysis of the source program, and the core allocation. The target function extraction unit extracts a function including a process of changing the value of the global variable from the function included in the source program based on the value of the global variable as a core allocation target function, and the source correction unit includes the core When the assignment target function is a call function after branching by the conditional determination processing of the conditional branch instruction, the core allocation target function is allocated to each CPU core of the multi-core processor, the conditional determination processing of the conditional branch instruction, and the core allocation target Function processing is performed in parallel, and conditional branch instruction condition determination processing If the variable is changed, the step of modifying the source program so that the core allocation target function will retry the process of changing the value of the global variable based on the value of the global variable, and the intermediate language creating unit, A step of creating an intermediate language in an intermediate language from a source program obtained by correcting a source program by a source correction unit, a step of an optimization unit optimizing the intermediate language, and an object generation unit generating an object from the optimized intermediate language Generating a program.

本発明によれば、条件分岐命令の条件判定処理と、分岐後の各命令がグローバル変数に依存している場合に、マルチコアプロセッサによって、投機的に条件分岐命令の条件判定処理と、分岐後の各命令が並列処理されても誤動作しないオブジェクトプログラムを生成するコンパイラ装置を提供することができる。   According to the present invention, when a conditional branch instruction condition determination process and each instruction after branching depend on a global variable, the multi-core processor speculatively determines the conditional branch instruction condition determination process and It is possible to provide a compiler apparatus that generates an object program that does not malfunction even when instructions are processed in parallel.

図1は、本発明の実施形態におけるコンパイラ装置のブロック図である。FIG. 1 is a block diagram of a compiler apparatus according to an embodiment of the present invention. 図2は、本発明の実施形態におけるコンパイラ装置のコア割り当て対象関数抽出部44において、コア割り当て対象関数の抽出方法のフローチャートである。FIG. 2 is a flowchart of a core allocation target function extraction method in the core allocation target function extraction unit 44 of the compiler apparatus according to the embodiment of the present invention. 図3Aは、本発明の実施形態におけるコンパイラ装置のソース修正部45において、コア割り当て対象関数に対するソースコード修正方法のフローチャートである。FIG. 3A is a flowchart of a source code correction method for a core allocation target function in the source correction unit 45 of the compiler apparatus according to the embodiment of the present invention. 図3Bは、本発明の実施形態におけるコンパイラ装置のソース修正部45において、コア割り当て対象関数に対するソースコード修正方法のフローチャートである。FIG. 3B is a flowchart of the source code correction method for the core allocation target function in the source correction unit 45 of the compiler apparatus according to the embodiment of the present invention. 図4は、本発明の実施例1におけるコンパイラ装置を説明するためのコンパイル対象のC言語のソースプログラム30である。FIG. 4 shows a C source program 30 to be compiled for explaining the compiler apparatus according to the first embodiment of the present invention. 図5は、本発明の実施例1におけるコンパイラ装置において、図4のソースプログラム30に対応するグローバル変数テーブル33の例である。FIG. 5 is an example of the global variable table 33 corresponding to the source program 30 of FIG. 4 in the compiler apparatus according to the first embodiment of the present invention. 図6は、本発明の実施例1におけるコンパイラ装置において、図4のソースプログラム30に対応するコア割り当て対象関数テーブル34の例である。FIG. 6 is an example of the core allocation target function table 34 corresponding to the source program 30 of FIG. 4 in the compiler apparatus according to the first embodiment of the present invention. 図7は、本発明の実施例1におけるコンパイラ装置において、図4のソースプログラム30が、ソース修正部45によって修正された後のソースプログラムの例である。FIG. 7 shows an example of the source program after the source program 30 of FIG. 4 is modified by the source modification unit 45 in the compiler apparatus according to the first embodiment of the present invention. 図8は、本発明の実施例1におけるコンパイラ装置によって生成された、図7のソースプログラムに対応するオブジェクトプログラムを実行した場合の動作説明図である。FIG. 8 is an operation explanatory diagram when an object program corresponding to the source program of FIG. 7 generated by the compiler apparatus according to the first embodiment of the present invention is executed. 図9は、コンパイルすると分岐命令を含むオブジェクトプログラムを生成するソースプログラムの例である。FIG. 9 is an example of a source program that generates an object program including a branch instruction when compiled. 図10は、本発明の実施形態におけるコンパイラ装置40のハードウェア構成図である。FIG. 10 is a hardware configuration diagram of the compiler apparatus 40 according to the embodiment of the present invention. 図11は、本発明の実施形態におけるコンパイラ装置40によって生成されたオブジェクトプログラムが実行されるマルチコアプロセッサの例である。FIG. 11 is an example of a multi-core processor that executes an object program generated by the compiler apparatus 40 according to the embodiment of the present invention.

添付図面を参照して、本発明の実施形態によるコンパイラ装置40を以下に説明する。   A compiler apparatus 40 according to an embodiment of the present invention will be described below with reference to the accompanying drawings.

[構成の説明]
はじめに、本実施形態におけるコンパイラ装置40の構成の説明を行う。図1は、本発明の実施形態におけるコンパイラ装置40のブロック図である。本発明の実施形態におけるコンパイラ装置40は、読み込み部41、字句解析部42、構文解析部43、割り当て対象関数抽出部44、ソース修正部45、中間語作成部46、最適化部47、オブジェクト生成部48、変数名、定数等の各種情報のテーブル32、グローバル変数テーブル33及びコア割り当て対象関数テーブル34を備える。
[Description of configuration]
First, the configuration of the compiler apparatus 40 in this embodiment will be described. FIG. 1 is a block diagram of a compiler apparatus 40 according to an embodiment of the present invention. The compiler device 40 according to the embodiment of the present invention includes a reading unit 41, a lexical analysis unit 42, a syntax analysis unit 43, an allocation target function extraction unit 44, a source correction unit 45, an intermediate language creation unit 46, an optimization unit 47, and an object generation. A section 48, a table 32 of various information such as variable names and constants, a global variable table 33, and a core allocation target function table 34.

読み込み部41は、コンパイルの対象となるソースプログラム30をコンパイラ装置40に読み込む。   The reading unit 41 reads the source program 30 to be compiled into the compiler device 40.

字句解析部42は、従来技術の一般のコンパイラ装置と同様の方法で、ソースプログラム30の字句解析を行う。   The lexical analysis unit 42 performs lexical analysis of the source program 30 by a method similar to that of a general compiler device of the prior art.

構文解析部43は、従来技術の一般のコンパイラ装置と同様の方法で、ソースプログラム30の構文解析を行う。ただし、グローバル変数の管理について、ソースプログラム30に含まれるグローバル変数のread箇所及びwrite箇所の情報を、ソースプログラム30に含まれる関数ごとに所持するグローバル変数テーブル33を作成する。   The syntax analysis unit 43 performs a syntax analysis of the source program 30 by the same method as that of a general compiler device of the prior art. However, for the management of global variables, a global variable table 33 is created that possesses information on read locations and write locations of global variables included in the source program 30 for each function included in the source program 30.

コア割り当て対象関数抽出部44は、ソースプログラム30に含まれる関数の中から、マルチコアプロセッサにおける各CPUコアに対して、割り当てる対象となる関数を抽出する。   The core assignment target function extraction unit 44 extracts a function to be assigned to each CPU core in the multicore processor from the functions included in the source program 30.

ソース修正部45は、条件分岐命令の条件判定処理と、分岐後の各命令がグローバル変数に依存している場合に、マルチコアプロセッサによって、投機的に条件分岐命令の条件判定処理と、分岐後の各命令が並列処理されても誤動作しないオブジェクトプログラムを生成できるように、ソースプログラム30を修正する。   The source correcting unit 45 speculatively executes conditional branch instruction condition determination processing and multi-core processor condition determination processing for a conditional branch instruction when each instruction after the branch depends on a global variable. The source program 30 is modified so that an object program that does not malfunction even if each instruction is processed in parallel can be generated.

中間語作成部46は、従来技術の一般のコンパイラ装置と同様の方法で、ソースプログラム30から中間言語による中間語を作成する。   The intermediate language creating unit 46 creates an intermediate language in the intermediate language from the source program 30 by the same method as that of a general compiler device of the prior art.

最適化部47は、従来技術の一般のコンパイラ装置と同様の方法で、中間語作成部46により作成された中間語を最適化する。   The optimization unit 47 optimizes the intermediate language created by the intermediate language creation unit 46 in the same manner as a general compiler device of the prior art.

オブジェクト生成部48は、従来技術の一般のコンパイラ装置と同様の方法で、最適化部47により最適化された中間語からオブジェクトプログラムを生成する。   The object generation unit 48 generates an object program from the intermediate language optimized by the optimization unit 47 in the same manner as a general compiler device of the prior art.

変数名、定数等の各種情報のテーブル32は、コンパイラ装置が、ソースプログラム30からオブジェクトプログラムを生成するために必要となる情報を保持するためのテーブルである。従来技術の一般のコンパイラ装置と同様の情報を、変数名、定数等の各種情報のテーブル32で保持している。   A table 32 of various information such as variable names and constants is a table for holding information necessary for the compiler apparatus to generate an object program from the source program 30. Information similar to that of a general compiler apparatus of the prior art is held in a table 32 of various information such as variable names and constants.

グローバル変数テーブル33は、ソースプログラム30に含まれるグローバル変数のread箇所及びwrite箇所の情報を、ソースプログラム30に含まれる関数ごとに所持するテーブルである。   The global variable table 33 is a table that holds information on read and write locations of global variables included in the source program 30 for each function included in the source program 30.

コア割り当て対象関数テーブル34は、ソースプログラム30に含まれる関数に対して、マルチコアプロセッサの各CPUコアに割り当てる対象となる関数であるかどうかを管理しているテーブルである。   The core assignment target function table 34 is a table that manages whether a function included in the source program 30 is a function to be assigned to each CPU core of the multi-core processor.

次に、本実施形態におけるコンパイラ装置40のハードウェア構成についての説明を行う。図10は、本発明の実施形態におけるコンパイラ装置40のハードウェア構成図である。   Next, the hardware configuration of the compiler apparatus 40 in this embodiment will be described. FIG. 10 is a hardware configuration diagram of the compiler apparatus 40 according to the embodiment of the present invention.

コンパイラ装置40は、表示部20、入力部21、CPU22、補助記憶装置23、メモリ24及びシステムバス25を備える。   The compiler device 40 includes a display unit 20, an input unit 21, a CPU 22, an auxiliary storage device 23, a memory 24, and a system bus 25.

メモリ24は、コンパイラ装置40の主記憶装置である。コンパイラ装置40を利用する際には、本実施形態におけるコンパイラ装置40を実現するためのコンパイラプログラム10が、メモリ24上に展開される。表示部20は、コンパイラ装置40の実行結果が表示される。入力部21は、利用者がコンパイラ装置40を操作するためのインタフェースである。CPU22は、メモリ24上に展開されたコンピュータプログラムを実行する制御装置である。補助記憶装置23は、OS(Operating System)及びアプリケーションプログラムが記憶されている装置である。補助記憶装置23には、本実施形態におけるコンパイラ装置40を実現するためのコンパイラプログラム10が記憶されている。システムバス25は、表示部20、入力部21、CPU22、補助記憶装置23及びメモリ24とデータの送受信を行う通信路である。   The memory 24 is a main storage device of the compiler device 40. When the compiler apparatus 40 is used, the compiler program 10 for realizing the compiler apparatus 40 in the present embodiment is expanded on the memory 24. The display unit 20 displays the execution result of the compiler device 40. The input unit 21 is an interface for the user to operate the compiler apparatus 40. The CPU 22 is a control device that executes a computer program developed on the memory 24. The auxiliary storage device 23 is a device that stores an OS (Operating System) and application programs. The auxiliary storage device 23 stores a compiler program 10 for realizing the compiler device 40 according to this embodiment. The system bus 25 is a communication path that transmits and receives data to and from the display unit 20, the input unit 21, the CPU 22, the auxiliary storage device 23, and the memory 24.

次に、本発明の実施形態におけるコンパイラ装置40によって生成されたオブジェクトプログラムが実行されるマルチコアプロセッサについて説明する。図11は、本発明の実施形態におけるコンパイラ装置40によって生成されたオブジェクトプログラムが実行されるマルチコアプロセッサ7の例である。   Next, a multi-core processor that executes an object program generated by the compiler apparatus 40 according to the embodiment of the present invention will be described. FIG. 11 is an example of the multi-core processor 7 that executes the object program generated by the compiler apparatus 40 according to the embodiment of the present invention.

マルチコアプロセッサ7は、CPUコア0〜2、ローカルメモリ3〜5及び共有メモリ6を備える。CPUコア0〜2は、それぞれ独立に動作することができるマルチコアプロセッサ7のプロセッサコアである。ローカルメモリ3〜5は、CPUコア0〜2がそれぞれ独立に使用するメモリである。CPUコア0〜2は、共有メモリ6から演算に必要なデータを、対応するローカルメモリ3〜5にコピーし、それぞれのローカルメモリ3〜5を利用して演算を行い、演算結果をそれぞれのローカルメモリ3〜5で保持する。CPUコア0〜2は、それぞれのローカルメモリ3〜5で保持している演算結果を、必要に応じて共有メモリ6に反映する。共有メモリ6は、マルチコアプロセッサ7のそれぞれのCPUコア0〜2が共有することができるメモリである。   The multi-core processor 7 includes CPU cores 0 to 2, local memories 3 to 5, and a shared memory 6. The CPU cores 0 to 2 are processor cores of the multi-core processor 7 that can operate independently. The local memories 3 to 5 are memories used independently by the CPU cores 0 to 2. The CPU cores 0 to 2 copy data necessary for calculation from the shared memory 6 to the corresponding local memories 3 to 5, perform calculations using the respective local memories 3 to 5, and calculate the calculation results for each local memory. Stored in memories 3-5. The CPU cores 0 to 2 reflect the calculation results held in the local memories 3 to 5 to the shared memory 6 as necessary. The shared memory 6 is a memory that can be shared by the CPU cores 0 to 2 of the multi-core processor 7.

[動作方法の説明]
次に、本実施形態におけるコンパイラ装置40において、コンパイル方法の説明を行う。本実施形態のコンパイラ装置40において、コア割り当て対象関数抽出部44及びソース修正部45以外の機能ブロックについては、従来技術の一般のコンパイラ装置における処理と同様である。したがって、コア割り当て対象関数抽出部44及びソース修正部45についての動作方法について説明する。
[Description of operation method]
Next, the compiling method in the compiler apparatus 40 according to the present embodiment will be described. In the compiler apparatus 40 of this embodiment, the functional blocks other than the core allocation target function extraction unit 44 and the source correction unit 45 are the same as the processes in the general compiler apparatus of the prior art. Therefore, an operation method for the core allocation target function extracting unit 44 and the source correcting unit 45 will be described.

まず、本発明の実施形態におけるコンパイラ装置のコア割り当て対象関数抽出部44についての動作方法について説明する。図2は、本発明の実施形態におけるコンパイラ装置のコア割り当て対象関数抽出部44において、コア割り当て対象関数の抽出方法のフローチャートである。   First, an operation method of the core assignment target function extraction unit 44 of the compiler apparatus according to the embodiment of the present invention will be described. FIG. 2 is a flowchart of a core allocation target function extraction method in the core allocation target function extraction unit 44 of the compiler apparatus according to the embodiment of the present invention.

(ステップS101)
はじめに、コア割り当て対象抽出部44は、コンパイル対象のソースプログラム30に含まれる関数が、main関数であるかどうかを判断する。コア割り当て対象抽出部44は、main関数であれば、ステップS107に進み、main関数でなければ、ステップS102に進む。
(Step S101)
First, the core allocation target extraction unit 44 determines whether a function included in the source program 30 to be compiled is a main function. If it is a main function, the core allocation target extraction unit 44 proceeds to step S107, and if not a main function, proceeds to step S102.

(ステップS102)
次に、コア割り当て対象抽出部44は、コンパイル対象のソースプログラム30に含まれる関数が、戻り値として値を返すかどうかを判断する。コア割り当て対象抽出部44は、戻り値として値を返す関数であれば、ステップS103に進み、戻り値として値を返す関数でなければ、ステップS104に進む。
(Step S102)
Next, the core allocation target extraction unit 44 determines whether a function included in the source program 30 to be compiled returns a value as a return value. The core allocation target extraction unit 44 proceeds to step S103 if the function returns a value as a return value, and proceeds to step S104 if the function does not return a value as the return value.

(ステップS103)
次に、コア割り当て対象抽出部44は、コンパイル対象のソースプログラム30に含まれる関数が、戻り値を分岐命令の条件判定に利用しているかどうかを判断する。コア割り当て対象抽出部44は、戻り値を分岐命令の条件判定に利用していれば、ステップS107に進み、戻り値を分岐命令の条件判定に利用していなければ、ステップS104に進む。
(Step S103)
Next, the core allocation target extraction unit 44 determines whether a function included in the source program 30 to be compiled uses the return value for determining the condition of the branch instruction. If the return value is used for branch instruction condition determination, the core allocation target extraction unit 44 proceeds to step S107. If the return value is not used for branch instruction condition determination, the core allocation target extraction unit 44 proceeds to step S104.

(ステップS104)
次に、コア割り当て対象抽出部44は、コンパイル対象のソースプログラム30に含まれる関数が、関数内でグローバル変数にアクセスしているかどうかを判断する。コア割り当て対象抽出部44は、関数内でグローバル変数にアクセスしていれば、ステップS105に進み、関数内でグローバル変数にアクセスしていなければ、ステップS106に進む。
(Step S104)
Next, the core allocation target extraction unit 44 determines whether a function included in the source program 30 to be compiled is accessing a global variable in the function. The core allocation target extraction unit 44 proceeds to step S105 if the global variable is accessed in the function, and proceeds to step S106 if the global variable is not accessed in the function.

(ステップS105)
次に、コア割り当て対象抽出部44は、コンパイル対象のソースプログラム30に含まれる関数が、繰り返し文の中でグローバル変数にアクセスしているかどうかを判断する。コア割り当て対象抽出部44は、繰り返し文の中でグローバル変数にアクセスしていれば、ステップS107に進み、繰り返し文の中でグローバル変数にアクセスしていなければ、ステップS106に進む。
(Step S105)
Next, the core allocation target extraction unit 44 determines whether a function included in the source program 30 to be compiled is accessing a global variable in the repeated statement. The core allocation target extraction unit 44 proceeds to step S107 if the global variable is accessed in the iteration statement, and proceeds to step S106 if the global variable is not accessed in the iteration statement.

繰り返し文の中でグローバル変数にアクセスしている場合に、コア割り当て対象外の関数とする理由は、繰り返し文の中でグローバル変数にアクセスすると、グローバル変数のアクセスにオーバーヘッドがかかるためである。   When a global variable is accessed in a repetitive statement, the reason for making it a function that is not a core allocation target is that if a global variable is accessed in a repetitive statement, it takes overhead to access the global variable.

(ステップS106)
コア割り当て対象抽出部44は、コア割り当て対象となる条件を満たした関数を、コア割り当て対象としてコア割り当て対象関数テーブル34に記録する。
(Step S106)
The core allocation target extraction unit 44 records a function satisfying the condition to be a core allocation target in the core allocation target function table 34 as a core allocation target.

(ステップS107)
コア割り当て対象抽出部44は、コア割り当て対象となる条件を満たさない関数を、コア割り当て対象外としてコア割り当て対象関数テーブル34に記録する。
(Step S107)
The core allocation target extraction unit 44 records a function that does not satisfy the condition to be a core allocation target in the core allocation target function table 34 as being not a core allocation target.

(ステップS108)
コア割り当て対象抽出部44は、コンパイル対象のソースプログラム30に含まれる関数で、まだコア割り当て対象となる条件を満たすかどうかをチェックしていない関数があるかどうかを判断する。コア割り当て対象抽出部44は、未チェックの関数がある場合には、ステップS101に進み、未チェックの関数がない場合には、コア割り当て対象関数抽出処理を終了する。
(Step S108)
The core allocation target extraction unit 44 determines whether there is a function that has not yet been checked whether or not the function included in the source program 30 to be compiled satisfies the condition for core allocation. When there is an unchecked function, the core allocation target extraction unit 44 proceeds to step S101, and when there is no unchecked function, the core allocation target function extraction process ends.

次に、本発明の実施形態におけるコンパイラ装置のソース修正部45についての動作方法について説明する。図3A及び図3Bは、本発明の実施形態におけるコンパイラ装置のソース修正部45において、コア割り当て対象関数に対するソースプログラム修正方法のフローチャートである。   Next, an operation method for the source correction unit 45 of the compiler apparatus according to the embodiment of the present invention will be described. 3A and 3B are flowcharts of a source program correction method for a core allocation target function in the source correction unit 45 of the compiler apparatus according to the embodiment of the present invention.

(ステップS201)
はじめに、ソース修正部45は、ソースプログラム30に含まれる関数が、コア割り当て対象の関数の呼び出し元の関数となっているかどうかを判断する。ソース修正部45は、コア割り当て対象の関数の呼び出し元の関数となっていれば、ステップS211に進み、コア割り当て対象の関数の呼び出し元の関数となっていなければ、ステップS202に進む。
(Step S201)
First, the source correction unit 45 determines whether a function included in the source program 30 is a function that is a call source of a function to be assigned to a core. The source correcting unit 45 proceeds to step S211 if the function is a call source function of the core allocation target function, and proceeds to step S202 if the function is not the call source function of the core allocation target function.

(ステップS202)
次に、ソース修正部45は、ソースプログラム30に含まれる関数が、コア割り当て対象の関数であるかどうかを判断する。ソース修正部45は、コア割り当て対象の関数であれば、ステップS203に進み、コア割り当て対象の関数でなければ、ソースプログラム修正処理を終了する。
(Step S202)
Next, the source correcting unit 45 determines whether or not the function included in the source program 30 is a core allocation target function. If the function is a core allocation target function, the source correction unit 45 proceeds to step S203. If the function is not a core allocation target function, the source correction unit 45 ends the source program correction process.

(ステップS203)
次に、ソース修正部45は、コア割り当て対象の関数がグローバル変数をreadしているかどうかを判断する。ソース修正部45は、コア割り当て対象の関数にグローバル変数をreadしていれば、ステップS204に進み、コア割り当て対象の関数にグローバル変数をreadしていなければ、ステップS207に進む。
(Step S203)
Next, the source correction unit 45 determines whether the core allocation target function reads the global variable. The source correcting unit 45 proceeds to step S204 if the global variable is read in the core allocation target function, and proceeds to step S207 if the global variable is not read in the core allocation target function.

(ステップS204)
次に、ソース修正部45は、ソース修正処理中のコア割り当て対象関数の呼び出し元の関数において、ソース修正処理中のコア割り当て対象関数の呼び出し前に、他のコア割り当て対象関数が呼び出されているかどうかを判断する。ソース修正部45は、他のコア割り当て対象関数が呼び出されていれば、ステップS205に進み、他のコア割り当て対象関数が呼び出されていなければ、ステップS207に進む。
(Step S204)
Next, the source correction unit 45 determines whether another core allocation target function is called before calling the core allocation target function during the source correction process in the call source function of the core allocation target function during the source correction processing. Judge whether. The source correction unit 45 proceeds to step S205 if another core allocation target function is called, and proceeds to step S207 if another core allocation target function is not called.

(ステップS205)
次に、ソース修正部45は、ステップS204の他のコア割り当て対象関数において、グローバル変数をwriteしているかどうかを判断する。ソース修正部45は、グローバル変数をwriteしていれば、ステップS206に進み、グローバル変数をwriteしていなければ、ステップS207に進む。
(Step S205)
Next, the source correction unit 45 determines whether or not the global variable is written in another core allocation target function in step S204. The source correction unit 45 proceeds to step S206 if the global variable is written, and proceeds to step S207 if the global variable is not written.

(ステップS206)
次に、ソース修正部45は、他のCPUコアで実行されている関数によって、グローバル変数の値が変更された場合には、他のCPUコアから通知されたグローバル変数の値を利用して、グローバル変数のreadをリトライするようにソースプログラム30を修正する。また、ソース修正部は、ソース修正処理中の関数を呼び出す関数に対して、ソース修正処理中の関数の終了を通知するようにソースプログラム30を修正する。ソース修正部45は、ステップS207に進む。
(Step S206)
Next, when the value of the global variable is changed by a function executed in another CPU core, the source correction unit 45 uses the value of the global variable notified from the other CPU core, The source program 30 is modified so as to retry the read of the global variable. In addition, the source correction unit corrects the source program 30 so as to notify the function calling the function in the source correction process of the end of the function in the source correction process. The source correction unit 45 proceeds to step S207.

(ステップS207)
次に、ソース修正部45は、コア割り当て対象の関数がグローバル変数をwriteしているかどうかを判断する。ソース修正部45は、コア割り当て対象の関数にグローバル変数をwriteしていれば、ステップS208に進み、コア割り当て対象の関数にグローバル変数をwriteしていなければ、ソースプログラム修正処理を終了する。
(Step S207)
Next, the source correction unit 45 determines whether the core allocation target function is writing a global variable. If the global variable has been written to the core allocation target function, the source correction unit 45 proceeds to step S208. If the global variable has not been written to the core allocation target function, the source correction unit 45 ends the source program correction processing.

(ステップS208)
次に、ソース修正部45は、ソース修正処理中のコア割り当て対象関数の呼び出し元の関数において、ソース修正処理中のコア割り当て対象関数の呼び出し後に、他のコア割り当て対象関数が呼び出されているかどうかを判断する。ソース修正部45は、他のコア割り当て対象関数が呼び出されていれば、ステップS209に進み、他のコア割り当て対象関数が呼び出されていなければ、ソースプログラム修正処理を終了する。
(Step S208)
Next, the source correction unit 45 determines whether another core allocation target function is called after the call of the core allocation target function during the source correction processing in the function that is the source of the core allocation target function during the source correction processing. Judging. If another core allocation target function is called, the source correction unit 45 proceeds to step S209. If another core allocation target function is not called, the source correction unit 45 ends the source program correction processing.

(ステップS209)
次に、ソース修正部45は、ステップS208の他のコア割り当て対象関数において、グローバル変数をreadしているかどうかを判断する。ソース修正部45は、グローバル変数をreadしていれば、ステップS210に進み、グローバル変数をreadしていなければ、ソースプログラム修正処理を終了する。
(Step S209)
Next, the source correction unit 45 determines whether or not the global variable is read in another core allocation target function in step S208. If the global variable has been read, the source correction unit 45 proceeds to step S210. If the global variable has not been read, the source correction unit 45 ends the source program correction process.

(ステップS210)
次に、ソース修正部45は、他のCPUコアによって実行される、グローバル変数のreadを含む関数に、変更した後のグローバル変数の値を通知するようにソースプログラム30を修正する。ソース修正部45は、ソースプログラム修正処理を終了する。
(Step S210)
Next, the source correction unit 45 corrects the source program 30 so as to notify the function including the global variable read, which is executed by another CPU core, of the changed global variable value. The source correction unit 45 ends the source program correction process.

(ステップS211)
ソース修正部45は、コア割り当て対象関数をCPUコアへ割り当てる関数をソースプログラム30に追加する。
(Step S211)
The source correction unit 45 adds a function for allocating the core allocation target function to the CPU core to the source program 30.

(ステップS212)
ソース修正部45は、他のCPUコアへ割り当てた関数の終了を待つ処理をソースプログラム30に追加する。
(Step S212)
The source correction unit 45 adds processing for waiting for the end of the function assigned to another CPU core to the source program 30.

(ステップS213)
ソース修正部45は、他のCPUコアへ割り当てた関数の処理結果を、対応するCPUコアのローカルメモリから、共有メモリ6へ反映するようにソースプログラム30を修正する。
(Step S213)
The source correction unit 45 corrects the source program 30 so that the processing result of the function assigned to another CPU core is reflected in the shared memory 6 from the local memory of the corresponding CPU core.

以上が、本発明の実施形態におけるコンパイラ装置40のコア割り当て対象関数抽出部44及びソース修正部45についての動作方法の説明である。   The above is the description of the operation method for the core assignment target function extraction unit 44 and the source correction unit 45 of the compiler apparatus 40 according to the embodiment of the present invention.

次に、C言語の具体的なソースプログラムの例に基づいて、本発明の実施例1におけるコンパイラ装置40を説明する。図4は、本発明の実施例1におけるコンパイラ装置を説明するためのコンパイル対象のC言語のソースプログラム30である。   Next, the compiler apparatus 40 according to the first embodiment of the present invention will be described based on a specific example of a C language source program. FIG. 4 shows a C source program 30 to be compiled for explaining the compiler apparatus according to the first embodiment of the present invention.

まず、図4のソースプログラム30について説明する。   First, the source program 30 in FIG. 4 will be described.

まず、1行目には、整数型のグローバル変数g_nCountが定義され、0で初期化されている。   First, in the first line, an integer type global variable g_nCount is defined and initialized with zero.

2行目〜5行目には、グローバル変数g_nCountの値に1を加算する関数CountOneが記載されている。   The second to fifth lines describe a function CountOne that adds 1 to the value of the global variable g_nCount.

7行目〜10行目には、g_nCountの値にnAddを加算する関数ConutNが記載されている。ここで、nAddは、整数型の変数で、関数CountNの引数である。   The seventh line to the tenth line describe a function ContN that adds nAdd to the value of g_nCount. Here, nAdd is an integer type variable and is an argument of the function CountN.

12行目〜16行目には、グローバル変数g_nCountに1を代入し、nが0の場合には1、nが0以外の場合には0を戻り値として返却する関数condが記載されている。ここで、nは、整数型の変数で、関数condの引数である。   The 12th to 16th lines describe a function cond that assigns 1 to the global variable g_nCount, returns 1 when n is 0, and returns 0 when n is not 0. . Here, n is an integer type variable and is an argument of the function cond.

18行目〜24行目では、main関数が記載されている。main関数では、はじめにcond関数が呼び出される。次に、cond関数の戻り値が0でない場合には、CondOne関数が呼び出され、cond関数の戻り値が0の場合には、引数に10を設定したCoundNを呼び出す。最後に、戻り値として0を返却して処理を終了する。   In the 18th to 24th lines, the main function is described. In the main function, the cond function is first called. Next, if the return value of the cond function is not 0, the CondOne function is called, and if the return value of the cond function is 0, CallN with 10 set as an argument is called. Finally, 0 is returned as a return value and the process is terminated.

次に、図4のソースプログラム30に対応するグローバル変数テーブル33について説明する。図5は、本発明の実施例1におけるコンパイラ装置において、図4のソースプログラム30に対応するグローバル変数テーブル33の例である。図5のグローバル変数テーブル33は、グローバル変数名フィールド及び関数ごとのread箇所、write箇所を格納するフィールドを有する。図4のソースプログラム30では、グローバル変数g_nCountは、関数CountOneの4行目でread及びwriteされ、関数CountNの9行目でread及びwriteされ、関数condの14行目でwriteされ、main関数ではアクセスされていない。したがって、図4のソースプログラム30に対応するグローバル変数テーブル33の各フィールドの値は図5のようになる。グローバル変数テーブル33によって、グローバル変数g_nCountのread箇所及びwrite箇所を関数ごとに把握することができる。   Next, the global variable table 33 corresponding to the source program 30 in FIG. 4 will be described. FIG. 5 is an example of the global variable table 33 corresponding to the source program 30 of FIG. 4 in the compiler apparatus according to the first embodiment of the present invention. The global variable table 33 in FIG. 5 includes a global variable name field and fields for storing a read location and a write location for each function. In the source program 30 in FIG. 4, the global variable g_nCount is read and written in the fourth line of the function CountOne, read and written in the ninth line of the function CountN, and written in the 14th line of the function cond. Not accessed. Therefore, the values of the fields in the global variable table 33 corresponding to the source program 30 in FIG. 4 are as shown in FIG. With the global variable table 33, the read location and the write location of the global variable g_nCount can be grasped for each function.

次に、図4のソースプログラム30に対応するコア割り当て対象関数テーブル34について説明する。図6は、本発明の実施例1におけるコンパイラ装置において、図4のソースプログラム30に対応するコア割り当て対象関数テーブル34の例である。図6のコア割り当て対象関数テーブル34は、関数名フィールド、図2のフローチャートのコア割り当て対象となる条件に対応するフィールド、及びコア割り当て対象かどうかの情報を格納するフィールドを有する。図4のソースプログラム30に対して、図2のコア割り当て対象関数の抽出方法のフローチャートに基づいて、各関数について、フィールドの値が格納されている。図6では、main関数は、ステップS101により、コア割り当て対象外の関数として除外されている。cond関数は、15行目で戻り値を返し、main関数の21行目で、戻り値が条件判定に利用されているため、ステップS103により、コア割り当て対象外の関数として除外されている。CountOne関数及びCountN関数は、main関数ではなく、戻り値もなく、グローバル変数へのアクセスがあるが、繰り返し文内でアクセスしていないため、コア割り当て対象の関数となる。   Next, the core allocation target function table 34 corresponding to the source program 30 in FIG. 4 will be described. FIG. 6 is an example of the core allocation target function table 34 corresponding to the source program 30 of FIG. 4 in the compiler apparatus according to the first embodiment of the present invention. The core allocation target function table 34 in FIG. 6 includes a function name field, a field corresponding to a condition to be a core allocation target in the flowchart in FIG. For the source program 30 in FIG. 4, field values are stored for each function based on the flowchart of the core allocation target function extraction method in FIG. In FIG. 6, the main function is excluded as a function that is not a core allocation target in step S <b> 101. The cond function returns a return value at the 15th line, and since the return value is used for condition determination at the 21st line of the main function, the cond function is excluded as a function that is not subject to core assignment in step S103. The CountOne function and the CountN function are not main functions, do not have a return value, and have access to global variables, but are not accessed in repeated statements, and thus are functions to be assigned with cores.

次に、図4のソースプログラム30が、本発明の実施例1におけるコンパイラ装置のソース修正部45によって、修正された後のソースプログラムについて説明する。図7は、本発明の実施例1におけるコンパイラ装置において、図4のソースプログラム30が、ソース修正部45によって修正された後のソースプログラムの例である。   Next, the source program after the source program 30 of FIG. 4 has been corrected by the source correction unit 45 of the compiler apparatus according to the first embodiment of the present invention will be described. FIG. 7 shows an example of the source program after the source program 30 of FIG. 4 is modified by the source modification unit 45 in the compiler apparatus according to the first embodiment of the present invention.

まず、ソースプログラム30に記載されている関数に対して、ソース修正部45が、関数内部に新規に追加しているSTART関数、WAIT関数、WRITEBACK関数、SEND_TO関数、RECV_FROM関数及びEND関数について説明する。   First, a START function, a WAIT function, a WRITEBACK function, a SEND_TO function, a RECV_FROM function, and an END function that are newly added by the source correction unit 45 to the function described in the source program 30 will be described. .

START関数は、引数に指定された関数をCPUコア0〜2のいずれかに割り当て、引数に指定された関数の処理に必要な変数を共有メモリ6から、CPU0〜2に対応するローカルメモリ3〜5にコピーし、CPUコア0〜2のいずれかで処理を開始させる。   The START function assigns a function designated as an argument to one of the CPU cores 0 to 2, and variables necessary for processing the function designated as an argument from the shared memory 6 to the local memories 3 to 3 corresponding to the CPUs 0 to 2. 5 to start processing on any of the CPU cores 0 to 2.

WAIT関数は、他のCPUコアに割り当てられた関数が終了するまで(他のCPUコアに割り当てられた関数内で呼ばれるEND関数が終了するまで)、WAIT関数を呼び出す関数の処理を停止させる。   The WAIT function stops the processing of the function that calls the WAIT function until the function assigned to the other CPU core ends (until the END function called in the function assigned to the other CPU core ends).

WRITEBACK関数は、CPUコア0〜2のいずれかで処理され、CPUコア0〜2に対応するローカルメモリ3〜5のいずれかで保持されている、引数で指定されている関数の演算結果を共有メモリ6に反映する。   The WRITEBACK function is processed by any of the CPU cores 0 to 2 and is held in any of the local memories 3 to 5 corresponding to the CPU cores 0 to 2 and shares the operation result of the function specified by the argument. Reflected in the memory 6.

SEND_TO関数は、SEND_TO関数を呼び出す関数が実行されているCPUコアから、引数に指定された関数が実行されている他のCPUコアへ、引数に指定された変数の値を送信する。   The SEND_TO function transmits the value of the variable specified in the argument from the CPU core in which the function calling the SEND_TO function is executed to another CPU core in which the function specified in the argument is executed.

RECV_FROM関数は、SEND_TO関数に対応する関数であり、引数に指定された関数が実行されている他のCPUコアから、引数に指定された変数の値を受信する。   The RECV_FROM function is a function corresponding to the SEND_TO function, and receives the value of the variable specified in the argument from another CPU core in which the function specified in the argument is executed.

END関数は、WAIT関数に対応する関数であり、CPUコアに割り当てられた関数の終了処理を行い、WAIT関数を呼び出すことにより終了を待ち合わせている他のコアで実行されている関数に対して、処理が終了したことを通知する。   The END function is a function corresponding to the WAIT function, performs a termination process of the function assigned to the CPU core, and calls a WAIT function to call a WAIT function for a function executed in another core. Notify that the process has been completed.

次に、図4のソースプログラム30に含まれていた関数が、ソース修正部45によって、どのように修正されるかについて説明する。   Next, how the function included in the source program 30 in FIG. 4 is corrected by the source correction unit 45 will be described.

まず、main関数について説明する。ソース修正部45は、main関数では、まず、図7の45、46行目において、START関数によってCountOne関数、CountN関数を呼び出す修正を行う。この修正によって、他のCPUコアにCountOne関数の処理とCountN関数の処理を実行させる。次に、図7の48行目において、WAIT関数の呼び出す処理を追加する。この修正によって、他のCPUコアに割り当てたCountOne関数、CountN関数の処理の終了を待ち合わせる。次に、図7の49行目、50行目において、WRITEBACK関数を使用する修正を行う。この修正により、図7の47行目の条件判定の結果に基づいて、他のCPUコアに割り当てたCountOne関数又はCountN関数の処理結果を、CPUコアのローカルメモリから、共有メモリ6に反映させる。   First, the main function will be described. In the main function, first, the source correction unit 45 performs correction to call the CountOne function and the CountN function by the START function in the 45th and 46th lines in FIG. This modification causes other CPU cores to execute CountOne function processing and CountN function processing. Next, processing for calling the WAIT function is added on the 48th line in FIG. With this modification, the end of processing of the CountOne function and the CountN function assigned to other CPU cores is waited. Next, in the 49th line and the 50th line in FIG. 7, correction using the WRITEBACK function is performed. With this modification, the processing result of the CountOne function or the CountN function assigned to another CPU core is reflected in the shared memory 6 from the local memory of the CPU core based on the condition determination result on the 47th line in FIG.

次に、cond関数について説明する。ソース修正部45は、cond関数では、図7の37、38行目において、SEND_TO関数により、CountOne関数及びCountN関数に対して、g_nCountの値を通知する。この修正により、main関数でCountOne関数及びCountN関数をSTART関数によって呼び出すことにより、他のCPUコアによって実行されているCountOne関数及びCountN関数に、cond関数で変更した後のg_nCountの値を通知することができる。   Next, the cond function will be described. In the cond function, the source correction unit 45 notifies the value of g_nCount to the CountOne function and the CountN function by the SEND_TO function in the 37th and 38th lines of FIG. With this correction, the CountOne function and the CountN function are called by the START function by the main function, and the value of g_nCount after being changed by the cond function is notified to the CountOne function and the CountN function executed by other CPU cores. Can do.

次に、CountOne関数、CountN関数について説明する。ソース修正部45によるCountOne関数とCountN関数に対する修正は、同様であるため、CountOne関数についてのみ説明する。   Next, the CountOne function and the CountN function will be described. Since the correction to the CountOne function and the CountN function by the source correction unit 45 is the same, only the CountOne function will be described.

CountOne関数がSTART関数によって呼び出される場合には、CountOne関数呼び出し時に共有メモリ6のg_nCountが、CountOne関数が実行されるCPUコアのローカルメモリへコピーされている。ソース修正部45は、図7の6〜14行目において、他のCPUコアによって実行されているcond関数によって、g_nCountの値が変更された場合には、通知されたg_nCountの値を利用して図7の8行目の処理をリトライする修正を行う。この修正により、cond関数によって、g_nCountの値が変更された場合には、CountOne関数によって、g_nCountの値を変更する処理がリトライされる。また、ソース修正部45は、図7の15行目において、END関数を呼び出す処理を追加する。この修正によって、main関数において、図7の48行目のWAIT関数によるCountOne関数の終了を待ち合わせることができる。   When the CountOne function is called by the START function, g_nCount of the shared memory 6 at the time of calling the CountOne function is copied to the local memory of the CPU core where the CountOne function is executed. When the value of g_nCount is changed by the cond function executed by another CPU core in the 6th to 14th lines in FIG. 7, the source correction unit 45 uses the notified value of g_nCount. A correction for retrying the process on the eighth line in FIG. 7 is performed. With this modification, when the value of g_nCount is changed by the cond function, the process of changing the value of g_nCount is retried by the CountOne function. Further, the source correction unit 45 adds processing for calling the END function in the 15th line of FIG. With this modification, in the main function, the end of the CountOne function by the WAIT function on the 48th line in FIG. 7 can be awaited.

次に、本発明の実施例1におけるコンパイラ装置によって生成された、図7のソースプログラムに対応するオブジェクトプログラムが、マルチコアプロセッサ7で実行された場合の動作について説明する。図8は、本発明の実施例1におけるコンパイラ装置によって生成された、図7のソースプログラムに対応するオブジェクトプログラムを実行した場合の動作説明図である。   Next, an operation when the object program corresponding to the source program of FIG. 7 generated by the compiler apparatus according to the first embodiment of the present invention is executed by the multi-core processor 7 will be described. FIG. 8 is an operation explanatory diagram when an object program corresponding to the source program of FIG. 7 generated by the compiler apparatus according to the first embodiment of the present invention is executed.

まず、main関数が実行されるCPUコア0の動作について説明する。   First, the operation of the CPU core 0 in which the main function is executed will be described.

(ステップS301)
はじめに、CPUコア0でmain関数の実行が開始される。
(Step S301)
First, execution of the main function is started in the CPU core 0.

(ステップS302)
次に、main関数が、CountOne関数及びCountN関数の処理を各CPUコアに割り当てる。
(Step S302)
Next, the main function assigns the processing of the CountOne function and the CountN function to each CPU core.

(ステップS303)
次に、CPUコア0で引数に1が設定されたCond関数が実行される。
(Step S303)
Next, the Cond function with 1 set as an argument is executed by the CPU core 0.

(ステップS304)
次に、CPUコア0で実行されているmain関数は、他のCPUコアへ処理を割り当てたCountOne関数及びCountN関数の処理の終了を待つ。
(Step S304)
Next, the main function executed in the CPU core 0 waits for the end of the processing of the CountOne function and the CountN function assigned to other CPU cores.

(ステップS305)
次に、cond(1)の実行結果が代入されるcの値に基づいて、cが0以外の場合には、CountOne関数の処理結果を共有メモリ6に反映し、cが0の場合には、引数を10に設定したCountN関数の処理結果を共有メモリに反映する。
(Step S305)
Next, based on the value of c into which the execution result of cond (1) is substituted, if c is other than 0, the processing result of the CountOne function is reflected in the shared memory 6, and if c is 0, The processing result of the CountN function with the argument set to 10 is reflected in the shared memory.

(ステップS306)
CPUコア0のmain関数は、処理を終了する。
(Step S306)
The main function of the CPU core 0 ends the process.

次に、main関数によってCPUコア1に割り当てられるCountOne関数の動作について説明する。   Next, the operation of the CountOne function assigned to the CPU core 1 by the main function will be described.

(ステップS307)
はじめに、CountOne関数は、CountOne関数読み出し時に、共有メモリ6からローカルメモリ4にコピーされたg_nCountの値を、CountOne関数内部のローカル変数で保持する。
(Step S307)
First, the CountOne function holds the value of g_nCount copied from the shared memory 6 to the local memory 4 as a local variable inside the CountOne function when the CountOne function is read.

(ステップS308)
次に、CountOne関数は、g_nCountの値を+1加算する処理を行う。
(Step S308)
Next, the CountOne function performs a process of adding +1 to the value of g_nCount.

(ステップS309)
次に、CountOne関数は、CPU0のcond関数が、g_nCountを1に書き換えた後の通知を待つ。
(Step S309)
Next, the CountOne function waits for a notification after the cond function of CPU0 rewrites g_nCount to 1.

(ステップS310)
次に、CountOne関数は、ステップS307で読み出したg_nCountの値と、CPU0のcond関数が書き換えた後のg_nCountの値が同一であるかどうかを判断する。g_nCountの値が同一であれば、ステップS308の演算結果をCPUコア1のローカルメモリ4で所持し、g_nCountの値が同一でなければ、ステップS307に戻って、処理をリトライする。
(Step S310)
Next, the CountOne function determines whether the value of g_nCount read in step S307 is the same as the value of g_nCount after the rewrite of the cond function of CPU0. If the value of g_nCount is the same, the calculation result of step S308 is held in the local memory 4 of the CPU core 1, and if the value of g_nCount is not the same, the process returns to step S307 to retry the process.

(ステップS311)
CPUコア1のCountOne関数は、処理を終了する。
(Step S311)
The CountOne function of the CPU core 1 ends the process.

次に、main関数によってCPUコア2に割り当てられるCountN関数の動作について説明する。   Next, the operation of the CountN function assigned to the CPU core 2 by the main function will be described.

(ステップS312)
はじめに、CountN関数は、CountN関数読み出し時に、共有メモリ6からローカルメモリ4にコピーされたg_nCountの値を、CountN関数内部のローカル変数で保持する。
(Step S312)
First, the CountN function holds the value of g_nCount copied from the shared memory 6 to the local memory 4 as a local variable inside the CountN function when the CountN function is read.

(ステップS313)
次に、CountN関数は、引数に10が設定されているため、g_nCountの値を+10加算する処理を行う。
(Step S313)
Next, the CountN function performs a process of adding +10 to the value of g_nCount because 10 is set as an argument.

(ステップS314)
次に、CountN関数は、CPU0のcond関数が、g_nCountを1に書き換えた後の通知を待つ。
(Step S314)
Next, the CountN function waits for a notification after the cond function of CPU0 rewrites g_nCount to 1.

(ステップS315)
次に、CountN関数は、ステップS312で読み出したg_nCountの値と、CPU0のcond関数が書き換えた後のg_nCountの値が同一であるかどうかを判断する。g_nCountの値が同一であれば、ステップS313の演算結果をローカルメモリ5で所持し、g_nCountの値が同一でなければ、ステップS312に戻って、処理をリトライする。
(Step S315)
Next, the CountN function determines whether the value of g_nCount read in step S312 is the same as the value of g_nCount after the rewrite of the cond function of CPU0. If the value of g_nCount is the same, the calculation result of step S313 is held in the local memory 5, and if the value of g_nCount is not the same, the process returns to step S312 to retry the process.

(ステップS316)
CPUコア2のCountN関数は、処理を終了する。
(Step S316)
The CountN function of the CPU core 2 ends the process.

本実施例1によれば、条件分岐命令の条件判定処理と、分岐後の各命令がグローバル変数に依存している場合に、マルチコアプロセッサによって、投機的に条件分岐命令の条件判定処理と、分岐後の各命令が並列処理されても誤動作しないオブジェクトプログラムを生成するコンパイラ装置を提供することができる。   According to the first embodiment, the conditional determination processing of the conditional branch instruction and the conditional determination processing of the conditional branch instruction speculatively by the multi-core processor when each instruction after branching depends on the global variable, It is possible to provide a compiler device that generates an object program that does not malfunction even if each subsequent instruction is processed in parallel.

また、本実施例1によれば、特許文献1の共有メモリ更新フラグを使用せずに、グローバル変数の更新を行うことができる。CPUコアに割り当てられた関数は、グローバル変数の更新情報を、CPUコア間のメッセージ送受信によって、知ることができるからである。   Further, according to the first embodiment, it is possible to update the global variable without using the shared memory update flag of Patent Document 1. This is because the function assigned to the CPU core can know update information of the global variable by transmitting and receiving messages between the CPU cores.

以上、本発明の実施の形態が添付の図面を参照することにより説明された。但し、本発明は、上述の実施の形態に限定されず、要旨を逸脱しない範囲で当業者により適宜変更され得る。   The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the above-described embodiments, and can be appropriately changed by those skilled in the art without departing from the scope of the invention.

0 CPUコア
1 CPUコア
2 CPUコア
3 ローカルメモリ
4 ローカルメモリ
5 ローカルメモリ
6 共有メモリ
7 マルチコアプロセッサ
10 コンパイラプログラム
20 表示部
21 入力部
22 CPU(Central Processing Unit)
23 補助記憶装置
24 メモリ
25 システムバス
30 原始プログラム(ソースプログラム)
31 目的プログラム(オブジェクトプログラム)
32 変数名、定数等の各種情報のテーブル
33 グローバル変数テーブル
34 コア割り当て対象関数テーブル
40 コンパイラ装置
41 読み込み部
42 字句解析部
43 構文解析部
44 コア割り当て対象関数抽出部
45 ソース修正部
46 中間語作成部
47 最適化部
48 オブジェクト生成部
0 CPU core 1 CPU core 2 CPU core 3 Local memory 4 Local memory 5 Local memory 6 Shared memory 7 Multi-core processor 10 Compiler program 20 Display unit 21 Input unit 22 CPU (Central Processing Unit)
23 Auxiliary storage device 24 Memory 25 System bus 30 Primitive program (source program)
31 Objective program (object program)
32 Table of various information such as variable names and constants 33 Global variable table 34 Core allocation target function table 40 Compiler device 41 Reading unit 42 Lexical analysis unit 43 Syntax analysis unit 44 Core allocation target function extraction unit 45 Source correction unit 46 Intermediate language creation Unit 47 Optimization unit 48 Object generation unit

Claims (9)

ソースプログラムを読み込む読み込み部と、
前記ソースプログラムの字句解析を行う字句解析部と、
前記ソースプログラムの構文解析を行う構文解析部と、
前記ソースプログラムに含まれる関数から、グローバル変数の値に基づいて前記グローバル変数の値を変更する処理を含む関数を、コア割り当て対象関数として抽出するコア割り当て対象関数抽出部と、
前記コア割り当て対象関数が、条件分岐命令の条件判定処理による分岐後の呼出し関数となる場合には、前記コア割り当て対象関数を呼び出す関数が実行されるマルチコアプロセッサのコアとは、別のCPUコアに対して前記コア割り当て対象関数を1:1に割り当て、前記条件分岐命令の前記条件判定処理と、前記コア割り当て対象関数の処理を各前記CPUコアで並列処理させ、前記条件分岐命令の前記条件判定処理によって、前記グローバル変数が変更された場合には、前記グローバル変数の値に基づいて前記グローバル変数の値を変更する処理を、前記コア割り当て対象関数にリトライさせるように前記ソースプログラムを修正するソース修正部と、
前記ソースプログラムを前記ソース修正部により修正したソースプログラムから中間言語による中間語を作成する中間語作成部と、
前記中間語を最適化する最適化部と、
最適化された前記中間語からオブジェクトプログラムを生成するオブジェクト生成部と
を備えるコンパイラ装置。
A reading section for reading a source program;
A lexical analyzer for performing lexical analysis of the source program;
A parsing unit for parsing the source program;
A core allocation target function extraction unit that extracts a function including a process of changing the value of the global variable based on the value of the global variable from a function included in the source program as a core allocation target function;
When the core assignment target function is a call function after branching by the condition determination process of the conditional branch instruction, the CPU core assignment function is executed on a different CPU core from the core of the multicore processor on which the function calling the core assignment target function is executed. On the other hand, the core assignment target function is assigned 1: 1, the condition determination processing of the conditional branch instruction and the processing of the core assignment target function are processed in parallel in each CPU core, and the condition determination of the conditional branch instruction A source that modifies the source program so that when the global variable is changed by the processing, the function to change the value of the global variable based on the value of the global variable is caused to retry the function to be allocated to the core Correction part,
An intermediate language creating unit for creating an intermediate language in an intermediate language from a source program obtained by modifying the source program by the source modifying unit;
An optimization unit for optimizing the intermediate language;
A compiler apparatus comprising: an object generation unit that generates an object program from the optimized intermediate language.
前記コア割り当て対象関数抽出部は、前記ソースプログラムに含まれる関数が、main関数ではなく、かつ、前記関数の戻り値が前記条件分岐命令の前記条件判定処理に利用されておらず、かつ、前記関数からグローバル変数へのアクセスがあり、かつ、前記関数から前記グローバル変数へのアクセスが前記関数内の繰り返し処理の中からアクセスされておらず、又は、前記関数からグローバル変数へのアクセスがない場合に、マルチコアプロセッサの前記コア割り当て対象関数とする
請求項1に記載のコンパイラ装置。
In the core allocation target function extraction unit, the function included in the source program is not a main function, and the return value of the function is not used for the condition determination processing of the conditional branch instruction, and When there is access to a global variable from a function, and access to the global variable from the function is not accessed from the iterative process in the function, or there is no access to the global variable from the function The compiler apparatus according to claim 1, wherein the function is a core allocation target function of a multi-core processor.
前記ソース修正部は、前記コア割り当て対象関数を呼び出す関数に対しては、前記コア割り当て対象関数を前記マルチコアプロセッサに割り当てる処理と、前記コア割り当て対象関数の処理の終了を待ち合わせる処理と、前記コア割り当て対象関数の処理結果を有効化する処理を追加する修正を行い、
前記条件分岐命令の前記条件判定処理に使用されている関数に対しては、前記コア割り当て対象関数に、変更後の前記グローバル変数の値を通知する処理を追加する修正を行い、
前記コア割り当て対象関数に対しては、前記グローバル変数を変更する前の値を保持する処理と、前記通知する処理による通知を受信するまで待ち合わせる処理と、前記通知する処理による前記通知を受信するまで待ち合わせる処理の後に、前記保持する処理で保持したグローバル変数の値と、前記グローバル変数の値を比較し、前記グローバル変数の値が同一でない場合には、前記コア割り当て対象関数による前記グローバル変数の値を変更する処理をリトライする処理を追加する修正を行う
請求項1又は2に記載のコンパイラ装置。
For the function that calls the core allocation target function, the source modification unit allocates the core allocation target function to the multi-core processor, waits for the end of the processing of the core allocation target function, and the core allocation Modify to add the processing to validate the processing result of the target function,
For the function used in the condition determination process of the conditional branch instruction, the core allocation target function is modified to add a process for notifying the changed value of the global variable,
For the core allocation target function, a process of holding a value before changing the global variable, a process of waiting until a notification by the notification process is received, and a process of receiving the notification by the notification process After the waiting process, the value of the global variable held in the holding process is compared with the value of the global variable, and if the value of the global variable is not the same, the value of the global variable by the core allocation target function The compiler apparatus according to claim 1, wherein correction is performed to add a process of retrying the process of changing the process.
前記構文解析部は、前記ソースプログラムに含まれるグローバル変数のread箇所及びwrite箇所の情報を、前記ソースプログラムに含まれる関数ごとに所持するグローバル変数テーブルを作成し、
前記コア割り当て対象関数抽出部は、前記ソースプログラムに含まれる関数に対して、前記マルチコアプロセッサの各CPUコアに割り当てる対象となる関数であるかどうかの情報を記憶するコア割り当て対象関数テーブルを作成し、
前記ソース修正部は、前記グローバル変数テーブル及び前記コア割り当て対象関数テーブルに基づいて前記ソースプログラムを修正する
請求項1乃至3いずれか1項に記載のコンパイラ装置。
The syntax analysis unit creates a global variable table that holds information on read locations and write locations of global variables included in the source program for each function included in the source program,
The core allocation target function extraction unit creates a core allocation target function table for storing information on whether or not the function included in the source program is a function to be allocated to each CPU core of the multi-core processor. ,
The compiler apparatus according to any one of claims 1 to 3, wherein the source correction unit corrects the source program based on the global variable table and the core allocation target function table.
読み込み部が、ソースプログラムを読み込むステップと、
字句解析部が、前記ソースプログラムの字句解析を行うステップと、
構文解析部が、前記ソースプログラムの構文解析を行うステップと、
コア割り当て対象関数抽出部が、前記ソースプログラムに含まれる関数から、グローバル変数の値に基づいて前記グローバル変数の値を変更する処理を含む関数を、コア割り当て対象関数として抽出するステップと、
ソース修正部が、前記コア割り当て対象関数が、条件分岐命令の条件判定処理による分岐後の呼出し関数となる場合には、前記コア割り当て対象関数を呼び出す関数が実行されるマルチコアプロセッサのコアとは、別のCPUコアに対して前記コア割り当て対象関数を1:1に割り当て、前記条件分岐命令の前記条件判定処理と、前記コア割り当て対象関数の処理を各前記CPUコアで並列処理させ、前記条件分岐命令の前記条件判定処理によって、前記グローバル変数が変更された場合には、前記グローバル変数の値に基づいて前記グローバル変数の値を変更する処理を、前記コア割り当て対象関数にリトライさせるように前記ソースプログラムを修正するステップと、
中間語作成部が、前記ソースプログラムを前記ソース修正部により修正したソースプログラムから中間言語による中間語を作成するステップと、
最適化部が、前記中間語を最適化するステップと、
オブジェクト生成部が、最適化された前記中間語からオブジェクトプログラムを生成するステップと
を含むコンパイル方法。
The reading unit reads the source program; and
A lexical analyzer performing lexical analysis of the source program;
A step in which a syntax analysis unit parses the source program;
A step of extracting a function including a process of changing a value of the global variable from a function included in the source program as a core allocation target function from a function included in the source program;
When the core allocation target function is a call function after branching by the condition determination process of the conditional branch instruction, the source correction unit, the core of the multicore processor on which the function that calls the core allocation target function is executed, The core assignment target function is assigned 1: 1 to another CPU core, the condition determination processing of the conditional branch instruction and the processing of the core assignment target function are processed in parallel in each CPU core, and the conditional branch When the global variable is changed by the condition determination process of the instruction, the source to cause the core allocation target function to retry the process of changing the value of the global variable based on the value of the global variable Steps to modify the program;
An intermediate language creating unit creating an intermediate language in an intermediate language from a source program obtained by modifying the source program by the source modifying unit;
An optimization unit optimizing the intermediate language;
A compiling method, comprising: an object generating unit generating an object program from the optimized intermediate language.
前記コア割り当て対象関数として抽出するステップは、
前記コア割り当て対象関数抽出部が、前記ソースプログラムに含まれる関数が、main関数ではなく、かつ、前記関数の戻り値が前記条件分岐命令の前記条件判定処理に利用されておらず、かつ、前記関数からグローバル変数へのアクセスがあり、かつ、前記関数から前記グローバル変数へのアクセスが前記関数内の繰り返し処理の中からアクセスされておらず、又は、前記関数からグローバル変数へのアクセスがない場合に、マルチコアプロセッサの前記コア割り当て対象関数とするステップ
を含む請求項5に記載のコンパイル方法。
The step of extracting as the core allocation target function includes:
The core allocation target function extraction unit is configured such that the function included in the source program is not a main function, and the return value of the function is not used for the condition determination process of the conditional branch instruction, and When there is access to a global variable from a function, and access to the global variable from the function is not accessed from the iterative process in the function, or there is no access to the global variable from the function The compiling method according to claim 5, further comprising the step of setting the core allocation target function of a multi-core processor.
前記ソースプログラムを修正するステップは、前記ソース修正部が、前記コア割り当て対象関数を呼び出す関数に対しては、前記コア割り当て対象関数を前記マルチコアプロセッサに割り当てる処理と、前記コア割り当て対象関数の処理の終了を待ち合わせる処理と、前記コア割り当て対象関数の処理結果を有効化する処理を追加する修正を行うステップと、
前記ソース修正部が、前記条件分岐命令の前記条件判定処理に使用されている関数に対しては、前記コア割り当て対象関数に、変更後の前記グローバル変数の値を通知する処理を追加する修正を行うステップと、
前記ソース修正部が、前記コア割り当て対象関数に対しては、前記グローバル変数を変更する前の値を保持する処理と、前記通知する処理による通知を受信するまで待ち合わせる処理と、前記通知する処理による前記通知を受信するまで待ち合わせる処理の後に、前記保持する処理で保持したグローバル変数の値と、前記グローバル変数の値を比較し、前記グローバル変数の値が同一でない場合には、前記コア割り当て対象関数による前記グローバル変数の値を変更する処理をリトライする処理を追加する修正を行うステップと
を含む請求項5又は6に記載のコンパイル方法。
The step of modifying the source program includes: a process in which the source modification unit allocates the core allocation target function to the multi-core processor for a function that calls the core allocation target function; A process of waiting for completion, a step of correcting to add a process of enabling the processing result of the core allocation target function, and
For the function used in the condition determination process of the conditional branch instruction, the source correction unit adds a process of notifying the core allocation target function of the value of the changed global variable. Steps to do,
For the core allocation target function, the source modification unit holds the value before changing the global variable, waits until receiving a notification by the notifying process, and by the notifying process After waiting for the notification to be received, the global variable value held in the holding process is compared with the global variable value. If the global variable values are not the same, the core allocation target function The compile method according to claim 5, further comprising a step of adding a process of retrying a process of changing the value of the global variable according to.
前記構文解析を行うステップは、前記構文解析部が、前記ソースプログラムに含まれるグローバル変数のread箇所及びwrite箇所の情報を、前記ソースプログラムに含まれる関数ごとに所持するグローバル変数テーブルを作成するステップと、
前記コア割り当て対象関数として抽出するステップは、前記コア割り当て対象関数抽出部が、前記ソースプログラムに含まれる関数に対して、前記マルチコアプロセッサの各CPUコアに割り当てる対象となる関数であるかどうかの情報を記憶するコア割り当て対象関数テーブルを作成するステップと、
前記ソース修正部が、前記グローバル変数テーブル及び前記コア割り当て対象関数テーブルに基づいて前記ソースプログラムを修正するステップと
を含む請求項1乃至3いずれか1項に記載のコンパイル方法。
The step of performing the syntax analysis includes the step of creating a global variable table in which the syntax analysis unit possesses information on a read location and a write location of the global variable included in the source program for each function included in the source program. When,
The step of extracting as the core allocation target function is information regarding whether the core allocation target function extraction unit is a function to be allocated to each CPU core of the multi-core processor with respect to the function included in the source program. Creating a core allocation target function table for storing
The compile method according to claim 1, wherein the source correction unit includes a step of correcting the source program based on the global variable table and the core allocation target function table.
請求項5乃至8のいずれか1項に記載のコンパイル方法をコンピュータに実行させるためのコンパイラプログラム。   A compiler program for causing a computer to execute the compiling method according to any one of claims 5 to 8.
JP2010252280A 2010-11-10 2010-11-10 Compiler device, compiling method and compiler program Withdrawn JP2012103923A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010252280A JP2012103923A (en) 2010-11-10 2010-11-10 Compiler device, compiling method and compiler program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010252280A JP2012103923A (en) 2010-11-10 2010-11-10 Compiler device, compiling method and compiler program

Publications (1)

Publication Number Publication Date
JP2012103923A true JP2012103923A (en) 2012-05-31

Family

ID=46394237

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010252280A Withdrawn JP2012103923A (en) 2010-11-10 2010-11-10 Compiler device, compiling method and compiler program

Country Status (1)

Country Link
JP (1) JP2012103923A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014115613A1 (en) * 2013-01-23 2014-07-31 学校法人 早稲田大学 Parallelism extraction method and method for making program
WO2016032234A1 (en) * 2014-08-27 2016-03-03 주식회사 파수닷컴 Source code analysis device, computer program for same, and recording medium thereof
JP2018073054A (en) * 2016-10-27 2018-05-10 株式会社Dtsインサイト Object analyzing device, object analyzing method, and program
US10496516B2 (en) 2014-08-27 2019-12-03 Sparrow Co., Ltd. Source code analysis device, computer program for same, and recording medium thereof

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014115613A1 (en) * 2013-01-23 2014-07-31 学校法人 早稲田大学 Parallelism extraction method and method for making program
WO2016032234A1 (en) * 2014-08-27 2016-03-03 주식회사 파수닷컴 Source code analysis device, computer program for same, and recording medium thereof
US10496516B2 (en) 2014-08-27 2019-12-03 Sparrow Co., Ltd. Source code analysis device, computer program for same, and recording medium thereof
JP2018073054A (en) * 2016-10-27 2018-05-10 株式会社Dtsインサイト Object analyzing device, object analyzing method, and program

Similar Documents

Publication Publication Date Title
US7730463B2 (en) Efficient generation of SIMD code in presence of multi-threading and other false sharing conditions and in machines having memory protection support
US8832672B2 (en) Ensuring register availability for dynamic binary optimization
US11900113B2 (en) Data flow processing method and related device
US9015690B2 (en) Proactive loop fusion of non-adjacent loops with intervening control flow instructions
JPH01166141A (en) Debugging system
EP3066560B1 (en) A data processing apparatus and method for scheduling sets of threads on parallel processing lanes
US20100095286A1 (en) Register reduction and liveness analysis techniques for program code
US20110219204A1 (en) Gpu support for garbage collection
JP2011070256A (en) Debugger and program
JP2005332387A (en) Method and system for grouping and managing memory instruction
US9513886B2 (en) Heap data management for limited local memory(LLM) multi-core processors
US7480768B2 (en) Apparatus, systems and methods to reduce access to shared data storage
JP2019049843A (en) Execution node selection program and execution node selection method and information processor
JP2010009495A (en) Information processor, program processing method, and computer program
US11226798B2 (en) Information processing device and information processing method
JP2012103923A (en) Compiler device, compiling method and compiler program
KR20220016993A (en) How to manipulate the mask of an explicit independent mask register in the Graphics Processing Unit (GPU)
US8949777B2 (en) Methods and systems for mapping a function pointer to the device code
US10496433B2 (en) Modification of context saving functions
US20200371827A1 (en) Method, Apparatus, Device and Medium for Processing Data
JP5293609B2 (en) Multiprocessor and cache synchronization control method and program thereof
US20140223419A1 (en) Compiler, object code generation method, information processing apparatus, and information processing method
JP6217386B2 (en) Program generation method for multiprocessor
US20050251795A1 (en) Method, system, and program for optimizing code
US20200409746A1 (en) Information processing apparatus and recording medium

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140204