JPH0371233A - Optimum data allocating system for compiler - Google Patents

Optimum data allocating system for compiler

Info

Publication number
JPH0371233A
JPH0371233A JP20736089A JP20736089A JPH0371233A JP H0371233 A JPH0371233 A JP H0371233A JP 20736089 A JP20736089 A JP 20736089A JP 20736089 A JP20736089 A JP 20736089A JP H0371233 A JPH0371233 A JP H0371233A
Authority
JP
Japan
Prior art keywords
data
order
allocation
dynamic
compiler
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
JP20736089A
Other languages
Japanese (ja)
Inventor
Toshimi Osanai
小山内 聡美
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 JP20736089A priority Critical patent/JPH0371233A/en
Publication of JPH0371233A publication Critical patent/JPH0371233A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To increase the translation speed of a source program by allocating data in the descending order in the number of times of dynamically referencing data. CONSTITUTION:An aligning means 4 in order of the number of times of dynami cal reference obtains pointer values in a code table for respective data and aligns the pointer values in the descending order in the number of times of dynamically referencing data to form allocation order information 9 storing the aligned pointer values and the allocating means 5 in order of the number of times of dynamic reference inputs the allocating order information formed by the means 4 and allocates the data successively from the data with the highest dynamic reference data. Consequently, the output or calculation of excess object program 10 for data approximation can be omitted and the transla tion speed of the source program 7 can be increased.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はコンピュータシステムのコンパイラに関し、特
に基点となるベースアドレスを最大ディスプレースメン
トの間隔で割り当てへ−スアドレスをベースレジスタに
設定しベースアドレスからの相対アドレスをインデック
スレジスタやディスプレースメントに設定してデータ接
近を行うコンピュータシステムのコンパイラにおける最
適データ割付は方式に関する。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a compiler for a computer system, and in particular, the present invention relates to a compiler for a computer system. Optimal data allocation in a computer system compiler that approaches data by setting relative addresses in index registers and displacements is related to a method.

〔従来の技術〕[Conventional technology]

従来、この種のコンパイラにおけるデータ割付は方式で
は、データ割付けは原始プログラムにおけるデータの宣
言順に行われており、データの宣言がデータD、データ
B、データC,データAおよびデータEの順になされて
いるとすると、第7図に示すように、データ領域71へ
のデータの割付けもデータD、データB、データC,デ
ータAおよびデータEの順に行われていた。このため、
データAおよびデータBにデータ接近するには、データ
Aのデータ接近のためにアドレスCをベースレジスタ#
2にロードする命令と、データBのデータ接近のために
アドレスbをベースレジスタ#1にロードする命令とを
出力しなければならなかった。
Conventionally, the data allocation method in this type of compiler is that data allocation is performed in the order of data declaration in the source program, and the data declarations are made in the order of data D, data B, data C, data A, and data E. If so, as shown in FIG. 7, data was allocated to the data area 71 in the order of data D, data B, data C, data A, and data E. For this reason,
To access data A and data B, set address C to base register # for data access of data A.
2 and an instruction to load address b into base register #1 for data access of data B had to be output.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述した従来のコンパイラにおけるデータ割付は方式で
は、参照のないデータや動的参照回数(目的プログラム
の実行時に実際に参照される回数をいう、原始プログラ
ム中に出現する回数である静的な参照回数とは異なる)
が少ないデータを先に原始プログラム中に宣言してしま
うと、動的参照回数が多いデータはデータ領域の最大デ
ィスプレースメント以上の領域に割り付けられる可能性
が高くなるので、動的参照回数が多いデータがデータ領
域の最大ディスプレースメント以上の領域に割り付けら
れた場合には、データ接近のためのベースレジスタへの
ロード命令の出力、ベースレジスタからの相対アドレス
の算出等の処理を翻訳時にしなければならなくなり、原
始プログラムの翻訳速度が低下するという欠点がある。
The data allocation method in the conventional compiler mentioned above is based on unreferenced data or dynamic reference count (the number of times the target program is actually referenced when the target program is executed, or static reference count, which is the number of times it appears in the source program). )
If data with a small number of dynamic references is declared in the source program first, there is a high possibility that data with a large number of dynamic references will be allocated to an area larger than the maximum displacement of the data area. If the data area is allocated to an area larger than the maximum displacement of the data area, processes such as outputting a load instruction to the base register to access the data and calculating the relative address from the base register must be performed during translation. This has the disadvantage that the translation speed of the source program decreases.

