JPH02161531A - Common block integrating system - Google Patents

Common block integrating system

Info

Publication number
JPH02161531A
JPH02161531A JP31570588A JP31570588A JPH02161531A JP H02161531 A JPH02161531 A JP H02161531A JP 31570588 A JP31570588 A JP 31570588A JP 31570588 A JP31570588 A JP 31570588A JP H02161531 A JPH02161531 A JP H02161531A
Authority
JP
Japan
Prior art keywords
program
text
common block
common
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
JP31570588A
Other languages
Japanese (ja)
Inventor
Ryoji Nemoto
根元 亮治
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 JP31570588A priority Critical patent/JPH02161531A/en
Publication of JPH02161531A publication Critical patent/JPH02161531A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To improve the efficiency of a formed objective program at the time of its execution by deforming a text so that plural common blocks are integrated into a continuous area in the objective program. CONSTITUTION:When a compiler 2 is started, a program unit input means 21 inputs a source program 1 and transfers the program 1 to a text forming means 22. The means 22 analyzes the syntax of the program 1 transferred from the means 21 and forms a text group. A common block recognizing means 23 inputs the text group, recognizes the text of a common block, extracts information necessary for the integration, and outputs the extracted information to a common block information holding means 24. A common block integrating means 25 deforms the text based upon the information held in the means 24 so that the text is integrated into the common block to be a continuous area. An objective program forming means 26 forms an objective program whose common block is integrated based upon the deformed text and outputs the program to plural compile units 3.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は共通ブロック統合化方式に関し、特に高級言語
のコンパイラにより生成される目的プロダラムの実行時
における効率の改善を行うために複数のプログラム単位
間で参照される複数の共通の記憶域を一つの連続した領
域に統合化する共通ブロック統合化方式に関する。
DETAILED DESCRIPTION OF THE INVENTION (Industrial Application Field) The present invention relates to a common block integration method, and in particular, to a method for integrating multiple program units in order to improve efficiency during execution of a target program generated by a high-level language compiler. The present invention relates to a common block integration method that integrates a plurality of common storage areas referenced between them into one continuous area.

(従来の技術) 記憶域のアドレスを記憶域を参照するためのベースアド
レスとベースアドレスからの変位との組合わせにより表
現しベースアドレスを有限個のベースレジスタの内の一
つに予めロードしてベースレジスタの番号とベースアド
レスからの変位とを指定することにより記憶域の参照を
行う計算機システムにおいては、コンパイラは、複数の
共通ブロックを宣言する複数のプログラム単位を目的プ
ログラムに翻訳する場合に、翻訳対象の複数のプログラ
ム単位中で宣言されている複数の共通ブロックのそれぞ
れに対して別々のベースアドレスを割り当てて複数の共
通ブロックが参照されるように目的プログラムを生成し
ている。
(Prior art) The address of a storage area is expressed by a combination of a base address for referencing the storage area and a displacement from the base address, and the base address is preloaded into one of a finite number of base registers. In computer systems that refer to storage areas by specifying base register numbers and displacements from the base address, when translating multiple program units that declare multiple common blocks into a target program, a compiler must: A target program is generated such that a separate base address is assigned to each of a plurality of common blocks declared in a plurality of program units to be translated, and the plurality of common blocks are referenced.

例えば、第2図に示すように、高級言語であるFORT
RAN言語で記述された複数の名前付き共通ブロックU
l、U2.U3を宣言している複数のグロダラムlit
位PR0,1,PR0,2およびPRo、3を翻訳して
得られる目的グロダラムにおいては、例えば第4図に示
すように、共通ブロックUl、U2およびU3は記憶域
上である距離G1およびG2だけ隔たった3つの領域に
分離されて構成されるようになっている。ここで、共通
ブロックUl、U2およびU3の先頭のベースアドレス
を、例えばベースアドレスA1.A2およびA3とする
と、コンパイラは共通ブロックU1およびU2間の距離
G1および共通ブロックU2およびU3間の距離G2を
認識できないので、共通ブロックU2およびU3をベー
スアドレスA1からの変位のみでは参照することは出来
ない。
For example, as shown in Figure 2, the high-level language FORT
Multiple named common blocks U written in RAN language
l, U2. Multiple Grodarum lits declaring U3
In the target glodarum obtained by translating positions PR0, 1, PR0, 2, and PRo, 3, for example, as shown in FIG. It is divided into three separate areas. Here, the starting base addresses of common blocks Ul, U2, and U3 are set to, for example, base address A1. A2 and A3, the compiler cannot recognize the distance G1 between the common blocks U1 and U2 and the distance G2 between the common blocks U2 and U3, so it is not possible to refer to the common blocks U2 and U3 only by displacement from the base address A1. Can not.

