JPH03122722A - Object program forming system - Google Patents

Object program forming system

Info

Publication number
JPH03122722A
JPH03122722A JP26107389A JP26107389A JPH03122722A JP H03122722 A JPH03122722 A JP H03122722A JP 26107389 A JP26107389 A JP 26107389A JP 26107389 A JP26107389 A JP 26107389A JP H03122722 A JPH03122722 A JP H03122722A
Authority
JP
Japan
Prior art keywords
parallel processing
program
processing part
intermediate text
information
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.)
Pending
Application number
JP26107389A
Other languages
Japanese (ja)
Inventor
Takashi Kaneko
孝 金子
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP26107389A priority Critical patent/JPH03122722A/en
Publication of JPH03122722A publication Critical patent/JPH03122722A/en
Pending legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To rapidly execute an object program even when resource competition between processors may be generated by providing an object program forming system with an intermediate text deforming part for deforming a 1st intermediate program to a 2nd intermediate program and an object program forming part for forming the object program from the 2nd intermediate program. CONSTITUTION:The intermediate text deforming part 24 inputs an intermediate text corresponding to a parallel processing part in an intermediate text 3, and at the time of forming an individual object program to be executed by each processor, deforms the intermediate text in accordance with information in a competition part information table 5 so that competition is not generated in the resource using the intermediate texts to be executed by respective processors and forms the intermediate text 6. The object program forming part 25 inputs the intermediate part 6 formed by the deformation part 24 and forms an object program 7. Thereby even if the resource competition may be generated between respective processors, the object program 7 can rapidly be executed.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、コンノ9イラにおける並列処理部分の目的プ
ログラムの生成方式に関し、特にマルチプロセッサによ
る並列処理実行時、プロセッサ間で資源に関する競合が
発生する際、各プロセッサが別々に実行するための目的
プログラムの生成方式(従来の技術) 従来、マルチプロセッサシステムに対して、高級グログ
ラミング言語(例えば、フォートラン言語)で記述され
た原始プログラムを人力して、並列処理を行う目的プロ
グラムを生成するコンパイラでは、マルチプロセ、すに
よシ並列処理を実行する場合、原始プログラム中の並列
処理実行が可能な処理部分に対して各プロセッサが別々
に実行するための目的プログラムを生成するとき、プロ
セッサ間で資源に関する競合が発生するか否かを考慮し
ていない。
Detailed Description of the Invention (Industrial Field of Application) The present invention relates to a method for generating a target program for a parallel processing part in a computer controller, and particularly relates to a method for generating a target program for a parallel processing part in a computer controller, and in particular, when a multiprocessor executes parallel processing, competition for resources occurs between processors. A method for generating a target program for each processor to execute separately (conventional technology) Conventionally, a source program written in a high-level programming language (for example, Fortran language) was manually generated for a multiprocessor system. When executing multi-process parallel processing, a compiler that generates a target program that performs parallel processing requires that each processor independently execute the parts of the source program that can be executed in parallel. When generating a target program for a computer, it is not considered whether or not there will be contention for resources between processors.

(発明の解決しようとしている課題) 上述のように、従来の方式では、コンパイラにおいて原
始プログラムを入力し、並列処理を行う目的プログラム
を生成する場合、グロセ、す間で資源に関する競合が発
生するか否かを考慮しない。
(Problem to be Solved by the Invention) As mentioned above, in the conventional method, when a source program is input to a compiler and a target program that performs parallel processing is generated, it is difficult to determine whether contention regarding resources will occur between gross and parallel processing. Does not consider whether or not.

このため、プロセ、す間で資源に関する競合が発生しな
いように各プロセ、すが別々に実行するための目的プロ
グラムを生成できる場合でも、競合が発生するような目
的プログラムを生成してしまう。
For this reason, even if it is possible to generate object programs for each process to execute separately so that resource conflicts do not occur between the processes, object programs that cause conflicts are generated.

このため、マルチプロセッサによる並列処理実行時、特
に並列処理開始直後、各プロセッサが同期した直後の並
列処理再開時等において、プロセ、す間で資源に関する
競合が発生し、目的プログラムを高速に実行できないと
いう問題点がある。
For this reason, when parallel processing is executed by multiprocessors, especially when parallel processing is restarted immediately after starting parallel processing or immediately after each processor has synchronized, resource contention occurs between processes, making it impossible to execute the target program at high speed. There is a problem.

本発明の目的はプロセッサ間で資源に関する競合が発生
する可能性のある場合でも目的プログラムを高速に実行
できる目的プログラム生成方式を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a method for generating a target program that can execute the target program at high speed even when there is a possibility that contention regarding resources may occur between processors.

(課屋を解決するための手段) 本発明によれば、マルチプロセッサシステムに対して、
高級プログラミング言語で記述された原始プログラムを
入力し、並列処理を行う目的プログラムを生成するコン
・9イラにおいて、高級プログラミング言語で記述され
た原始プログラムを入力し、構文解析を行って第1の中
間テキストを生成する構文解析部と、第1の中間テキス
トt−参照して、原始プログラム中の並列処理実行が可
能な並列処理部分を検出し、この並列処理部分中で使用
する資源に関する資源情報を並列処理部分情報テーブル
に登録する並列処理部分情報抽出部と。
(Means for solving the problem) According to the present invention, for a multiprocessor system,
A source program written in a high-level programming language is input, and a target program that performs parallel processing is generated by the computer 9. A syntax analysis unit that generates text and a first intermediate text t-reference to detect a parallel processing part in the source program that can be executed in parallel, and to obtain resource information regarding resources used in this parallel processing part. and a parallel processing partial information extraction unit that is registered in the parallel processing partial information table.

並列処理部分情報テーブルから資源情報を入力し。Enter resource information from the parallel processing partial information table.

この資源情報を参照して、並列処理部分をマルチグロセ
、すで並列処理実行する際に各プロセッサが使用する資
源に関して競合が発生する条件を抽出し、競合部分と競
合条件とに関する競合情報を競合部分情報テーブルに登
録する競合部分検出部と、第1の中間テキストを入力し
、各グロセ、すが実行する目的プログラムを生成する際
、競合部分情報テーブル中の情報に従って、第1の中間
プログラムを資源に関する競合が発生しないように第2
の中間グログラムに変形する中間テキスト変形部と、第
2の中間テキスト’を入力し、この第2の中間プログラ
ムから目的プログラムを生成する目的プログラム生成部
とを有することを特低とする目的プログラム生成方式が
得られる。
Referring to this resource information, the parallel processing part is multi-grossed, the conditions that cause contention regarding the resources used by each processor when executing parallel processing are extracted, and the contention information regarding the contention part and the contention condition is stored in the contention part. When inputting the conflict portion detection unit registered in the information table and the first intermediate text, and generating the target program to be executed by each glossary, the first intermediate program is used as a resource according to the information in the conflict portion information table. The second
A target program generation unit characterized in that it has an intermediate text transformation unit that transforms into an intermediate gramogram, and a target program generation unit that inputs a second intermediate text and generates a target program from the second intermediate program. method is obtained.

(実施例) 次に本発明について実施例によって説明をする。(Example) Next, the present invention will be explained using examples.

第1図を参照して2本発明によるコン/4’イラ2は、
構文解析部21.並列処理部分抽出部22゜競合部分検
出部23.中間テキスト変形部24゜及び目的プログラ
ム生成部25を備えている。
Referring to FIG. 1, the controller 2 according to the present invention includes:
Syntax analysis unit 21. Parallel processing part extraction section 22. Competitive part detection section 23. It includes an intermediate text transformation unit 24° and a target program generation unit 25.

構文解析部21は、高級グログラミング言語で(例えば
、フォートラン言語)記述された原始プログラム1を入
力して構文解析を行い、中間テキスト3を生成する。
The syntax analysis unit 21 inputs a source program 1 written in a high-level programming language (for example, Fortran language), performs syntax analysis, and generates intermediate text 3.

並列処理部分情報抽出部22は、中間テキスト3を入力
し、原始プログラム中の並列処理実行が可能な処理部分
を検出し、該処理部分中で使用する資源に関する情報を
並列処理部分情報テーブル4に登録する。
The parallel processing part information extraction unit 22 inputs the intermediate text 3, detects a processing part in the source program that can be executed in parallel, and stores information regarding resources used in the processing part in the parallel processing part information table 4. register.