また、目的プログラムのステフプ数も増えるので、目的
プログラムの実行時の効率も悪くなるという欠点がある
Furthermore, since the number of steps in the target program increases, there is a disadvantage that the efficiency of executing the target program decreases.

さらに、データが原始プログラム中の繰返し構造の中に
あり、コンパイラがデータへのデータ接近のためのロー
ド命令を繰返し構造の中に出力するような場合には、目
的プログラムの実行速度が著しく低下してしまうという
欠点がある。
Furthermore, if the data is in a repeating structure in the source program and the compiler outputs a load instruction into the repeating structure to access the data, the execution speed of the target program will be significantly reduced. It has the disadvantage of being

特に、動的参照回数が多いデータが参照のないデータや
動的参照回数が少ないデータの中に点在して宣言されて
いるような場合には上記欠点は著しくなる。
In particular, the above-mentioned drawback becomes significant when data with a large number of dynamic references is scattered and declared among data with no references or data with a small number of dynamic references.

本発明の目的は、上述の点に鑑み、動的参照回数が多い
データ順にデータをデータ領域に割り付けることにより
、データ接近のための余計な目的プログラムの出力や計
算を不要として、原始プログラムの翻訳速度を高速化す
るとともに目的プログラムの実行速度も高速化するよう
にしたコンパイラにおける最適データ割付は方式を提供
することにある。
In view of the above-mentioned points, an object of the present invention is to allocate data to a data area in the order of data with the highest number of dynamic references, thereby eliminating the need for outputting or calculating an extra target program for data access, and translating source programs. The objective is to provide a method for optimal data allocation in a compiler that increases speed and also increases the execution speed of the target program.

〔課題を解決するための手段〕[Means to solve the problem]

本発明のコンパイラにおける最適データ割付は方式は、
基点となるベースアドレスを最大ディスプレースメント
の間隔で割り当てベースアドレスをベースレジスタに設
定しベースアドレスからの相対アドレスをインデックス
レジスタやディスプレースメントに設定することにより
データ接近を行うコンピュータシステムのコンパイラに
おいて、各データの記号表へのポインタ値を得てポイン
タ値をデータの動的参照回数の多い順に整列し整列済み
のポインタ値を保存した割付は原情報を生成する動的参
照回数順整列手段と、この動的参照回数順整列手段によ
り生成された割付は原情報を入力し割付は原情報に基づ
いて動的参照回数が多いデータからデータ割付けを行う
動的参照回数順データ割付は手段とを有する。
The optimal data allocation method in the compiler of the present invention is as follows:
In the compiler of a computer system, data is accessed by assigning base addresses at intervals of maximum displacement, setting the base address in the base register, and setting relative addresses from the base address in the index register or displacement. The allocation that obtains the pointer values to the symbol table, sorts the pointer values in descending order of the number of times the data is dynamically referenced, and stores the sorted pointer values is performed using a dynamic sorting means in order of the number of references that generates the original information and this dynamic The layout generated by the target reference count order sorting means inputs original information, and the dynamic reference count order data allocation means performs data allocation in descending order of the number of dynamic references based on the original information.

〔作用〕[Effect]

本発明のコンパイラにおける最適データ割付は方式では
、動的参照回数順整列手段が各データの記号表へのポイ
ンタ値を得てポインタ値をデータの動的参照回数の多い
順に整列し整列済みのポインタ値を保存した割付は原情
報を生成し、動的参照回数順データ割付は手段が動的参
照回数順整列手段にまり生成された割付は原情報を入力
し割付は原情報に基づいて動的参照回数が多いデータか
らデータ割付けを行う。
In the optimal data allocation method in the compiler of the present invention, a dynamic reference number sorting means obtains the pointer value to the symbol table of each data, sorts the pointer values in descending order of the number of dynamic references of the data, and sorts the pointer values in order of the number of dynamic references of the data. Allocations that save values generate the original information, and dynamic reference count order data allocation uses the dynamic reference count order sorting means, and the generated allocations input the original information, and the allocations are dynamically based on the original information. Allocate data starting from the data that is referenced the most.