このため、目的プログラムでは、共通ブロックU1.U
2およびU3のそれぞれを参照するために共通ブロック
IJI、U2およびU3の先頭にベースアドレスAI、
A2およびA3をそれぞれ割り当てて、それらのベース
アドレスを、例えばベースレジスタ81.B2およびB
3にそれぞれロードする命令を実行した後に、ベースレ
ジスタBl、B2およびB3にベースアドレスAI。
Therefore, in the target program, common block U1. U
Common block IJI, base address AI at the beginning of U2 and U3 to refer to each of U2 and U3,
A2 and A3 are respectively assigned and their base addresses are, for example, in base registers 81 . B2 and B
After executing the instructions to respectively load the base address AI into the base registers Bl, B2 and B3.

A2およびA3からの変位をそれぞれ加えることによっ
て共通ブロックtJ1.tJ2およびU3の参照を行う
必要があった。
Common block tJ1. by adding displacements from A2 and A3 respectively. References to tJ2 and U3 needed to be made.

また、共通ブロックUl、U2およびU3毎に参照のた
めのベースレジスタBl、B2およびB3が必要になる
ので、特に使用することが可能なベースレジスタの個数
が少ない計算機システムにおいては、ベースレジスタを
共通ブロックの参照と池の記憶域の参照との間で兼用し
て使用する必要が生じる場合が多くなり、このような場
合には必要に応じて他の記憶域の参照のための使用前に
共通ブロックを参照を行うためのベースレジスタの内容
を一旦待避させ、使用後に待避させた内容をベースレジ
スタに再び復元させる命令列を目的プログラムに実行さ
せる必要があった。
In addition, base registers Bl, B2, and B3 for reference are required for each common block Ul, U2, and U3, so in a computer system where the number of base registers that can be used is small, the base registers are commonly used. There are many cases where it is necessary to use the block reference and the pond storage reference simultaneously, and in such cases, if necessary, the common It was necessary to temporarily save the contents of a base register for referencing a block, and then cause the target program to execute a sequence of instructions to restore the saved contents to the base register after use.

(発明が解決しようとする課題) 上述した従来の高級言語プログラムの翻訳処理方式では
、目的プログラムにおいて複数プログラム単位で宣言さ
れている複数の共通ブロック毎にそれらの共通ブロック
を参照するために使用されるベースレジスタが必要であ
ったので、複数の共通ブロックを宣言する複数のプログ
ラム単位を翻訳して得られた目的プログラムには実行時
に共通ブロックを参照するために使用されるすべてのベ
ースレジスタの内容を定義する命令列が必要になるとい
う欠点がある。
(Problems to be Solved by the Invention) In the conventional high-level language program translation processing method described above, a method is used to refer to each of a plurality of common blocks declared in units of multiple programs in the target program. The target program obtained by translating multiple program units that declare multiple common blocks contains the contents of all base registers used to refer to the common blocks at runtime. The disadvantage is that it requires a sequence of instructions to define the .

また使用することが可能なベースレジスタの個数が少な
い計算機システムにおいては、ベースレジスタを共通ブ
ロックの参照と他の記憶域の参照との間で兼用して使用
することになるので、必要に応じてそのベースレジスタ
の内容の待避および復元を行う命令列が更に必要になり
、目的プログラムの実行時の効率を少なからず悪いもの
にしてしまうという欠点がある。
In addition, in computer systems where the number of base registers that can be used is small, the base register is used for both common block reference and other storage area reference. A further instruction sequence for saving and restoring the contents of the base register is required, which has the disadvantage that the execution efficiency of the target program is considerably degraded.

