JPH0224726A - Optimum data allocating system - Google Patents

Optimum data allocating system

Info

Publication number
JPH0224726A
JPH0224726A JP17389988A JP17389988A JPH0224726A JP H0224726 A JPH0224726 A JP H0224726A JP 17389988 A JP17389988 A JP 17389988A JP 17389988 A JP17389988 A JP 17389988A JP H0224726 A JPH0224726 A JP H0224726A
Authority
JP
Japan
Prior art keywords
data
allocation
order
information
code table
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.)
Granted
Application number
JP17389988A
Other languages
Japanese (ja)
Other versions
JPH0792757B2 (en
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 JP63173899A priority Critical patent/JPH0792757B2/en
Publication of JPH0224726A publication Critical patent/JPH0224726A/en
Publication of JPH0792757B2 publication Critical patent/JPH0792757B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To increase translation speed and execution speed by allocating data in the ascending order of data lengths. CONSTITUTION:A front end 2 inputs a source program 1 and outputs an intermediate language 8. At such a time, a code table forming part 3 forms a code table. Aligning means 9 obtains a data length from the code table, allocates the addresses of the code table so that the data lengths are arranged in the ascending order and stores them as allocation order information 4. A data length order data allocating means 5 executes data allocation by using the information 4 and the code table in the language 8, and returns the allocated data to the code table in the language 8. A back end 6 inputs the data-allocated intermediate language 8 and forms an objective program 7.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、コンピュータシステムのコンパイラに関し、
特に基点となるベースアドレスを最大ディスプレースメ
ントの間隔で割当て、そのベースアドレスをベースレジ
スタに設定し、ベースアドレスからの相対アドレスをイ
ンデックスレジスタやディスグレースメントに設定して
データ接近を行うときのデータ割付けに関する。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a compiler for a computer system,
In particular, data allocation when approaching data by allocating a base address as a base point at intervals of maximum displacement, setting that base address in a base register, and setting a relative address from the base address in an index register or displacement. Regarding.

〔従来の技術〕[Conventional technology]

従来、データ割付けは利用者の宣言層や参照順。 Traditionally, data allocation was based on the user's declaration layer or reference order.

またはコン/9イラの生成順に行われていた。Or it was done in the order of generation of Kon/9ira.

第6図において、利用者の宣言または参照の順番がデー
タA、データB、データC,データDとすると、データ
の割付けも、データA、データB。
In FIG. 6, if the order of declaration or reference by the user is data A, data B, data C, and data D, the data allocation is also data A, data B.

データC,データDの順番に行われていた。Data C and data D were performed in this order.

これを第6図(1) t (2)を参照して説明すると
、データ割付は例において、データBの場合、まずアド
レス1をベースレジスタ1にロードする命令に出力し1
次にディスプレースメント1を算出し。
To explain this with reference to FIG. 6 (1) t (2), in the example of data allocation, in the case of data B, address 1 is first output to the instruction to load base register 1, and
Next, calculate displacement 1.

このディスブレースメントド、ペースレジスタエの修飾
を使ってデータBに接近する。データDも同様で、アド
レス2をベースレジスタ2にロードする命令を出力し、
ディスグレースメント2の算出を経て接近する。なお、
データ領域の先頭を表すアドレスθをベースレジスタθ
ヘロートスる命令は9通常最初に無条件に出力する。
Data B is approached using this displacement and modification of the pace register. The same goes for data D, which outputs an instruction to load address 2 into base register 2,
Approach after calculating Disgrace 2. In addition,
The address θ representing the beginning of the data area is set to the base register θ
The herotoss command is normally output unconditionally at the beginning.

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

しかしながら、上述した従来のデータ割付は方式では、
利用者が量大ディスプレースメント以上のデータ長をも
つデータを先に宣言または参照したシ、もしくはコン・
ぐイラが先【生成してしまうと1次に宣言、参照、生成
したデータのデータ長が小さくても、データ接近のため
、ベースレジスタへのロード命令の出力、ベースレジス
タからの相対アドレスの算出等の処理をしなければなら
なかった。
However, in the conventional data allocation method described above,
If the user has previously declared or referenced data with a data length greater than the large displacement, or
The first step is to declare and reference the generated data, and even if the data length of the generated data is small, to access the data, output a load instruction to the base register, and calculate the relative address from the base register. etc. had to be dealt with.

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

本発明によれば、各データの記号表(シンボルテーブル
)へのポインタ値を得て、その各ポインタ値をデータの
データ長をキーとして昇順に整列する整列手段と、整列
手段が出力する整列済みのポインタ値を保存した割付は
順情報と、整列手段で生成した割付は順情報とを入力し
、その情報をもとにデータ長の小さいデータからデータ
割付けを行うデータ長順データ割付は手段とを有してい
ることを特徴とするデータ割付は方式が得られる。
According to the present invention, the sorting means obtains a pointer value to a symbol table of each data, and sorts the pointer values in ascending order using the data length of the data as a key, and the sorted means outputs the sorted data. Data length order data allocation is a method that inputs order information for allocation that saves pointer values, and input order information for allocation generated by sorting means, and uses that information to allocate data starting from the data with the smallest data length. A data allocation method is obtained which is characterized by having the following.

〔実施例〕〔Example〕

次に本発明の実施例について図面を参照して説明する。 Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明を実施するためのコンパイラの一実施例
で、原始プログラム1を入力し、中間言語8を出力する
70yトエyド2.フロントエンド2に属する利用者が
宣言したデータやコンパイラが生成するデータの記号表
(シンボルテーブル)を生成する記号表生成部3.記号
表生成部3に属する本実施例の整列手段9.整列手段9
の出力である割付は順情報4.フロントエンド2が出力
した中間言語8t−人力して、目的プログラム7を出力
スルハックエンド6.フロントエンド2とバックエンド
6との間に位置し、整列手段9が出力した割付は順情報
4と、フロントエンド2が出力した中間言語8の中の記
号表とを入力してデータ割付けを行い1割付はアドレス
を中間言語8の中の記号表に返すデータ長順データ割付
は手段とから構成される。
FIG. 1 shows an embodiment of a compiler for carrying out the present invention, which is a 70-year program that inputs a source program 1 and outputs an intermediate language 8. A symbol table generation unit 3 that generates a symbol table of data declared by a user belonging to the front end 2 and data generated by a compiler. Sorting means 9 of this embodiment belonging to the symbol table generation unit 3. Alignment means 9
The layout, which is the output of , is the order information 4. Intermediate language 8t outputted by front end 2 - Human output of target program 7 Hack end 6. It is located between the front end 2 and the back end 6, and performs data allocation by inputting the order information 4 outputted by the sorting means 9 and the symbol table in the intermediate language 8 outputted by the front end 2. 1 allocation consists of a data length order data allocation means for returning an address to a symbol table in the intermediate language 8.

記号表生成部3の動作は、第2図を参照すると。Refer to FIG. 2 for the operation of the symbol table generation section 3.

読み込みステップ21で利用者の宣言したデータまたは
コン・母イラが生成したデータの情報を一件読み込み1
判断ステップ22で読み込む情報がまだあると判断すれ
ば、その情報で表されるデータについて生成ステツf2
3で記号表を生成する。
In the reading step 21, read one piece of information about the data declared by the user or the data generated by the controller/mother 1
If it is determined in judgment step 22 that there is more information to be read, the generation step f2 is executed for the data represented by that information.
Step 3 generates a symbol table.

ここから本実施例の整列手段の動作が始まる。The operation of the alignment means of this embodiment starts from here.

現在生成した記号表から情報を得、レベル判定ステツブ
24で、このデータは構造体の最上位のレベルをもつデ
ータか、または、独立した(従属するデータを持たない
)データであるかを判定する。どちらかの条件を満たし
た場合、データ長GETステッf25に制御を渡し、記
号表からデータ長を得る。次に割付は順情報生成ステク
プ26で、データ長が昇順になる様に、記号表のアドレ
スを割付は順情報4として保存する9割付は順情報4の
一例を第3図に示す。割り付は情報31は9割シ付は順
、データ長、記号表へのポインタから構成され。
Information is obtained from the currently generated symbol table, and in level determination step 24 it is determined whether this data is data with the highest level of the structure or independent data (has no dependent data). . If either condition is satisfied, control is passed to data length GET step f25 to obtain the data length from the symbol table. Next, in the layout order information generation step 26, the address of the symbol table is saved as layout order information 4 so that the data length is in ascending order.9 An example of the layout order information 4 is shown in FIG. The allocation information 31 consists of 90% allocation order, data length, and a pointer to the symbol table.

各々のポインタは、記号表32.33,34.35をポ
イントしている。もし、この次にデータEの記号表36
が作られると仮定すると、データEのデータ長が10で
ある場合1割付は情報31の割付は順3の直前の位置に
データEの情報がそう人されることになる。すなわち1
割付は順3のセルには、データ長10.記号表へのポイ
ンタはデータEの記号表36へのポインタ値が入シ、デ
ータCの情報は割付は順4へ、データAの情報は割付は
順5へと移動する。
Each pointer points to a symbol table 32.33, 34.35. If next, data E symbol table 36
Assuming that the data length of data E is 10, the information 31 in 1 allocation will be placed in the position immediately before order 3. i.e. 1
For the cell in order 3, the data length is 10. The pointer value to the symbol table 36 of data E is entered as the pointer to the symbol table, the information on data C moves to order 4, and the information on data A moves to order 5.

データ長順データ割付は手段5の動作は、第4図を参照
すると、初回読み込みステラ7’41で。
Referring to FIG. 4, the operation of the data allocation means 5 in order of data length is performed in the initial reading Stella 7'41.

割付は順情報4から割付は順1番の情報を読み込み1判
断ステップ42で読み込むべき情報有りと判断したら1
割付はステップ43が読み込んだ情報の中のポインタ値
をたどシ、記号表を得、この記号表に表されるデータを
割付け1割付はアトしスを記号表に返して割付けを完了
する。読み込みステップ44で9次の割付は順に指定さ
れているデータの情報を割付は層情報4から読み込み、
情報が無くなるまで1割付けを行う。
Assignment is from order information 4 to order number 1 information is read 1 judgment step 42 if it is determined that there is information to be read is 1
For the allocation, step 43 traces the pointer value in the information read, obtains a symbol table, and allocates the data represented in this symbol table.1 Allocation returns the attribution to the symbol table to complete the allocation. In the reading step 44, the information of the data specified for the 9th layout is read from the layer information 4 in order, and
1 allocation is performed until information is exhausted.

割付は層情報4には、従属するデータの情報は無いが最
上位のレベルのデータの割付けは、このデータ長順デー
タ割付は手段5にて完了し、従属するデータの割付けは
上位レベルの割付は先に依存するため、上位レベルの割
付けが終った後ならいつ割付けてもよく、データ長順デ
ータ割付は手段5の中に含めても良いし、パックエンド
6に入れても良い。
Layer information 4 does not include information on subordinate data, but the assignment of data at the highest level is completed by means 5 in the order of data length, and the assignment of subordinate data is performed using the upper level assignment. Since it depends on the previous one, it can be allocated at any time after the upper level allocation is completed, and the data allocation in order of data length may be included in the means 5 or in the pack end 6.

以上、このようにして行ったデータ割付けの例を示した
のが第5図で、利用者の宣言、参照の順が、利用者のプ
ログラム52に示される様になっていても1割付けは割
υ付は例51の様にデータ長順に昇順に割付けられてい
る。
FIG. 5 shows an example of data allocation performed in this way. The υ tags are assigned in ascending order of data length as in Example 51.

第5図(1) (2)を参照すると、データD、データ
Bは最大ディスプレースメ/ト内に割付けられているた
め、従来第6図に参照されるようなデータBへの接近の
ために行っていたアドレス1のペースレジスタ1へのロ
ード命令の出力とディスプレースメント1の算出、デー
タDへの接近のために行っていたアドレス2のベースレ
ジスタ2へのロード命令の出力とディスプレースメント
2の算出の必要が無くなったため、翻訳が速くでき、ま
た。
Referring to FIG. 5 (1) and (2), since data D and data B are allocated within the maximum displacement, it is difficult to approach data B as shown in FIG. Outputting a load command to pace register 1 at address 1 and calculating displacement 1, which had been done, and outputting a load command to base register 2 at address 2, which had been performed to approach data D, and calculating displacement 2. Since there is no need for calculation, translation can be done faster.

出力する目的グログラムのステツブ数も減少できるため
、実行も速くすることができる。
Since the number of steps in the objective program to be output can also be reduced, execution can also be made faster.

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

以上説明したように本発明は、データ割付けをデータ長
の昇順にて行うことによシ、データ接近のための余計な
目的プログラムの出力や、計算が不要となシ、翻訳速度
と実行速度の高速化という効果がある。
As explained above, by allocating data in ascending order of data length, the present invention eliminates the need for outputting unnecessary target programs and calculations for accessing data, and improves translation speed and execution speed. This has the effect of increasing speed.

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

第1図は本発明の実施例を採用したコンノクイラの構成
図、第2図は第1図中の整列手段9を含む記号表生成部
3の流れ図、第3図は、第1図中の割付は層情報4の一
例、第4図は、第1図中のデータ長順データ割付は手段
5の流れ図、第5図(1)。 (2)は2本実施例を実施したときのデータ割付けの例
、第6図(1) e (2)は、従来のデータ割付は例
である。 1・・・原始プログラム、2・・・フロントエンド、3
・・・記号表生成部、4・・・割付は層情報、5・・・
データ長順データ割付手段、6・・・バックエンド、7
・・・目的プログラム、8・・・中間言語、9・・・整
列手段。 穴−:5JLJ!I)流几 傘コ:デづのがjm 第2図 2(点線内パ従床の記号表生成部[;追加した本完明の
整列手段)地3図 第5図
FIG. 1 is a block diagram of a conoquila employing an embodiment of the present invention, FIG. 2 is a flowchart of the symbol table generation unit 3 including the alignment means 9 in FIG. 1, and FIG. 3 is a diagram showing the layout in FIG. 4 is an example of the layer information 4, and FIG. 4 is a flowchart of the means 5 for data allocation in order of data length in FIG. 1, and FIG. 5 (1). (2) is an example of data allocation when the two embodiments are implemented, and FIG. 6 (1) and (2) are examples of conventional data allocation. 1... Original program, 2... Front end, 3
...Symbol table generation unit, 4...Layout is layer information, 5...
Data length order data allocation means, 6... back end, 7
. . . Objective program, 8. Intermediate language, 9. Sorting means. Hole: 5JLJ! I) Flowing Umbrella: Dezunogajm Fig. 2 2 (Dotted line is the symbol table generation part for the pa sub-floor [; Added alignment means of book completion) Fig. 3 Fig. 5

Claims (1)

【特許請求の範囲】[Claims] 1)基点となるベースアドレスを最大ディスプレースメ
ントの間隔で割当て、そのベースアドレスをベースレジ
スタに設定し、該ベースアドレスからの相対アドレスを
インデックスレジスタやディスプレースメントに設定す
ることでデータ接近を行うコンピュータシステムのコン
パイラにおいて、各データの記号表へのポインタ値を得
て、その各ポインタ値をデータのデータ長をキーとして
昇順に整列する整列手段と、整列手段が出力する整列済
みのポインタ値を保存した割付順情報と、整列手段で生
成した割付け順情報とを入力し、その情報をもとにデー
タ長の小さいデータからデータ割付けを行うデータ長順
データ割付け手段とを含むことを特徴とする最適データ
割付け方式。
1) A computer system that accesses data by allocating a base address as a base point at intervals of maximum displacement, setting that base address in a base register, and setting a relative address from the base address in an index register or displacement. In the compiler, a sorting means obtains a pointer value to the symbol table of each data, sorts each pointer value in ascending order using the data length of the data as a key, and stores the sorted pointer values output by the sorting means. Optimal data, characterized by comprising a data length order data allocation means that inputs the allocation order information and the allocation order information generated by the sorting means, and performs data allocation in ascending order of data length based on the information. Allocation method.
JP63173899A 1988-07-14 1988-07-14 Optimal data allocation method Expired - Fee Related JPH0792757B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63173899A JPH0792757B2 (en) 1988-07-14 1988-07-14 Optimal data allocation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63173899A JPH0792757B2 (en) 1988-07-14 1988-07-14 Optimal data allocation method