〔実施例〕〔Example〕

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

第1図は、本発明の一実施例に係る最適データ割付は方
式が適用されたコンパイラ1の構成を示すブロック図で
ある。このコンパイラ1は、動的参照回数順整列手段4
を含む手続き部解析部3を有するフロントエンド部2と
、動的参照回数順データ割付は手段5と、バックエンド
部6とから構成されている。
FIG. 1 is a block diagram showing the configuration of a compiler 1 to which an optimal data allocation method according to an embodiment of the present invention is applied. This compiler 1 includes a dynamic reference count sorting means 4.
A front end section 2 having a procedure section analysis section 3 including a procedure section analysis section 3, a means 5 for dynamic reference count order data allocation, and a back end section 6.

フロントエンド部2は、原始プログラム7を入力し、中
間言語8および割付は原情報9を出力する。フロントエ
ンド部2の中には様々な役割を分担する部分が存在する
が、その中で利用者が記述した原始プログラム7のうち
の手続き部の解析を主に担当するのが手続き部解析部3
であり、手続き部解析部3の中に割付は層情報9を動的
参照回数順になるように整列する動的参照回数順整列手
段4が設けられている。
The front end unit 2 inputs a source program 7 and outputs an intermediate language 8 and original layout information 9. There are parts in the front end part 2 that share various roles, but the procedure part analysis part 3 is mainly responsible for analyzing the procedure part of the source program 7 written by the user.
In the procedure division analysis section 3, there is provided a dynamic reference count sorting means 4 for arranging the layer information 9 in the order of the dynamic reference count.

動的参照回数順データ割付は手段5は、割付は層情報9
をもとに実際にデータの割付は処理を行う手段であり、
フロントエンド部2とバンクエンド部6との間に位置す
る。
Dynamic reference count order data allocation is done by means 5, and allocation is done by layer information 9.
Data allocation is actually a means of processing based on
It is located between the front end section 2 and the bank end section 6.

バンクエンド部6は、フロントエンド部2から出力され
た中間言語8を入力し、コード生成および目的プログラ
ム10の出力を主に行う。
The bank end unit 6 receives the intermediate language 8 output from the front end unit 2 and mainly performs code generation and output of the target program 10.

第2図を参照すると、動的参照回数順整列手段4を含む
手続き部解析部3における処理は、手続き部読込みステ
ップ21と、手続き部終了判定ステップ22と、中間言
語生成ステップ23と、記号表取得ステップ24と、最
上位レベルデータ判定ステップ25と、最上位レベルデ
ータ記号表取得ステンプ26と、登録ビットオン判定ス
テップ27と、アドレス登録および登録ビットオンステ
ップ28と、繰返し構造判定ステップ29と、動的参照
回数カウント1カウントアンプステツプ30と、動的参
照回数カウント動的参照予測回数カウントアフブステッ
プ31と、割付は順情報動的参照回数順整列ステップ3
2とからなる。
Referring to FIG. 2, the processing in the procedure division analysis unit 3 including the dynamic reference count sorting means 4 includes a procedure division reading step 21, a procedure division end determination step 22, an intermediate language generation step 23, and a symbol table. Acquisition step 24, highest level data determination step 25, highest level data symbol table acquisition step 26, registration bit on determination step 27, address registration and registration bit on step 28, repetitive structure determination step 29, Dynamic reference number count 1 count amplifier step 30, dynamic reference number count dynamic reference predicted number count amplifier step 31, allocation is order information dynamic reference number order arrangement step 3
It consists of 2.

第3図を参照すると、動的参照回数順データ割付は手段
5における処理は、記号表データ割付はステップ33か
らなる。
Referring to FIG. 3, the processing in the means 5 for dynamic reference count order data allocation and the symbol table data allocation consists of step 33.

次に、このように構成された本実施例のコンパイラにお
ける最適データ割付は方式の動作について説明する。
Next, the operation of the optimal data allocation method in the compiler of this embodiment configured as described above will be explained.

コンパイラ1のフロントエンド部2が原始プログラム7
を入力すると、手続き部解析部3は、原始プログラム7
の手続き部の一単位(例えば、代入、比較等の一単位)
を読み込み(ステップ21)、手続き部が終了でなけれ
ば(ステップ22)、読み込んだ1単位についての中間
言語8を生成する(ステップ23)。
The front end section 2 of the compiler 1 is the source program 7
, the procedure division analysis unit 3 inputs the source program 7
A unit of the procedure division of (e.g., a unit of assignment, comparison, etc.)
is read (step 21), and if the procedure division is not finished (step 22), intermediate language 8 for the read unit is generated (step 23).

次に、手続き部解析部3は、生成した中間言語8と関連
するデータの記号表(シンボルテーブル)を得る(ステ
ップ24)。例えば、利用者が原始プログラム7の手続
き部に“A−B ;“と記述しこの記述がデータAにデ
ータBの内容を代入するという原始プログラム7の言語
仕様であるならば、生成される中間言語8番九代入であ
るという情報とデータへの記号表およびデータBの記号
表とが関連付けられている。
Next, the procedure division analysis unit 3 obtains a symbol table of data related to the generated intermediate language 8 (step 24). For example, if the user writes “A-B;” in the procedure division of the source program 7, and this description is the language specification of the source program 7 that assigns the contents of data B to data A, the generated intermediate The information that it is a language 8/9 assignment is associated with a symbol table for data and a symbol table for data B.

続いて、手続き部解析部3は、得られた記号表からデー
タが1番上のレベル番号をもつデータ(最上位レベルデ
ータ)であるか否かを調べ(ステップ25)、従属する
レベルのデータ(最上位レベルデータ以外のデータ)で
あったならば1番上のレベル番号をもつデータの記号表
を得る(ステップ26)、これは、1番上のレベル番号
をもつデータを割り付けて初めて、そのデータに従属す
るレベルのデータ割付はアドレスが決定されるからであ
る。
Next, the procedure division analysis unit 3 checks whether the data is the data with the highest level number (top level data) from the obtained symbol table (step 25), and determines whether the data is the data of the subordinate level. (data other than the highest level data), obtain the symbol table of the data with the highest level number (step 26). This is only possible after assigning the data with the highest level number. This is because addresses are determined for data allocation at a level subordinate to that data.