本発明の目的は、上述の点に雪み、コンパイラにおいて
複数のプログラム単位中で宣言されている複数の共通ブ
ロックの宣言を認識し、それら複数の共通ブロックが目
的プログラムにおいて一つの連続した領域に統合される
ようにテキストを変形することにより、生成された目的
プログラムの実行時の効率を高いものにすることを目的
とした共通ブロック統合化方式を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to solve the above-mentioned problems and to recognize declarations of a plurality of common blocks declared in a plurality of program units in a compiler, so that the plurality of common blocks are allocated to one continuous area in the target program. An object of the present invention is to provide a common block integration method that aims to increase the execution efficiency of a generated target program by transforming texts so that they are integrated.

(課題を解決するための手段) 本発明の共通ブロック統合化方式では、記憶域のアドレ
スをその記憶域を参照するためのベースアドレスとベー
スアドレスからの変位との組合せにより表現しベースア
ドレスを有限個のベースレジスタのうちの一つにあらか
じめロードしてベースレジスタの番号とベースアドレス
からの変位とを指定することにより記憶域の参照を行う
計算機システムにおける高級言語プログラムの翻訳を行
うコンパイラにおいて、 複数の共通ブロックを宣言する複数のプログラム単位を
入力するプログラム単位入力手段と、このプログラム単
位入力手段によって入力された複数のプログラム単位を
構文解析してテキスト群を生成するテキスト生成手段と
、 前記テキスト群から複数のプログラム単位で宣言された
複数の共通ブロックのテキス1〜を認識し、統合化に必
要な情報を抽出する共通ブロック認識手段と、 前記共通ブロック認識手段によって得られた複数の共通
ブロックの情報を保持する共通ブロック情報保持手段と
、 前記共通ブロック情報保持手段によって保持された情報
を基にして複数の共通ブロックを一つの連続した領域に
統合化し、共通ブロックのテキストを変形する共通ブロ
ック統合化手段と、前記テキストにより、共通ブロック
が統合化された目的プログラムを生成する目的プログラ
ム生成手段とを有する (作用) 本発明の共通ブロック統合化方式では、プログラム単位
入力手段が複数の共通ブロックを宣言する複数のプログ
ラム単位を入力し、テキスト生成手段がプログラム単位
入力手段によって入力された複数のプログラム単位を構
文解析してテキスト群を生成し、共通ブロック認識手段
が前記テキスト群から複数のプログラム単位で宣言され
た複数の共通ブロックのテキストを認識して、統合化に
必要な情報を抽出し、共通ブロック情報保持手段が前記
認識手段によって得られた複数の共通ブロックの情報を
保持し、共通ブロック統合化手段が前記共通ブロック情
報保持手段によって保持された情報を基にして複数の共
通ブロックを一つの連続した領域に統合化し、共通ブロ
ックのテキストを変形し、目的プログラム生成手段が前
記テキストにより、共通ブロックが統合化された目的プ
ログラムを生成する。
(Means for Solving the Problems) In the common block integration method of the present invention, the address of a storage area is expressed by a combination of a base address for referencing the storage area and a displacement from the base address, and the base address is expressed as a finite number. In a compiler that translates a high-level language program in a computer system that references a storage area by preloading it into one of the base registers and specifying the base register number and displacement from the base address, a program unit input means for inputting a plurality of program units that declare a common block of the program unit; a text generation means for generating a text group by parsing the plurality of program units input by the program unit input means; and said text group. A common block recognition means for recognizing the text 1 of a plurality of common blocks declared in a plurality of program units from a plurality of program units and extracting information necessary for integration; common block information holding means that holds information; and common block integration that integrates a plurality of common blocks into one continuous area based on the information held by the common block information holding means and transforms the text of the common block. (Operation) In the common block integration method of the present invention, the program unit input means generates a plurality of common blocks by the text. A plurality of program units to be declared are input, a text generation means generates a text group by parsing the plurality of program units input by the program unit input means, and a common block recognition means generates a plurality of program units from the text group. The common block information holding means holds the information of the plurality of common blocks obtained by the recognition means, and the common block The integrating means integrates a plurality of common blocks into one continuous area based on the information held by the common block information holding means, transforms the text of the common block, and the object program generating means uses the text to: Generate an objective program in which common blocks are integrated.

(実施例) 次に、本発明について図面を参照して詳細に説明する。(Example) Next, the present invention will be explained in detail with reference to the drawings.

第1図は、本発明の一実施例の共通ブロック統合化方式
の構成を示すブロック図である9本実施例の共通ブロッ
ク統合化方式は、複数のプログラム単位からなるソース
プログラム1と、ソースプログラム1を入力して翻訳す
るコンパイラ2と、コンパイラ2から出力される複数の
コンパイルユニット3とから、その主要部が構成されて
いる。
FIG. 1 is a block diagram showing the configuration of a common block integration method according to an embodiment of the present invention.9 The common block integration method according to the present embodiment includes a source program 1 consisting of a plurality of program units, and a source program 1 consisting of a plurality of program units. The main part thereof is composed of a compiler 2 which inputs and translates the data 1 and a plurality of compile units 3 output from the compiler 2.

コンパイラ2は、ソースプログラム1を入力するプログ
ラム単位入力手段21と、このプログラム単位入力手段
21によって入力されたソースプログラム1の複数のプ
ログラム単位を構文解析してテキスト群を生成するテキ
スト生成手段22と、ソースプログラム1の複数のプロ
グラム単位中の共通ブロックの宣言を認識する共通ブロ
ック認識手段23と、共通ブロック認識手段23によっ
て得られた複数の共通ブロックの情報を保持する共通ブ
ロック情報保持手段24と、共通ブロック情報保持手段
24によって保持された情報を基にして複数の共通ブロ
ックが一つの連続した領域に統合化されるように共通ブ
ロックのテキストを変形する共通ブロック統合化手段2
5と、共通ブロック統合化手段25によって変形された
テキストにより、共通ブロックが統合化された目的プロ
グラムを生成する目的プログラム生成手段26とを含ん
で構成されている。
The compiler 2 includes a program unit input means 21 for inputting the source program 1, and a text generation means 22 for generating a text group by parsing a plurality of program units of the source program 1 inputted by the program unit input means 21. , a common block recognition means 23 that recognizes declarations of common blocks in a plurality of program units of the source program 1, and a common block information holding means 24 that holds information on the plurality of common blocks obtained by the common block recognition means 23. , a common block integrating means 2 that transforms the text of a common block so that a plurality of common blocks are integrated into one continuous area based on the information held by the common block information holding means 24;
5, and an object program generation means 26 for generating an object program in which common blocks are integrated based on the text transformed by the common block integration means 25.

次に、このように構成された本実施例のプログラム統合
化方式の動作について第2図〜第8図を参照しながら具
体的に説明する。
Next, the operation of the program integration system of this embodiment configured as described above will be specifically explained with reference to FIGS. 2 to 8.

コンパイラ2が起動されると、まずプログラム単位入力
手段21は、例えば第2図に示すようなFORTRAN
言語で記述され複数の名前付き共通ブロックUl、U2
.およびU3を宣言している複数のプログラム単位PR
0,1,PR0,2およびPRo、3からなるソースプ
ログラム1を取り込み、デキスト生成手段22に渡す。
When the compiler 2 is started, the program unit input means 21 first inputs a FORTRAN program as shown in FIG.
Multiple named common blocks Ul, U2 written in the language
.. and multiple program units PR declaring U3
A source program 1 consisting of 0, 1, PR0, 2 and PRo, 3 is taken in and passed to the dexterity generating means 22.

次に、テキスト生成手段22は、プログラム単位入力手
段21から渡されたソースプログラム1を構文解析し、
テキスト群を生成する。このテキストは、第6図に示す
ように、一つの共通ブロックに対してその共通ブロック
そのものに関する情報を含む部分と、その共通ブロック
に含まれる変数に関する情報を含む部分が連結されたよ
うな形式で構成され、それぞれの共通ブロック、変数の
名前、大きさ、ベースアドレスからの変位等の情報が含
まれている。
Next, the text generation means 22 parses the source program 1 passed from the program unit input means 21,
Generate a text set. As shown in Figure 6, this text is in a format in which a part containing information about the common block itself and a part containing information about variables contained in the common block are concatenated for one common block. It contains information such as each common block, variable name, size, and displacement from the base address.

続いて、共通ブロック認識手段23は、テキスト生成手
段22の生成したテキスト群を入力して共通ブロックの
テキストを認識して統合化に必要な情報を抽出し、共通
ブロック情報保持手段24へ出力する。この情報は、第
7図に示すような形式になっており、それぞれのプログ
ラム単位で宣言されているすべての共通ブロックと、そ
れに含まれているすべての変数に関する情報を含んでい
る。
Next, the common block recognition means 23 inputs the text group generated by the text generation means 22, recognizes the text of the common block, extracts information necessary for integration, and outputs it to the common block information holding means 24. . This information has a format as shown in FIG. 7, and includes information regarding all common blocks declared in each program unit and all variables contained therein.

次に、共通ブロック統合化手段25は、共通ブロック情
報保持手段24に保持された情報を基にして、宣言され
ている共通ブロックU1.U2およびU3が第5図に示
すよな一つの連続した領域である共通ブロックUに統合
化されるようにテキストを変形する。変形されたテキス
トは第8図のように共通ブロックtJ1.U2およびU
3に対応したテキストに含まれていた変数に関する情報
が連結されたような形式に構成されており、それぞれの
変数の情報の内、ベースアドレスからの変位は統合化さ
れた共通ブロックUのベースアドレスA1からの変位に
変更されている。ここで、※印はこの情報に対応する変
数がそのプログラム単位では参照されていないことを示
す。
Next, the common block integrating means 25 uses the information held in the common block information holding means 24 to determine the declared common block U1. The text is transformed so that U2 and U3 are integrated into a common block U, which is one continuous area as shown in FIG. The transformed text is stored in the common block tJ1. as shown in FIG. U2 and U
The information about the variables included in the text corresponding to 3 is structured in a concatenated format, and the displacement from the base address of each variable information is the base address of the integrated common block U. The displacement has been changed from A1. Here, the * mark indicates that the variable corresponding to this information is not referenced in that program unit.

なお、第8図の変形されたテキストは第3図に示すよう
なソースプログラムが入力されたときにテキスト生成手
段22によって生成されるテキストと等価なものになる
Note that the transformed text in FIG. 8 is equivalent to the text generated by the text generation means 22 when the source program shown in FIG. 3 is input.

次に、目的プログラム生成手段26は、上記のように変
形されたテキストに基づいて、第5図に示すように、共
通ブロックUl、U2およびU3の一つの連続した領域
である共通ブロックUの先頭にベースアドレスA1だけ
を割り当て、このベースアドレスA1をベースレジスタ
B1にロードし、第8図の変形されたテキストに示され
ているベースアドレスA1からの変位によって変数の参
照を行うような命令を生成し、複数のコンパイルユニッ
ト3を出力する。
Next, on the basis of the text transformed as described above, the object program generating means 26 generates a starting point of the common block U, which is one continuous area of the common blocks Ul, U2, and U3, as shown in FIG. Generates an instruction that allocates only base address A1 to , loads this base address A1 into base register B1, and references a variable by the displacement from base address A1 shown in the transformed text in Figure 8. and outputs multiple compilation units 3.

このように高級言語プログラムの翻訳処理に本実施例の
共通ブロック統合化方式を適用すれば、例えば第2図に
示すソースプログラム1の複数のプログラム単位PR0
,1,PR0,2およびPRo、3中の共通ブロックU
1.U2およびU3は、目的プログラムにおいて第5図
に示すような一つの連続した領域でなる共通ブロックU
となるように構成される。このため、共通ブロックUl
、LJ2およびU3が連続しているので、共通ブロック
Uの先頭にベースアドレスA1だけを割り当ててベース
レジスタB1にロードした後にベースアドレスA1から
の変位を加えれば、共通ブロックU1ばかりでなく共通
ブロックU2およびU3も参照できるようになる。
If the common block integration method of this embodiment is applied to the translation process of a high-level language program in this way, for example, multiple program units PR0 of the source program 1 shown in FIG.
,1, common block U in PR0,2 and PRo,3
1. U2 and U3 are a common block U consisting of one continuous area as shown in FIG. 5 in the target program.
It is configured so that Therefore, the common block Ul
, LJ2, and U3 are consecutive, so if only the base address A1 is assigned to the beginning of the common block U and loaded into the base register B1, and then the displacement from the base address A1 is added, not only the common block U1 but also the common block U2 and U3 can also be referenced.