競合部分検出部23は、並列処理部分情報チーゾル4か
ら並列処理部分中で使用する資源に関する情報を入力し
、該並列処理部分をマルチプロセッサで並列処理実行す
る場合に各プロセッサが使用する資源に関して競合が発
生する条件を抽出し。
The conflicting part detection unit 23 inputs information regarding resources used in the parallel processing part from the parallel processing part information teaser 4, and detects conflicts regarding the resources used by each processor when the parallel processing part is executed in parallel by a multiprocessor. Extract the conditions that occur.

該競合部分と該競合条件に関する情報を競合部分情報テ
ーブル5に登録する。
Information regarding the conflicting part and the conflicting condition is registered in the conflicting part information table 5.

中間テキスト変形部24は、中間テキスト3中の並列処
理部分に対する中間テキストヲ入力し。
The intermediate text transformation unit 24 inputs the intermediate text for the parallel processing portion in the intermediate text 3.

各プロセッサが実行する別々の目的グログラムを生成す
るとき、競合部分検出部23で作成された競合部分情報
テーブル5中の情報に従って、各ノロセ、すが実行する
中間テキストを使用する資源に関して競合が発生しない
ように変形し、中間テキスト6を生成する。
When generating separate target programs to be executed by each processor, a conflict occurs regarding the resources using the intermediate text to be executed by each processor, according to the information in the conflict part information table 5 created by the conflict part detection unit 23. The intermediate text 6 is generated by transforming it so that it does not occur.

目的faミグラム成部25は、中間テキスト変形部24
で生成した中間テキスト6を入力して。
The purpose fa migram formation section 25 is the intermediate text transformation section 24.
Enter the intermediate text 6 generated in .

目的プログラム7を生成する。A target program 7 is generated.

第2図に7オートラ7 (FORTRAN )原始プロ
グラムの一例を示す。
FIG. 2 shows an example of a 7AUTRA7 (FORTRAN) source program.

第2図に示すFORTRANを従来のコンミ4イラによ
り翻訳すると、原始プログラム100中の並列処理部分
130に対して、各プロセッサが実行する目的プログラ
ムを生成する際、前述のように従来のコンパイラでは、
並列処理実行時にプロセッサ間で資源の競合が発生する
か否かを考慮しないため、各プロセッサが実行する目的
プログラムは。
When FORTRAN shown in FIG. 2 is translated by a conventional compiler, when generating a target program to be executed by each processor for the parallel processing part 130 in the source program 100, the conventional compiler will:
Since it is not considered whether or not resource contention occurs between processors when executing parallel processing, the target program executed by each processor is

すべて最初に変数COM 1にアクセスするように生成
される。
All are created to access the variable COM 1 first.

従って、マルチプロセッサによる並列処理実行時、同期
をとるだめの外部サブルーチン呼び出し120の実行直
後、並列処理部分130において。
Therefore, when executing parallel processing by a multiprocessor, the parallel processing part 130 immediately after executing the external subroutine call 120 for synchronization.

プロセッサ間で変数COM 1に対するアクセスの競合
が発生し、目的プログラムを高速に実行することができ
ない。
Contention for access to variable COM 1 occurs between processors, making it impossible to execute the target program at high speed.

第3図にM2図に示すFORTRAN原始プログラムを
2台のプロセッサで並列処理実行する際9本発明が適用
されたコンパイラを用いて第2図のFORTRAN原始
プログラム中の並列処理部分130に対応する目的ゾロ
グンムの生成について示す。
When the FORTRAN source program shown in diagram M2 in FIG. The generation of Zologunmu is shown.

第2図に示すFORTRAN原始プログラム中の並列処
理部分130に対する目的プログラムを本発明を適用し
たコンt4イラで翻訳すると、並列処理実行時、実行す
るグロセ、すの番号により分岐する目的グログンム21
0と、変数COM 1へのアクセスとを最初に実行する
0番のデロセ、すが実行する並列処理部分130に対す
る目的プログラム220と、変数COM 1へのアクセ
スを最後に実行する1番のfaセ、すが実行する並列処
理部分130に対する目的プログラム230とが生成さ
れる。
When the object program for the parallel processing part 130 in the FORTRAN source program shown in FIG.
0 and the access to the variable COM 1 are executed first, the object program 220 for the parallel processing part 130 is executed, and the fa section No. 1 executes the access to the variable COM 1 last. , and an object program 230 for the parallel processing portion 130 to be executed by the program.