このようにして得られた1番上のレベル番号をもつデー
タの記号表には初期値がオフのビット(以下、登録ビッ
トという)が用意されており、手続き部解析部3は、登
録ピントが初期状Li(オフ)であるか否かを調べ(ス
テップ27)、初期状態であったならば割付は層情報9
に記号表のアドレスを記号表へのポインタとして登録し
、記号表にも割付は層情報へのポインタ(アドレス)を
保存して登録ピントをオンにする(ステップ28〉。
The symbol table of the data with the highest level number obtained in this way has bits whose initial value is off (hereinafter referred to as registration bits), and the procedure division analysis unit 3 analyzes the registration focus. Check whether it is in the initial state Li (off) (step 27), and if it is in the initial state, the layout is layer information 9.
The address of the symbol table is registered as a pointer to the symbol table, the pointer (address) to the layout layer information is also saved in the symbol table, and the registration focus is turned on (step 28).

ステップ27で登録ビットが割付は層情報9に記号表を
登録済みの状態を示すオンであったならば、ステップ2
8をスキツプする。
If the registration bit is on in step 27, indicating that the symbol table has been registered in the allocation layer information 9, step 2
Skip 8.

次に、手続き部解析部3は、現在対象としている記号表
のデータが繰返し構造の中にあるか否かを判定しくステ
ップ29)、そうでなければ単純に割付は層情報9中の
動的参照回数カウントを1つカウントアンプする(ステ
ップ30)、現在対象としている記号表のデータが繰返
し構造の中にあれば、手続き部解析部3は、静的にはた
とえ1回の参照であっても動的には繰返し回数に依存し
て参照回数が増加するので、繰返し文等から繰返し回数
を予測して予測結果である参照予測回数分だけ割付は層
情報9中の動的参照回数カウントをカウントアツプする
(ステップ31〉。
Next, the procedure division analysis unit 3 determines whether the data of the symbol table currently targeted is in a repeating structure (step 29), and if not, the layout is simply performed using the dynamic data in the layer information 9. The number of references is counted by one (step 30). If the data of the symbol table currently being targeted is in a repeating structure, the procedure division analysis unit 3 calculates the reference count by one (step 30). Dynamically, the number of references increases depending on the number of repetitions, so the number of repetitions is predicted from the repetition statement, etc., and the dynamic reference number count in layer information 9 is allocated by the predicted number of references, which is the prediction result. Count up (step 31).

例えば、第4図に示すように、利用者が記述した原始プ
ログラム7におけるデータの参照順がデータD、データ
B、データC,データAおよびデータEの順であるとす
ると、データD、データB。
For example, as shown in FIG. 4, if the reference order of data in the source program 7 written by the user is data D, data B, data C, data A and data E, data D, data B .

データCおよびデータAの記号表41. 42. 43
および44が割付は層情報9に登録された状態から次に
データEが参照された場合、データEの記号表45のア
ドレスが割付は層情報9の5番目の記号表へのポインタ
として登録されることになる。そして、割付は層情報9
の登録もこの順番となるが、割付は順情!19中の動的
参照回数カウントへの加算は、繰返し構造中にないデー
タD、データB、データCおよびデータEは参照のたび
に単純に1を加算するだけだが、繰返し構造の中にある
データAは、繰返し回数による参照予測回数、本例の場
合には“lO”が加算される。
Symbol table 41 for data C and data A. 42. 43
When data E is next referenced from the state where 44 is registered in layer information 9, the address of the symbol table 45 of data E is registered as a pointer to the fifth symbol table in layer information 9. That will happen. And the allocation is layer information 9
The registration will also be in this order, but the allocation is Junjo! In addition to the dynamic reference count in 19, data D, data B, data C, and data E that are not in the repeating structure are simply incremented by 1 each time they are referenced, but for data that is in the repeating structure. A is the number of reference predictions based on the number of repetitions, and in this example, "lO" is added.

このような一連の動作を操り返し、原始プログラム7の
手続き部が終了したならば(ステップ22)、手続き部
解析部3は、動的参照回数順整列手段4により動的参照
回数が1回以上のデータを全て登録した割付は層情報9
を動的参照回数カウントをキーとして動的参照回数が多
い順になるように整列する(ステップ32)。
When the procedure division of the source program 7 is completed after repeating such a series of operations (step 22), the procedure division analysis unit 3 uses the dynamic reference count sorting means 4 to determine whether the dynamic reference count is 1 or more. The layout in which all the data is registered is layer information 9.
are arranged in descending order of the number of dynamic references using the dynamic reference count as a key (step 32).

例えば、原始プログラム7の手続き部で参照されたデー
タがデータA、データB、データC,データDおよびデ
ータEだけだったとすると、割付は層情報9に登録され
るのもこれらのデータの5つの記号表41〜45のみと
なり、これらを動的参照回数順に整列すると、第5図に
示すような割付は層情報9が得られる。なお、ここでは
、以後記号表41〜45から割付は層情報9への参照が
行われないので、記号表41〜45の割付は層情報への
ポインタを同時にNULLクリアしている。
For example, if the only data referenced in the procedure division of the source program 7 are data A, data B, data C, data D, and data E, the layout will be registered in the layer information 9 for these five data. There are only symbol tables 41 to 45, and when they are arranged in order of the number of dynamic references, layer information 9 is obtained with the layout shown in FIG. Here, since the layer information 9 is no longer referred to in the layout from the symbol tables 41 to 45, the pointer to the layer information is cleared to NULL at the same time in the layout of the symbol tables 41 to 45.

フロントエンド部2における処理が終了すると、動的参
照回数順データ割付は手段5は、動的参照回数順整列手
段4により整列された割付は層情報9を入力し、動的参
照回数カウントの多い順に記号表へのポインタから得ら
れた記号表を基にデータを割り付ける(ステップ33)
When the processing in the front end section 2 is completed, the data allocation means 5 in the order of dynamic reference times inputs the layer information 9 for the layouts sorted by the dynamic reference number order means 4, and the data allocation means 5 inputs the layer information 9 for the data allocation sorted by the dynamic reference number ordering means 4. Data is sequentially allocated based on the symbol table obtained from the pointer to the symbol table (step 33).
.

この結果、データを割り付けられたデータ領域61は、
例えば第6図に示すようになり、通常、データ領域61
の先頭を示すアドレスaをベースレジスタ#Oにロード
する命令は無条件に出力されるので、このように割り付
けられたならば動的参照回数が多いデータAおよびデー
タBのデータ接近のために新たにベースレジスタへのロ
ード命令を出力する必要がなくなる。
As a result, the data area 61 to which data is allocated is
For example, as shown in FIG.
The instruction to load address a, which indicates the beginning of There is no need to output a load instruction to the base register.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明は、動的参照回数の多いデー
タ順にデータを割り付けることにより、データ接近のた
めの余計な目的プログラムの出力や計算が不要となり、
原始プログラムの翻訳速度が高速になるという効果があ
る。
As explained above, the present invention allocates data in the order of data with the highest number of dynamic references, thereby eliminating the need for extra target program output and calculations for accessing data.
This has the effect of increasing the translation speed of the source program.

また、目的プログラムのステップ数も減少するので、実
行速度も高速になるという効果がある。
Furthermore, since the number of steps in the target program is reduced, the execution speed is also increased.

さらに、参照のあるデータのみをデータ領域に割り付け
ることになるので、余計なデータの割付は処理が不要と
なって原始プログラムの翻訳速度が高速になるとともに
、目的プログラムの実行時に余計なデータがメモリを占
有することもなくなるので、目的プログラムの実行効率
も向上するという効果がある。
Furthermore, since only referenced data is allocated to the data area, there is no need to process the allocation of unnecessary data, which speeds up the translation of source programs. This has the effect of improving the execution efficiency of the target program.

さらにまた、参照回数を静的ではなく動的に数えること
により、例えば繰返し構造の外で5回参照されるデータ
が10回繰り返される繰返し構造の中で1回しか参照さ
れないデータよりも先に割り付けられることがなくなる
ので、原始プログラムの翻訳および目的プログラムの実
行がより効率的になるという効果がある。
Furthermore, by counting the number of references dynamically rather than statically, for example, data that is referenced 5 times outside a repeating structure is allocated before data that is referenced only once in a repeating structure that is repeated 10 times. This has the effect that translation of the source program and execution of the target program become more efficient.

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

第1図は本発明一実施例に係る最適データ割付は方式が
適用されたコンパイラの構成を示すブロック図・ 第2図は第1図中の動的参照回数順整列手段を含む手続
き部解析部の処理を示す流れ図、第3図は第1図中の動
的参照回数順データ割付は手段の処理を示す流れ図、 第4図は第1図中の原始プログラムの一例および割付は
層情報への登録例を示す図、 第5図は第1図中の割付は層情報の整列例を示す図、 第6図は本実施例のコンパイラにおける最適データ割付
は方式によるデータ割付は例を示す図、第7図は従来の
コンパイラにおけるデータ割付は方式によるデータ割付
は例を示す図である。 図において、 1・・・コンパイラ、 2・・・フロントエンド部、 3・・・手続き部解析部、 4・・・動的参照回数順整列手段、 5・・・動的参照回数順データ割付は手段、6・・・バ
ックエンド部、 7・・・原始プログラム、 8・・・中間言語、 9・・・割付は層情報、 10・・目的プログラム、 41〜45・記号表である。 第3図 動的参照回数順データ割付は手段
FIG. 1 is a block diagram showing the configuration of a compiler to which the optimal data allocation method according to an embodiment of the present invention is applied. FIG. 2 is a procedure division analysis unit including the dynamic reference count ordering means in FIG. 1. Figure 3 is a flowchart showing the process of dynamic reference count order data allocation in Figure 1, and Figure 4 is an example of the source program in Figure 1, and the allocation is based on the layer information. FIG. 5 is a diagram showing an example of the arrangement of layer information in which the layout in FIG. FIG. 7 is a diagram illustrating an example of data allocation according to the data allocation method in a conventional compiler. In the figure, 1...Compiler, 2...Front end section, 3...Procedure section analysis section, 4...Dynamic reference count ordering means, 5...Data allocation in dynamic reference count order. means, 6... back-end section, 7... source program, 8... intermediate language, 9... layout is layer information, 10... objective program, 41-45... symbol table. Figure 3 Dynamic data allocation in order of number of references is a means

Claims (1)

【特許請求の範囲】 基点となるベースアドレスを最大ディスプレースメント
の間隔で割り当てベースアドレスをベースレジスタに設
定しベースアドレスからの相対アドレスをインデックス
レジスタやディスプレースメントに設定することにより
データ接近を行うコンピュータシステムのコンパイラに
おいて、各データの記号表へのポインタ値を得てポイン
タ値をデータの動的参照回数の多い順に整列し整列済み
のポインタ値を保存した割付け順情報を生成する動的参
照回数順整列手段と、 この動的参照回数順整列手段により生成された割付け順
情報を入力し割付け順情報に基づいて動的参照回数が多
いデータからデータ割付けを行う動的参照回数順データ
割付け手段と を有することを特徴とするコンパイラにおける最適デー
タ割付け方式。
[Claims] A computer system that accesses data by allocating base addresses as reference points at intervals of maximum displacement, setting base addresses in base registers, and setting relative addresses from the base addresses in index registers and displacements. In the compiler, the pointer value to the symbol table of each data is obtained, the pointer values are arranged in descending order of the number of times the data is dynamically referenced, and the sorted pointer values are saved to generate allocation order information.Dynamic sorting by number of references and dynamic reference count order data allocation means for inputting the allocation order information generated by the dynamic reference count order sorting means and allocating data in descending order of the number of dynamic references based on the allocation order information. An optimal data allocation method for a compiler characterized by:
JP20736089A 1989-08-10 1989-08-10 Optimum data allocating system for compiler Pending JPH0371233A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20736089A JPH0371233A (en) 1989-08-10 1989-08-10 Optimum data allocating system for compiler

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20736089A JPH0371233A (en) 1989-08-10 1989-08-10 Optimum data allocating system for compiler

Publications (1)

Publication Number Publication Date
JPH0371233A true JPH0371233A (en) 1991-03-27

Family

ID=16538444

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20736089A Pending JPH0371233A (en) 1989-08-10 1989-08-10 Optimum data allocating system for compiler

Country Status (1)

Country Link
JP (1) JPH0371233A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5734906A (en) * 1993-06-29 1998-03-31 Fujitsu Limited Device for outputting initial values of data statement at high speed by using a proper work area
WO2000038054A1 (en) * 1998-12-22 2000-06-29 Fujitsu Limited Optimization object generating apparatus and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5734906A (en) * 1993-06-29 1998-03-31 Fujitsu Limited Device for outputting initial values of data statement at high speed by using a proper work area
WO2000038054A1 (en) * 1998-12-22 2000-06-29 Fujitsu Limited Optimization object generating apparatus and method

Similar Documents

Publication Publication Date Title
EP0428084B1 (en) Method and apparatus for compiling computer programs with interprocedural register allocation
US5689712A (en) Profile-based optimizing postprocessors for data references
US7069548B2 (en) Inter-procedure global register allocation method
JPH08328870A (en) Compiling processor
CN1191527C (en) Device and method for generating sparse interference graph
JPH0371233A (en) Optimum data allocating system for compiler
US7127710B2 (en) Identifying pure pointers to disambiguate memory references
US7581213B2 (en) Allocating automatic variables to different memory banks
JP2001101010A (en) Method for optimizing virtual machine
JPH02171830A (en) Optimum data allocating system in compiler
JPH07105013A (en) Register allocation system
JP3264901B2 (en) Compiling device and compiling method
JPH02171831A (en) Data access system for compiler
JPH08212081A (en) Memory allocation method, compiling method and compiler
JPS62219130A (en) Optimizing system for program
JPH03109642A (en) Compiling device
JPH03196224A (en) Data allocating system
JP2944500B2 (en) Compiling apparatus and method
JPH0689187A (en) Inline expansion optimizing method
JPH0236007B2 (en) KONPAIRANIOKERUJUDOHENSUKASANMEMEIREINOSEISEIHOSHIKI
JP3470256B2 (en) Instruction code bit assignment device
JPH04155531A (en) Compile processing system
JPH05197565A (en) Constant area allocation processing method
JPH0792757B2 (en) Optimal data allocation method
JPH07129408A (en) Executing system for language processing program