(発明の効果) 以上に説明したように、本発明では複数の共通ブロック
を宣言する複数のプログラム単位を翻訳する際に、複数
のプログラム単位中で宣言されている複数の共通ブロッ
クが一つの連続した領域に統合化されるようにコンパイ
ラの内部でテキストの変形を行うことにより、共通ブロ
ックの参照に必要なベースレジスタの個数を節約してベ
ースレジスタの内容の定義を行う命令列を減らし、目的
プログラムの実行時の効率を高めることができるという
効果がある。
(Effects of the Invention) As explained above, in the present invention, when multiple program units that declare multiple common blocks are translated, multiple common blocks declared in multiple program units are combined into one continuous By transforming the text within the compiler so that it is integrated into the specified area, the number of base registers required for referencing common blocks is reduced, and the number of instructions for defining the contents of the base registers is reduced. This has the effect of increasing the efficiency of program execution.

また、生成される目的プログラムにおいて他の記憶域の
参照に使用できるベースレジスタの個数を増やし、特に
使用することが可能なベースレジスタの個数が少ない計
算機システムにおいては、ベースレジスタを共通ブロッ
クの参照と他の記憶域の参照との間で兼用して使用する
ことによって生じることのあるベースレジスタの内容の
待避および復元を不要にして、生成した目的プログラム
の実行時の効率を高めることができるという効果がある
In addition, the number of base registers that can be used to refer to other storage areas in the generated target program is increased, and especially in computer systems where the number of usable base registers is small, base registers can be used to refer to common blocks. The effect of increasing the execution efficiency of the generated target program by eliminating the need to save and restore the contents of the base register, which can occur when the contents of the base register are shared with references to other storage areas. There is.

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

第1図は本発明の一実施例の共通ブロック統合化方式の
構成を示すブロック図、 第2図は第1図中のソースプログラムの複数の共通ブロ
ックを宣言する複数のプログラム単位の一例を示す図、 第3図は第1図中の共通ブロック統合化手段によって変
形されたテキストがテキスト生成手段22によって直接
に生成されるような、入力ソースプログラムの例を示す
図、 第4図は第2図に示したソースプログラムをコンパイラ
が共通ブロックの統合化を行わずに出力する目的プログ
ラムにおける共通ブロックの配置を例示する図、 第5図は統合化により変形したテキストによって生成さ
れる目的プログラムにおける共通ブロックの配置を示す
図、 第6図は統合化を行う前のテキストを例示する図、 第7図は共通ブロック認識手段23によって出力される
情報を例示する図、 第8図は統合化が行われ、変形されたテキストを例示す
る図である。 1・・・ソースプログラム、2・・・コンパイラ、21
・・・ソースプログラム入力手段、22・・・テキスト
生成手段、23・・・共通ブロック認識手段、24・・
・共通ブロック情報保持手段、25・・・共通ブロック
統合化手段、26・・・目的プログラム生成手段、3・
・・複数のコンパイルユニット、AI、A2.A3・・
・ベースアドレス、Bl、B2.B3・・・ベースレジ
スタ、Ul、U2.U3.U・・・名前付き共通ブロッ
ク、A、B、C,D、E、F、G、H・・・名前付き共
通ブロックに含まれる変数、PRo、1゜PRo、2.
PRo、3・・・プログラム単位。 2 コンパイラ
FIG. 1 is a block diagram showing the configuration of a common block integration method according to an embodiment of the present invention, and FIG. 2 shows an example of multiple program units that declare multiple common blocks of the source program in FIG. 1. Figure 3 is a diagram showing an example of an input source program in which the text transformed by the common block integration means in Figure 1 is directly generated by the text generation means 22; A diagram illustrating the arrangement of common blocks in a target program that is output by a compiler without integrating common blocks from the source program shown in the figure. Figure 6 is a diagram showing the arrangement of blocks; Figure 6 is a diagram illustrating text before integration; Figure 7 is a diagram illustrating information output by the common block recognition means 23; Figure 8 is a diagram illustrating information output after integration. FIG. 3 is a diagram illustrating an example of a transformed text. 1... Source program, 2... Compiler, 21
... Source program input means, 22... Text generation means, 23... Common block recognition means, 24...
- Common block information holding means, 25... Common block integration means, 26... Target program generation means, 3.
...Multiple compilation units, AI, A2. A3...
・Base address, Bl, B2. B3...Base register, Ul, U2. U3. U...Named common block, A, B, C, D, E, F, G, H...Variables included in named common block, PRo, 1°PRo, 2.
PRo, 3...Program unit. 2 Compiler

