JPS6182241A - Dividing system of procedure block - Google Patents

Dividing system of procedure block

Info

Publication number
JPS6182241A
JPS6182241A JP17977784A JP17977784A JPS6182241A JP S6182241 A JPS6182241 A JP S6182241A JP 17977784 A JP17977784 A JP 17977784A JP 17977784 A JP17977784 A JP 17977784A JP S6182241 A JPS6182241 A JP S6182241A
Authority
JP
Japan
Prior art keywords
procedure
loop
dividing
point
inlet
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
JP17977784A
Other languages
Japanese (ja)
Inventor
Yutaka Sakuragi
桜木 裕
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP17977784A priority Critical patent/JPS6182241A/en
Publication of JPS6182241A publication Critical patent/JPS6182241A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To decrease the number of loops over a boundary of a procedure block, and to decrease a load instruction by dividing into procedure blocks immediately before a loop containing directly a point for division, when a point to be divided to the procedure blocks is in the loop. CONSTITUTION:When executing a procedure block division at a compile time, if the present point is a dividing point, whether it is a loop inlet or not is checked, and if it is the loop inlet, a procedure block (PD) dividing procedure size is cleared by an inlet of a loop containing directly the dividing point, and if it is not the inlet, the PD dividing procedure size is cleared. If the present point is not the dividing point, whether it is the loop inlet or not is checked, and if it is the loop inlet, the inlet name is stacked in a loop state stacker, whether it is a branch instruction or not is checked, and if it is the branch instruction, a branch instruction procedure size is added to the PD dividing procedure size, and if not so, an instruction generating procedure size is added to the PD dividing procedure size. If said dividing point is a loop outlet, the loop state stacker is updated. Said work is continued until the remaining instruction is gone.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、コンパイラ、特にオブジェクト・モジュール
を作成する際に、ループが手続区画(Procedur
e Domain)の境界を跨がらないように設定する
手続区画の分割方式に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention provides a compiler, in particular, when creating an object module, a loop is created as a procedure section.
This relates to a method of dividing procedure sections that is set so as not to straddle the boundaries of e.g.

〔従来技術と問題点〕[Conventional technology and problems]

第5図は従来の手続区画の分割方式を説明するものであ
って、1はデータ部、2は手続き部、OMはオブジェク
ト・モジュール、PI)Tは手続区画テーブル、PDI
ないしPD3は手続区画をそれぞれ示している。オブジ
ェクト・モジュールOMは、データ部1と手続き部2に
分割されている。
FIG. 5 explains the conventional division method of procedure partitions, where 1 is the data division, 2 is the procedure division, OM is the object module, PI)T is the procedure division table, and PDI
PD3 to PD3 respectively indicate procedure sections. The object module OM is divided into a data section 1 and a procedure section 2.

手続き部2は、複数の手続区画PDI、PD2、PD3
・・・に分割されている。従来技術においては、手続区
画PDI、PD2、PD3・・・の大きさは全て同じで
あり、その大きさは4 K (4096)バイトである
。データ部1の中には、手続区画テーブルPDTが存在
している。手続区画テーブルPDTは、手続区画の先頭
番地を記4.aする。手続区画PDiに分岐する場合に
は、 L    Br =A (PDi)       ■B
Cm、   D (0,Br)     ■なる命令が
必要になることがある。■の命令は、手続区画P’Di
の先頭番地をベース・レジスタBrにロードせよという
命令夕あり、■の命令−分岐条件mが成立したときベー
ス・レジスタBrの内容にディスプレイスメン)Dを加
算した番地に分岐せよという命令である。■の手続区画
の先頭番地をロードする命令は、同し手続区画への分岐
が続くうちは最初の一度だけで足りる。しかし、手続区
画の境界近くでは別の手続区画内への分岐と現在の手続
区画内への分岐とが入り混じり、■のロード命令を必要
とする歩頁度が高くなる。特に、手続区画の境界がルー
プの中に存在する場合には、実行回数が多い部分なので
、その影響は大きい。
The procedure section 2 has a plurality of procedure sections PDI, PD2, PD3.
It is divided into... In the prior art, the procedure partitions PDI, PD2, PD3, . . . all have the same size, which is 4K (4096) bytes. In the data section 1, there is a procedure partition table PDT. 4. The procedure section table PDT records the starting address of the procedure section. a. When branching to procedural section PDi, L Br = A (PDi) ■B
An instruction such as Cm, D (0, Br) (2) may be required. ■The instruction in procedural section P'Di
There is an instruction to load the starting address of the base register Br into the base register Br, and an instruction (2) to branch to the address obtained by adding displacement D to the contents of the base register Br when the branch condition m is satisfied. The instruction to load the first address of the procedure section in (2) only needs to be executed once at the beginning while branches to the same procedure section continue. However, near the boundary of a procedure partition, branches into another procedure partition and branches into the current procedure partition are intermingled, and the number of pages requiring the load command (■) becomes high. In particular, if the boundary of a procedure section exists within a loop, this has a large effect because it is a part that is executed many times.