従って、マルチプロセ、すによる並列処理実行時、同期
をとる為の外部サブルーチン呼び出し120の実行直後
、並列処理部分130において。
Therefore, when executing parallel processing by multiple processes, the parallel processing part 130 immediately after executing the external subroutine call 120 for synchronization.

ゾロセ、す間で変数COM 1に対するアクセスの競合
が発生しないため、目的プログラムを高速に実行するこ
とができる。
Since there is no competition for access to the variable COM 1 between the two programs, the target program can be executed at high speed.

(発明の効果) 以上説明したように本発明では、コンミ9イラにおいて
原始プログラムを入力し、並列処理を行う目的グロダラ
ムを生成する場合、原始プログラム中の並列処理実行が
可能な処理部分に対して、各グロセ、すが別々に実行す
るための目的プログラムを生成する際に、ゾロセ、す間
で資源に関する競合が発生するか否かを考慮し、競合が
発生しないような目的プログラムを生成しているので、
マルチプロセッサによる並列処理実行時、特に並列処理
開始直後や同期した直後の並列処理再開時などに、プロ
セッサ間で資源に関する競合が発生する可能性のある場
合でも、目的!ログラムを高速に実行できるという効果
がある。
(Effects of the Invention) As explained above, in the present invention, when inputting a source program in a computer and generating a target program for parallel processing, the processing part in the source program that can be executed in parallel is When generating a target program for each group to be executed separately, consider whether or not there will be resource contention between the groups, and generate a target program that will not cause any conflict. Because there are
When executing parallel processing using multiple processors, especially when resource contention may occur between processors, such as immediately after starting parallel processing or restarting parallel processing immediately after synchronization, the purpose! This has the effect of allowing programs to be executed at high speed.

【図面の簡単な説明】[Brief explanation of drawings]

第1図は本発明の一実施例を示す機能プロ、り図、第2
図はFORTRAN原始プログラムの一例を示す図、第
3図は第2図のFORTRAN原始プログラ原始プログ
ラ口金2台で並列処理実行する際2本発明が適用された
コンパイラによシ生成される目的プログラムを示す図で
ある。 1・・・原始プログラム、2・・・コアt’?イラ、2
1・・・構文解析部、22・・・並列処理部分情報抽出
部。 23・・・競合部分検出部、24・・・中間テキスト変
形部、25・・・目的グロダラム生成部、3・・・中間
テキスト、4・・・並列処理部分情報テーブル、5・・
・競合部分情報テーブル、6・・・中間テキスト、7・
・・目的プログラム 第 1 囚 第2図 第3 図
Fig. 1 is a functional diagram showing an embodiment of the present invention;
The figure shows an example of a FORTRAN source program, and FIG. 3 shows an example of the FORTRAN source program shown in FIG. FIG. 1... Original program, 2... Core t'? Ira, 2
1... Syntax analysis section, 22... Parallel processing partial information extraction section. 23... Conflict portion detection unit, 24... Intermediate text transformation unit, 25... Target glodarum generation unit, 3... Intermediate text, 4... Parallel processing partial information table, 5...
・Competitive partial information table, 6... intermediate text, 7.
...Purpose Program 1 Prisoner Figure 2 Figure 3

Claims (1)

