JPH0240721A - Parallel compiling system - Google Patents
Parallel compiling systemInfo
- Publication number
- JPH0240721A JPH0240721A JP19121488A JP19121488A JPH0240721A JP H0240721 A JPH0240721 A JP H0240721A JP 19121488 A JP19121488 A JP 19121488A JP 19121488 A JP19121488 A JP 19121488A JP H0240721 A JPH0240721 A JP H0240721A
- Authority
- JP
- Japan
- Prior art keywords
- program
- processor
- programs
- task
- source
- 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
Links
- 238000000034 method Methods 0.000 claims description 13
- 238000013519 translation Methods 0.000 claims description 6
- 238000012545 processing Methods 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 6
- 238000012805 post-processing Methods 0.000 description 4
- 238000007796 conventional method Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 239000012528 membrane Substances 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Landscapes
- Devices For Executing Special Programs (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明はコンパイラの処理方式、特に複数のプログラム
を一括して翻訳する機能を有するコンi(イラの処理時
間を短縮する方式に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a compiler processing method, and particularly to a method for shortening the processing time of a compiler having a function of collectively translating a plurality of programs.
この種のコンパイラを用いて複数のプログラムを一括し
て翻訳する場合がある。このような複数プログラムの一
括翻訳においては、従来のコンパイル方式では、コンパ
イラに与えられたパラメータや制御文の指定にもとづい
て、「対象プログラムの選択、解析、目的プログラムの
生成」という処理はプログラム毎に順番に繰り返すこと
lこよって実現していた。This type of compiler is sometimes used to compile multiple programs at once. In such batch translation of multiple programs, in the conventional compilation method, the processing of "target program selection, analysis, and target program generation" is performed for each program based on the parameters and control statement specifications given to the compiler. This was achieved by repeating the steps in order.
上述した従来の方式では、1つのプログラムの翻訳が終
了してから次のプログラムの翻訳を始めることになるの
で、次のような欠点がある。In the conventional method described above, the translation of the next program is started after the translation of one program is completed, so there are the following drawbacks.
■ 複数個のプロセッサを利用できるシステムであれば
本来別々のプログラムの翻訳は同時に並列に行えるはず
にもかかわらず、従来のコンパイル方式では、複数プロ
グラムの一括翻訳は1個のプロセッサだけで順番に行う
ことになりプロセッサの有効利用が図れない。■ Even though a system that can use multiple processors should be able to translate separate programs at the same time in parallel, with conventional compilation methods, multiple programs are translated all at once using only one processor. As a result, the processor cannot be used effectively.
■ 同じく、全プログラムの翻訳に要する時間は、プロ
セッサの数々を増やしても短縮できない。■ Similarly, the time required to translate an entire program cannot be reduced by increasing the number of processors.
本発明の並列コンパイル方式は、複数個のプロセッサと
、それらのプロセッサ上で並列に実行されるタスク間の
同期機能とを有するシステムに対して、ソースプログラ
ムを解析し、目的プログラムを生成するコンパイル方式
であって、複数個のプログラムを一括して翻訳する際に
、各プログラムの翻訳をそれぞれ並列実行可能な別々の
タスクに割り当てる手段を備えてなる。The parallel compilation method of the present invention is a compilation method that analyzes a source program and generates a target program for a system having a plurality of processors and a synchronization function between tasks executed in parallel on those processors. The present invention includes means for allocating the translation of each program to separate tasks that can be executed in parallel when a plurality of programs are translated at once.
次に、本発明の実施例について図面を参照して説明する
。Next, embodiments of the present invention will be described with reference to the drawings.
ya1図は本発明の一実施例に使用するコンパイラの機
能ブロック図である。コンパイラ1は、ソースプログラ
ム選択部11.タスク割当て制御部12、後処理部13
.ソースプログラム解析目的プログラム生成タスク1
” nで構成されるタスク群14から成る。Figure ya1 is a functional block diagram of a compiler used in an embodiment of the present invention. The compiler 1 includes a source program selection section 11. Task allocation control unit 12, post-processing unit 13
.. Source program analysis purpose program generation task 1
” It consists of a task group 14 consisting of n.
ソースプログラム選択部11は、コンパイルすべきソー
スプログラム21が存在するファイル名やファイルアド
レスをタスク割当て制御部12に渡す。タスク割当て制
御部12は、ソースプログラム解析目的プログラム生成
タスク15を生成しそれにソースプログラム選択部11
から渡された情報や、目的プログラム31の生成位置1
作業用領域の位置等のコンパイルに必要な情報を渡す。The source program selection unit 11 passes the file name and file address in which the source program 21 to be compiled exists to the task assignment control unit 12. The task allocation control unit 12 generates a source program analysis purpose program generation task 15 and assigns it to the source program selection unit 11.
information passed from , and the generation position 1 of the target program 31
Pass information necessary for compilation, such as the location of the work area.
ソースプログラム解析目的プログラム生成タスク15は
、主タスクすなわち、タスク割当て制御部12が動いて
いるプロセッサ以外のプロセッサがシステムで利用可能
であれば、そのプロセッサ上で動き出し、ソースプログ
ラム21のコンパイルを始める。タスク割当て制御部1
2はその後制御をソースプログラム選択部11に戻す。If a processor other than the main task, ie, the processor on which the task allocation control unit 12 is running, is available in the system, the source program analysis purpose program generation task 15 starts running on that processor and starts compiling the source program 21. Task allocation control unit 1
2 then returns control to the source program selection section 11.
ソースプログラム選択部11は、次lこソースプログラ
ム22を選択し、それが存在するファイル名やファイル
アドレスをタスク割当て制御部12に渡す。タスク割当
て制御部12はソースプログラム解析目的プログラム生
成タスク16を生成し、ソースプログラム21の場合と
同様に、ソースプログラム22のコンパイルをさらに別
のプロセッサ上で開始させる。The source program selection unit 11 selects the next source program 22 and passes the file name and file address where it exists to the task assignment control unit 12. The task allocation control unit 12 generates a source program analysis target program generation task 16, and as in the case of the source program 21, starts compiling the source program 22 on yet another processor.
コンパイルすべきソースプログラムがつきるまで前記の
ような処理を繰り返した後に、タスク割当て制御部12
は、生成したタスクの終了すなわちコンパイルの終了を
待ちあわせ、全てのタスクが終了した場合に後処理部1
3へ制御を渡す。After repeating the above process until a source program to be compiled is found, the task allocation control unit 12
waits for the completion of the generated tasks, that is, the completion of compilation, and when all tasks are completed, the post-processing unit 1
Transfer control to 3.
後処理部13では、必要に応じて各コンパイル結果のま
とめ処理(例えば、各コンパイルで出力されたリストや
、目的プログラム3のまとめ処理)を行う。The post-processing unit 13 performs a process of summarizing each compilation result (for example, a process of summarizing the list outputted from each compilation or the target program 3) as necessary.
第2図はプロセッサA、プロセッサB、プロセッサC,
プロセッサD、プロセッサEを備えたシステムにおいて
従来の方式のコンパイラを用いてプログラム1.プログ
ラム2.プログラム3.プログラム4を一括してコンパ
イルしたときの態様を示す図である。従来の方式では、
同時には1個のプロセッサしか利用できないので、プロ
グラム1、プログラム2.プログラム3.プログラム4
のコンパイル時間をそれぞれjl*j意、!S*j4
とすると全体のコンパイル時間t= tl+tz+1
3+14となる。Figure 2 shows processor A, processor B, processor C,
In a system equipped with a processor D and a processor E, program 1. Program 2. Program 3. FIG. 4 is a diagram showing an aspect when programs 4 are compiled all at once. In the conventional method,
Only one processor can be used at the same time, so Program 1, Program 2. Program 3. Program 4
The compilation time of jl*j, respectively, is ! S*j4
Then, the total compilation time t = tl + tz + 1
It becomes 3+14.
第3図は第2図と同じプロセッサ構成を持つシステムに
おいて同じプログラムを本発明を用いた方式のコンパイ
ラにより一括してコンパイルしたときの態様を示す図で
ある。本発明を用いた方式のコンパイラでは、プログラ
ム1.プログラム2゜プログラム3.プログラム4がそ
れぞれプロセッサB、プロセッサC,プロセッサD、プ
ロセッサE上で並列にコンパイルされるから、タスク生
成のためのオーバーヘッドαおよび後処理のためのオー
バーヘッドβを考慮して、全体のコンパイル時+[t
= 3α+ts+β となる。したがって、プログラム
3のコンパイル時間t3が十分に長いと仮定すれば全体
のコンパイル時間はほはプログラム3のコンパイル時間
に等しくなる。FIG. 3 is a diagram showing a state in which the same program is compiled all at once by a compiler using the present invention in a system having the same processor configuration as that in FIG. 2. In the compiler using the method of the present invention, program 1. Program 2゜Program 3. Since program 4 is compiled in parallel on processor B, processor C, processor D, and processor E, the overall compilation time + [ t
= 3α+ts+β. Therefore, assuming that the compile time t3 of program 3 is sufficiently long, the entire compile time will be approximately equal to the compile time of program 3.
−膜内に、プロセッサの数がコンパイルすべきプログラ
ム数より多い場合には、最も長いコンパイル時間が全体
のコンパイル時間にほぼ等しくなるといえる。- If the number of processors in the membrane is greater than the number of programs to be compiled, it can be said that the longest compilation time is approximately equal to the total compilation time.
以上に説明したように本発明の並列コンパイル方式によ
れば、複数のプログラムを一括してコンパイルするとき
に、各プログラムの翻訳を別々のプロセッサに分配して
行わせることにより、プロセッサを有効に利用でき、全
プログラムの翻訳に要する時間を短縮できる。本発明に
はこのような効果がある。As explained above, according to the parallel compilation method of the present invention, when multiple programs are compiled at once, the translation of each program is distributed to separate processors, thereby making effective use of the processors. This reduces the time required to translate the entire program. The present invention has such effects.
・・・後処理部、14・・・・・・タスク群、15〜1
6・・・・・・ソースプログラム解析・目的プログラム
生成タスク1〜n121〜23・・・・・・ソースプロ
グラム1〜n131〜33・・・・・・目的プログラム
1〜n0代理人 弁理士 本 庄 伸 介...Post-processing unit, 14...Task group, 15-1
6...Source program analysis/purpose program generation tasks 1-n121-23...Source programs 1-n131-33...Objective programs 1-n0 Agent Patent attorney Honjo Shinsuke
第1図は本発明の一実施例に使用するコンパイラの機能
ブロック図、第2図は従来の方式で複数個のプログラム
を複数個のプロセッサを備えたシステム上でコンパイル
したときの態様を示す図、第3図は本発明の方式で複数
個のプログラムを複数個のプロセッサを備えたシステム
上でコンパイルしたときの態様を示す図である。FIG. 1 is a functional block diagram of a compiler used in an embodiment of the present invention, and FIG. 2 is a diagram showing how multiple programs are compiled using a conventional method on a system equipped with multiple processors. , FIG. 3 is a diagram showing an aspect when a plurality of programs are compiled on a system equipped with a plurality of processors according to the method of the present invention.
Claims (1)
実行されるタスク間の同期機能とを有するシステムに対
して、ソースプログラムを解析し、目的プログラムを生
成するコンパイル方式において、複数個のプログラムを
一括して翻訳する際に、各プログラムの翻訳をそれぞれ
並列実行可能な別別のタスクに割り当てる手段を備えた
ことを特徴とする並列コンパイル方式。For systems that have multiple processors and a synchronization function between tasks that are executed in parallel on those processors, multiple programs can be compiled at once using a compilation method that analyzes source programs and generates target programs. A parallel compilation method characterized by having means for assigning the translation of each program to separate tasks that can be executed in parallel.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP19121488A JPH0240721A (en) | 1988-07-29 | 1988-07-29 | Parallel compiling system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP19121488A JPH0240721A (en) | 1988-07-29 | 1988-07-29 | Parallel compiling system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH0240721A true JPH0240721A (en) | 1990-02-09 |
Family
ID=16270807
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP19121488A Pending JPH0240721A (en) | 1988-07-29 | 1988-07-29 | Parallel compiling system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0240721A (en) |
-
1988
- 1988-07-29 JP JP19121488A patent/JPH0240721A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH1097430A (en) | Method and system for inserting assembly code routines into source code routines for optimization | |
| US6175935B1 (en) | Software debugging method and recording medium to which debugging program has been recorded | |
| JPH0240721A (en) | Parallel compiling system | |
| JPH01118931A (en) | Program conversion method | |
| JPH09293057A (en) | Task allocation method in hierarchical structure type multiprocessor system | |
| JP2910676B2 (en) | Load equalizer | |
| JP2576659B2 (en) | Task common area allocation method | |
| JP2560491B2 (en) | Parallelized procedure execution method | |
| JP2000155673A (en) | Link device and link method | |
| JPH02163831A (en) | Object program reduction method | |
| JPH04104330A (en) | Procedure calling system at parallel processing time | |
| JPH03135630A (en) | Instruction scheduling system | |
| JPS6365531A (en) | Program processor | |
| JP3072772B2 (en) | Compiling device | |
| JPS62182930A (en) | Function dividion type parallel compiling system | |
| JPH05127945A (en) | Program execution situation analysis system | |
| JPH04107638A (en) | Literal constant allocation system | |
| JP2001184320A (en) | Distributed execution device and recording medium | |
| KR100293932B1 (en) | A technology for post image processig of compiled s/w code | |
| JPH05233307A (en) | Multiple process generation method | |
| JPH0343835A (en) | Paralleled process system | |
| JPS63163636A (en) | Executing system for parallel processing | |
| JPH0991151A (en) | Compiling device and processor device | |
| JPH10312291A (en) | Compiler unit | |
| JPH047748A (en) | Automatic array element assignment processing system based on reference order |