ループが1個の手続区画の中に入ってしまえば、■のロ
ート命令を可成り減らずことが出来、効率の良いオブジ
ェクト・モジュールを作成することが出来る。
If the loop is placed in one procedure section, the number of rotary instructions in (1) can be reduced considerably, and an efficient object module can be created.

〔発明の目的〕[Purpose of the invention]

本発明は、上記の考察に基づくものであって、手続区画
の先頭番地をベース・レジスタにロードする命令の実行
回数を減少できるように手続区画を定める手続区画の分
割方式を提供することを目的としている。
The present invention is based on the above consideration, and an object of the present invention is to provide a procedure partition division method that defines procedure partitions so as to reduce the number of executions of an instruction that loads the start address of a procedure partition into a base register. It is said that

[目的を達成−づるための構成〕 そしてそのため゛、本発明の手続区画の分割方式は、手
続き部が複数の手続区画に分割されたオブジェク1−・
モジュールを生成するコンパイラにおいて、手続区画の
分割を行う手続区画分割装置と、ループ中の手続区画分
割装置とを設i:L、 、、、lz記手続区画分割装置
は、手続区画の分割を行うときの地点がループ内であれ
ば、上記ループ中の手続区画制御装置に制御を渡し、上
記ループ中の手続区画制御装置は、制御が渡されたとき
、ループを意識しなから手続区画の分割を行うことを特
徴とするものである。
[Configuration for Achieving the Purpose] And for this reason, the method of dividing procedure sections of the present invention allows objects 1-...
In the compiler that generates the module, a procedure partition division device that divides procedure partitions and a procedure partition division device in the loop are installed.The procedure partition division device divides procedure partitions. If the current point is within a loop, control is passed to the procedural partition controller in the loop, and when control is passed, the procedural partition controller in the loop divides the procedural partition without being aware of the loop. It is characterized by performing the following.

〔発明の実施例〕[Embodiments of the invention]

要約すると、本発明は、手続区画に分割しようとする地
点かループの中にあるとき(J、その点を直接に含むル
ープの直ni7て手続区画に分割するものである。ただ
し、ループの直前で分割した後、再び分割しなければな
らなくなったときは、その地点で分割する。
To summarize, the present invention is such that when a point to be divided into a procedural section is inside a loop (J, the point is immediately divided into a procedural section immediately after the loop that directly contains that point. If you need to split again after splitting at that point, split at that point.

第1図はコンパイラの概要を示す図である。コンパイラ
3は、ソースプログラムの入力、構文解析、意味付け、
最適化、レジスタ割付及びオブジェクト生成という処理
を行う。最適化処理を完了する時点までに、ループに関
する情報を格納するループ表などが作成される。本発明
は第1図のオブジェクト生成処理に関係するものである
FIG. 1 is a diagram showing an overview of the compiler. The compiler 3 inputs the source program, parses it, gives it meaning,
Performs optimization, register allocation, and object generation. By the time the optimization process is completed, a loop table, etc. that stores information about loops is created. The present invention relates to the object generation process shown in FIG.

第2図は本発明を実施するための装置の機能ブロック図
である。第2図において、3はオブジェクト生成装置、
4はPD(手続区画)分割装置、5はループ中のPD分
割装置、6は分岐命令生成装置をそれぞれ示している。
FIG. 2 is a functional block diagram of an apparatus for implementing the present invention. In FIG. 2, 3 is an object generation device;
Reference numeral 4 indicates a PD (procedure partition) dividing device, 5 a PD dividing device in a loop, and 6 a branch instruction generating device.

手続き部2を手続区画に分割する処理は、PD分割装置
4が行うが、手続区画に分割する地点がループ内であれ
ば、PD分割装置4からループ中のPD分割装置5に制
御が渡る。ループ中のPD分割装置5は、ループを意識
しながら手続区画の分割を行う。
The process of dividing the procedure section 2 into procedure sections is performed by the PD division device 4, but if the point at which the procedure section 2 is divided into procedure sections is within a loop, control is passed from the PD division device 4 to the PD division device 5 in the loop. The PD dividing device 5 in the loop divides the procedure sections while being aware of the loop.

第3図は第2図のシステムで行われる処理の流れを示す
図である。
FIG. 3 is a diagram showing the flow of processing performed in the system of FIG. 2.

■ 手続区画の分割地点であるか否かを調べる。■ Check whether it is a division point of the procedure section.

Yesのときは[相]の処理を行い、Noのときは■の
処理を行う。
When Yes, process [phase] is performed, and when No, process ■ is performed.

■ ループの入口か否かを調べる。Yesのときは■の
処理を行い、N’oのときは■の処理を行う。
■ Check whether it is the entrance of a loop. If Yes, process ``■'' is performed, and if N'o, process ``■'' is performed.

■ ループ状況スタッカに入口階(ラヘル)をスタック
する。
■ Stack the entrance floor (Rahel) in the loop status stacker.

■ 分岐命令か否かを調べる。Yesのときは■の処理
を行い、Noのときは■の処理を行う。
■ Check whether it is a branch instruction. If Yes, process (2) is performed, and if No, process (2) is performed.

■ 分岐命令手続サイズをPD分割手続サイズに加算す
る。この処理は、分岐命令生成装置6で行われる。
■ Add the branch instruction procedure size to the PD split procedure size. This processing is performed by the branch instruction generation device 6.

■ 命令生成手続サイズをPD分割手続サイズに加算す
る。
■ Add the instruction generation procedure size to the PD division procedure size.

■ ループの出口か否かを調べる。Yesのときは■の
処理を行い、Noのときは■の処理を行う。
■ Check whether it is the exit of the loop. If Yes, process (2) is performed, and if No, process (2) is performed.

■ ループ状況スタッカを更新する。■ Update the loop status stacker.

■ 残りの命令があるか否かを調べる。Noのときは終
りとし、Yesのときは■に戻る。
■ Check to see if there are any remaining instructions. If the answer is No, it is the end, and if the answer is Yes, go back to ■.

[相] ループ中か否かを調べる。Yesのときは0の
処理を行い、NOのときは■の処理を行う。
[Phase] Check whether it is in a loop. If YES, process 0 is performed, and if NO, process 2 is performed.

OPD分割手続サイズをクリアする。@120の処理は
PD分割装置4で行われる。
Clear OPD split procedure size. The process @120 is performed by the PD dividing device 4.

@ 分割地点を直接食むループの入口でPD分割手続サ
イズをクリアする。
@ Clear the PD split procedure size at the entrance of the loop that directly eats the split point.

0 分割地点以降初期分割地点までの再オブジェクトを
生成する。@、0の処理はループ中の分割装置5で行わ
れる。
0 Re-generate objects from the division point to the initial division point. The processing of @ and 0 is performed by the dividing device 5 in a loop.

第4図はループ状況スタッカの内容の変化を説明するも
のである。図示のような二重ループを考える。■の命令
を処理するとき、ループ状況スタッカ7に先頭位置■を
設定する。この状態は(ロ)に示される。■の命令を処
理するとき、ループ状況スタッカ7に先頭位置■を設定
する。この状態は(ハ)に示される。■の命令を処理す
るとき、ループ状況スタッカ7から■を削除する。■で
手続区画を分割しなければならないとき、この地点がル
ープの中に含まれていること及びそのループの入口が■
てあろごとがループ状況スタ・7カ7から判る。したか
って、■でム4゛なく、■で分割できる。■及び■がル
ープの入「1であること並びに■及び■かループの出「
1であることし4、ループ表に示されている。
FIG. 4 explains changes in the contents of the loop status stacker. Consider a double loop as shown. When processing the instruction (2), the start position (2) is set in the loop status stacker 7. This state is shown in (b). When processing the instruction (2), the start position (2) is set in the loop status stacker 7. This state is shown in (c). When processing the instruction ``■'', ``■'' is deleted from the loop status stacker 7. When a procedure section must be divided at ■, this point is included in a loop and the entrance of that loop is ■
You can find out the details from the loop status star 7ka7. If you want, you can divide it by ■ instead of using ■. ■ and ■ are loop inputs ``1'' and ■ and ■ are loop exits ``1''.
1 and 4, as shown in the loop table.

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

jソーl−の説明から明らかなように、本発明によれば
、手続区画の境界をA:たかるループの数を従来方式よ
り減らずことか出来るので、ロート命令の実行回数を減
らずことか出来、実行性能のよいオフシlりl・・モジ
1−ルを作成することができる。
As is clear from the explanation of the above, according to the present invention, it is possible to set the boundaries of procedure partitions without reducing the number of loops compared to the conventional method. It is possible to create off-series modules with good execution performance.

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

第1図はコンパイラの概要を示す図、第2図は本発明を
実施するための装置の概要を示す機能ブロック図、第3
図は第2図のシステムで行われる処理の流れを示す図、
第4図はループ状況スタッカの内容の変化を説明する図
、第5図しJ従来の手続区画の分割を説明する図である
。 1・・テーク部、2・・手続き部、3・・・オソジLク
ト生成装置、4・・・PD分割装置、5・・・ループ中
のPD分割装置、6・・・分岐命令生成装置。
FIG. 1 is a diagram showing an overview of a compiler, FIG. 2 is a functional block diagram showing an overview of a device for implementing the present invention, and FIG.
The figure shows the flow of processing performed in the system in Figure 2.
FIG. 4 is a diagram for explaining changes in the contents of the loop status stacker, and FIGS. 5 and 5 are diagrams for explaining the division of conventional procedure sections. DESCRIPTION OF SYMBOLS 1... Take unit, 2... Procedure unit, 3... Original L command generation device, 4... PD division device, 5... PD division device in loop, 6... Branch instruction generation device.

Claims (1)

【特許請求の範囲】[Claims] 手続き部が複数の手続区画に分割されたオブジェクト・
モジュールを生成するコンパイラにおいて、手続区画の
分割を行う手続区画分割装置と、ループ中の手続区画分
割装置とを設け、上記手続区画分割装置は、手続区画の
分割を行うときの地点がループ内であれば、上記ループ
中の手続区画制御装置に制御を渡し、上記ループ中の手
続区画制御装置は、制御が渡されたとき、ループを意識
しながら手続区画の分割を行うことを特徴とする手続区
画の分割方式。
Objects whose procedure division is divided into multiple procedure sections
A compiler that generates a module is provided with a procedure partition division device that divides procedure partitions and a procedure partition division device in a loop, and the procedure partition division device has a procedure partition division device that divides a procedure partition when the point at which the procedure partition is divided is within the loop. If so, control is passed to a procedure partition control device in the loop, and the procedure partition control device in the loop divides the procedure partitions while being aware of the loop when control is passed. Division division method.
JP17977784A 1984-08-29 1984-08-29 Dividing system of procedure block Pending JPS6182241A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17977784A JPS6182241A (en) 1984-08-29 1984-08-29 Dividing system of procedure block

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17977784A JPS6182241A (en) 1984-08-29 1984-08-29 Dividing system of procedure block

Publications (1)

Publication Number Publication Date
JPS6182241A true JPS6182241A (en) 1986-04-25

Family

ID=16071705

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17977784A Pending JPS6182241A (en) 1984-08-29 1984-08-29 Dividing system of procedure block

Country Status (1)

Country Link
JP (1) JPS6182241A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009211491A (en) * 2008-03-05 2009-09-17 Oki Semiconductor Co Ltd Program preparation method and device therefor

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5852752A (en) * 1981-09-24 1983-03-29 Fujitsu Ltd Section decision system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5852752A (en) * 1981-09-24 1983-03-29 Fujitsu Ltd Section decision system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009211491A (en) * 2008-03-05 2009-09-17 Oki Semiconductor Co Ltd Program preparation method and device therefor

Similar Documents

Publication Publication Date Title
JPS6182241A (en) Dividing system of procedure block
JPS6314241A (en) Memory expansion system
JPS63308641A (en) Data processor having pipeline processing mechanism
JPH01195562A (en) Control system for allocation of input/output device
JP2590872B2 (en) Task scheduling method
JPH0581342A (en) Data processor
JP2663600B2 (en) Control table relocation processing method
JPS6155739A (en) Decision of procedure block size
JPH01292536A (en) Emulator for dealing with plural operation systems
JPS63163636A (en) Executing system for parallel processing
JPH0922363A (en) Task constituting system
JPH0281239A (en) File shared control system for virtual machine system
JPH01169552A (en) Extended storage transfer control system
JPS5960677A (en) Simulation system for enterprise model
JPS6155752A (en) Control of expanded memory device
JPH04286031A (en) Parallel execution processing method for loop of program
JPH0293936A (en) Parallel execution system for production system
JPS63241641A (en) Input/output control system in virtual computer system
JPS60231252A (en) Unit processor
JPS62231371A (en) Control system for start-up/stop of multiprocessor
JPH02181831A (en) Program control method
JPH0268650A (en) Extended storage transfer control system
JPH03223980A (en) Computer system
JPH0337719A (en) System for expanding master file on main storage device
JPS6159540A (en) Dispatching processing system