Claims (1)

【特許請求の範囲】 記憶域のアドレスをその記憶域を参照するためのベース
アドレスとベースアドレスからの変位との組合せにより
表現しベースアドレスを有限個のベースレジスタのうち
の一つにあらかじめロードしてベースレジスタの番号と
ベースアドレスからの変位とを指定することにより記憶
域の参照を行う計算機システムにおける高級言語プログ
ラムの翻訳を行うコンパイラにおいて、 複数の共通ブロックを宣言する複数のプログラム単位を
入力するプログラム単位入力手段と、このプログラム単
位入力手段によって入力された複数のプログラム単位を
構文解析してテキスト群を生成するテキスト生成手段と
、 前記テキスト群から複数のプログラム単位で宣言された
複数の共通ブロックのテキストを認識し、統合化に必要
な情報を抽出する共通ブロック認識手段と、 前記共通ブロック認識手段によって得られた複数の共通
ブロックの情報を保持する共通ブロック情報保持手段と
、 前記共通ブロック情報保持手段によって保持された情報
を基にして複数の共通ブロックを一つの連続した領域に
統合化し、共通ブロックのテキストを変形する共通ブロ
ック統合化手段と、 前記テキストにより、共通ブロックが統合化された目的
プログラムを生成する目的プログラム生成手段と、 を有することを特徴とする共通ブロック統合化方式。
[Claims] An address of a storage area is expressed by a combination of a base address for referencing the storage area and a displacement from the base address, and the base address is preloaded into one of a finite number of base registers. In a compiler that translates a high-level language program in a computer system where storage is referenced by specifying the base register number and displacement from the base address, multiple program units that declare multiple common blocks are input. A program unit input means, a text generation means for generating a text group by parsing a plurality of program units input by the program unit input means, and a plurality of common blocks declared in the plurality of program units from the text group. common block recognition means for recognizing text and extracting information necessary for integration; common block information holding means for holding information on a plurality of common blocks obtained by the common block recognition means; and the common block information. common block integrating means for integrating a plurality of common blocks into one continuous area based on the information held by the holding means and transforming the text of the common block; and the common block is integrated by the text. A common block integration method comprising: objective program generation means for generating an objective program.
JP31570588A 1988-12-14 1988-12-14 Common block integrating system Pending JPH02161531A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP31570588A JPH02161531A (en) 1988-12-14 1988-12-14 Common block integrating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP31570588A JPH02161531A (en) 1988-12-14 1988-12-14 Common block integrating system

Publications (1)

Publication Number Publication Date
JPH02161531A true JPH02161531A (en) 1990-06-21

Family

ID=18068553

Family Applications (1)

Application Number Title Priority Date Filing Date
JP31570588A Pending JPH02161531A (en) 1988-12-14 1988-12-14 Common block integrating system

Country Status (1)

Country Link
JP (1) JPH02161531A (en)

Similar Documents

Publication Publication Date Title
CN111651207B (en) Neural network model operation chip, method, device, equipment and medium
JP5118745B2 (en) Vectorization of memory access instructions
Nelson A comparison of PASCAL intermediate languages
JPH02161531A (en) Common block integrating system
Hannan et al. Higher-order arity raising
JPH03135630A (en) Instruction scheduling system
JPS63298530A (en) Common block integrating system
JP2539070B2 (en) Compiler processor
JP2786689B2 (en) Compiler processing method
JPS6365530A (en) Code optimizing system
JP2754866B2 (en) Object code generator for data driven computer
JPH02130637A (en) Source code translating system
JPH01280833A (en) Allocation system for common block
JPS63257038A (en) Attaching system for correspondent identification information in source program conversion
JPH03257579A (en) Parallel arrangement system for compilers
JPS6326730A (en) Program correction system
Brezány et al. Code generation for a data parallel SIMD language
JPH07129408A (en) Executing system for language processing program
JPH0390931A (en) Generation of rom transformation program
Minow Random generation of sentences from context free and context sensitive phrase structure grammars Report No. 215.
JPH0373026A (en) Compile system
JPH04243429A (en) Compiler
JPH0786836B2 (en) Memory allocation method for multi-dimensional array
JPH01142936A (en) Information connecting method
END VAX SCAN: Rule-based Text Processing Software