【特許請求の範囲】[Claims] 1、マルチプロセッサシステムに対して、原始プログラ
ムを入力して、並列処理を行う目的プログラムを生成す
るコンパイラにおいて、原始プログラムを入力し、構文
解析を行って第1の中間テキストを生成する構文解析部
と、前記第1の中間テキストを参照して前記原始プログ
ラム中の並列処理実行が可能な並列処理部分を検出し、
該並列処理部分中で使用する資源に関する資源情報を並
列処理部分情報テーブルに登録する並列処理部分情報抽
出部と、前記並列処理部分情報テーブルから前記資源情
報を入力し、該資源情報を参照して、該並列処理部分を
マルチプロセッサで並列処理実行する際に各プロセッサ
が使用する資源に関して競合が発生する条件を抽出し、
該競合部分と該競合条件とに関する競合情報を競合部分
情報テーブルに登録する競合部分検出部と、前記第1の
中間テキストを入力し、各プロセッサが実行する目的プ
ログラムを生成する際、前記競合部分情報テーブル中の
前記競合情報に基づいて前記第1の中間プログラムを資
源競合が発生しないように第2の中間プログラムに変形
する中間テキスト変形部と、前記第2の中間テキストか
ら目的プログラムを生成する目的プログラム生成部とを
備えることを特徴とする目的プログラム生成方式。
1. In a compiler that inputs a source program to a multiprocessor system and generates a target program that performs parallel processing, a syntactic analysis unit that inputs the source program and performs syntax analysis to generate the first intermediate text. and detecting a parallel processing part in the source program that can be executed in parallel by referring to the first intermediate text,
a parallel processing part information extraction unit that registers resource information regarding resources used in the parallel processing part in a parallel processing part information table; and a parallel processing part information extraction unit that inputs the resource information from the parallel processing part information table and refers to the resource information. , extracting the conditions under which contention occurs regarding the resources used by each processor when executing the parallel processing part in parallel on a multiprocessor;
a conflicting part detection unit that registers conflicting information regarding the conflicting part and the conflicting condition in a conflicting part information table; an intermediate text transformation unit that transforms the first intermediate program into a second intermediate program based on the conflict information in the information table so that resource conflicts do not occur; and generates a target program from the second intermediate text. 1. A target program generation method, comprising: a target program generation section.
JP26107389A 1989-10-05 1989-10-05 Object program forming system Pending JPH03122722A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26107389A JPH03122722A (en) 1989-10-05 1989-10-05 Object program forming system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26107389A JPH03122722A (en) 1989-10-05 1989-10-05 Object program forming system

Publications (1)

Publication Number Publication Date
JPH03122722A true JPH03122722A (en) 1991-05-24

Family

ID=17356704

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26107389A Pending JPH03122722A (en) 1989-10-05 1989-10-05 Object program forming system

Country Status (1)

Country Link
JP (1) JPH03122722A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009037626A (en) * 2008-09-04 2009-02-19 Panasonic Corp Compiler
CN110785749A (en) * 2018-06-25 2020-02-11 北京嘀嘀无限科技发展有限公司 System and method for generating wide tables

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009037626A (en) * 2008-09-04 2009-02-19 Panasonic Corp Compiler
CN110785749A (en) * 2018-06-25 2020-02-11 北京嘀嘀无限科技发展有限公司 System and method for generating wide tables
CN110785749B (en) * 2018-06-25 2020-08-21 北京嘀嘀无限科技发展有限公司 System and method for generating wide tables
US11061882B2 (en) 2018-06-25 2021-07-13 Beijing Didi Infinity Technology And Development Co., Ltd. Systems and methods for generating a wide table

Similar Documents

Publication Publication Date Title
US20090049434A1 (en) Program translating apparatus and compiler program
JPH03122722A (en) Object program forming system
JPH03126133A (en) Compiler processing method
JPH03257534A (en) Memory allocating system
Luan et al. Approach to diagnosing a system with structure information.
JPH01295336A (en) Optimization system for critical section
JP2815178B2 (en) Compiler unit
JPH05313911A (en) Optimization system
JP3726992B2 (en) Batch function call method
JPH03144830A (en) Parallel processing system
JPS63116247A (en) Program debugging system
JPH01213721A (en) Compiler system
JPH04364537A (en) Method, device, and compiler for optimizing program for parallel process
JPH05127919A (en) Device and method for speeding up translation
JPH04101228A (en) Language processor
JPH04299426A (en) Function argument/parameter transfer system
JP2003337707A (en) Method for increasing speed of compiler and loop for processing list structure data
JPH04286030A (en) Optimizing system
JPH0399330A (en) Procedure in-line development system
JPH03204735A (en) Competitive operation testing system
JPH02205930A (en) Interface check processing method
JPH04155576A (en) Compile processing system
JPH05127945A (en) Program execution situation analysis system
JPH0397037A (en) Parallel processing execution control system for interpreter
JPS62206668A (en) Parallel formation processing system for object program