Publications (2)

Publication Number Publication Date
JPH0224726A true JPH0224726A (en) 1990-01-26
JPH0792757B2 JPH0792757B2 (en) 1995-10-09

Family

ID=15969150

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63173899A Expired - Fee Related JPH0792757B2 (en) 1988-07-14 1988-07-14 Optimal data allocation method

Country Status (1)

Country Link
JP (1) JPH0792757B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5802372A (en) * 1992-09-13 1998-09-01 Nec Corporation Language processing system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6234240A (en) * 1985-08-08 1987-02-14 Nec Corp Data allotting system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6234240A (en) * 1985-08-08 1987-02-14 Nec Corp Data allotting system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5802372A (en) * 1992-09-13 1998-09-01 Nec Corporation Language processing system

Also Published As

Publication number Publication date
JPH0792757B2 (en) 1995-10-09

Similar Documents

Publication Publication Date Title
US4224665A (en) Bus-organized computer system with independent execution control
JPH0224726A (en) Optimum data allocating system
CN116796678A (en) An FPGA layout method based on analytical technology
JP2776750B2 (en) CAD system design data management method
JPH03109642A (en) Compiling device
JPH0241525A (en) Address allocation processing system in translation processor
JPH04260141A (en) Data shared processor
JPH07129408A (en) Executing system for language processing program
JPH02171830A (en) Optimal data allocation method in compiler
JP2754866B2 (en) Object code generator for data driven computer
JPH0754469B2 (en) Input / output instruction execution unit for virtual computer system
JPH02140825A (en) Method for processing rearrangement of program
JPH04111131A (en) Computer language translating device
JPH0414161A (en) Transaction processing system
JPH01298464A (en) Japanese language dictionary access system
JPH03119472A (en) Vector register allotment system
JPS61160147A (en) Virtual computer control system
JPH02144629A (en) Processing system for language processing program
JPS63113637A (en) Exclusive processing system for hash table entry
JPH02217946A (en) Method of accessing file
JPH01163872A (en) Automatic allocation method for computing element
JPH02260082A (en) Computer system
JPH04138528A (en) Common data accessing system in contracted instruction setting computer
JPS63150724A (en) Data access processing system
JPS63291125A (en) Program conversion method

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees