JP3175768B2 - Composite instruction scheduling processor - Google Patents

Composite instruction scheduling processor

Info

Publication number
JP3175768B2
JP3175768B2 JP16108690A JP16108690A JP3175768B2 JP 3175768 B2 JP3175768 B2 JP 3175768B2 JP 16108690 A JP16108690 A JP 16108690A JP 16108690 A JP16108690 A JP 16108690A JP 3175768 B2 JP3175768 B2 JP 3175768B2
Authority
JP
Japan
Prior art keywords
instruction
operations
composite
data
compound
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.)
Expired - Fee Related
Application number
JP16108690A
Other languages
Japanese (ja)
Other versions
JPH0451328A (en
Inventor
正和 林
政昭 滝内
拡二 堀田
照洋 渡辺
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 JP16108690A priority Critical patent/JP3175768B2/en
Publication of JPH0451328A publication Critical patent/JPH0451328A/en
Application granted granted Critical
Publication of JP3175768B2 publication Critical patent/JP3175768B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は,同時発信の単位となる命令中に複数のオペ
レーションが格納される複合型命令におけるオペレーシ
ョンの組み合わせおよび配置位置を決定する複合型命令
スケジューリング処理装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention relates to a composite instruction for determining a combination and an arrangement position of operations in a composite instruction in which a plurality of operations are stored in an instruction serving as a unit of simultaneous transmission. The present invention relates to a scheduling processing device.

〔従来の技術〕[Conventional technology]

第10図は本発明の課題を説明するための複合型命令の
例を示す。
FIG. 10 shows an example of a compound instruction for explaining the problem of the present invention.

複数個の演算ユニットを備え,いくつかの命令を組み
合わせた複合型命令を,同時発信して,並列に実行させ
ることにより,命令実行の高速化を図った計算機が考え
られている。第10図は,その複合型命令の例であって,9
6ビット長の複合型命令の中に,それぞれ32ビット長の
3個の命令を格納できるようになっている。以下,複合
型命令の中に格納されている個々の命令を,“オペレー
ション”という。
A computer that has a plurality of operation units and simultaneously issues a composite instruction in which several instructions are combined and executes the instructions in parallel to increase the speed of instruction execution has been considered. Figure 10 shows an example of the compound instruction.
Each of the 6-bit complex instructions can store three 32-bit instructions. Hereinafter, each instruction stored in the compound instruction is referred to as an “operation”.

このオペレーションを複合型命令の並びの中にどう配
置するかによって,その実行性能が変わってくることに
なるが,従来,オペレーションを配置する命令スケジュ
ーリングの処理について,効率のよい方式が確立されて
いなかった。
How this operation is arranged in a sequence of compound instructions will affect its execution performance. However, an efficient method has not yet been established for the instruction scheduling processing for allocating operations. Was.

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

複合型命令アーキテクチャの命令スケジューリング時
には,以下の点を考慮する必要がある。
At the time of instruction scheduling of the hybrid instruction architecture, the following points must be considered.

(1) 各オペレーションは,それぞれ実行時間が異な
る。すなわち,実行に要するマシンクロック数が異な
る。
(1) Each operation has a different execution time. That is, the number of machine clocks required for execution is different.

(2) オペレーションの組み合わせや,オペレーショ
ンを複合型命令のどの位置に置くかということには,制
限がある。
(2) There are restrictions on the combination of operations and where to place operations in a compound instruction.

これらの点を考慮して,最短時間で実行できる複合型
命令を作成するとともに,できるだけ少ない複合型命令
数で,所望する処理を実現できるようにすることが望ま
れる。
In consideration of these points, it is desired to create a composite instruction that can be executed in the shortest time and to realize a desired process with the minimum number of composite instructions.

本発明は上記問題点の解決を図り,実行性能のよい複
合型命令を効率的に作成できるようにすることを目的と
している。
SUMMARY OF THE INVENTION It is an object of the present invention to solve the above problems and to efficiently create a composite instruction having good execution performance.

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

第1図は本発明の原理説明図である。 FIG. 1 is a diagram illustrating the principle of the present invention.

第1図において,10はCPUおよびメモリなどを備えたデ
ータ処理装置,11は個々のオペレーションの並びを記憶
するオペレーション列記憶部,12はデータ依存グラフを
作成するデータ依存解析処理部,13はデータ依存グラフ
を解析し,優先順位に従ってグラフの並び換えを行う優
先順位決定処理部,14はオペレーションの配置位置を決
定し,複合型命令を作成する複合型命令作成処理部,15
は各オペレーションで扱うデータの定義/参照関係を示
すデータ依存グラフ,16は作成した複合型命令を格納す
る複合型命令格納部を表す。
In FIG. 1, reference numeral 10 denotes a data processing device having a CPU, a memory, and the like; 11, an operation sequence storage unit for storing a sequence of individual operations; 12, a data dependence analysis processing unit for creating a data dependence graph; A priority order determination processing unit that analyzes the dependency graph and rearranges the graph according to the priority order; 14 determines a placement position of the operation, and generates a composite instruction generation processing unit;
Denotes a data dependency graph indicating the definition / reference relationship of data handled in each operation, and 16 denotes a composite instruction storage unit for storing the prepared composite instruction.

オペレーション列記憶部11は,例えば既存のコンパイ
ラが出力したアセンブラ言語相当の命令列からなる直線
的なオペレーションの並びを記憶する。
The operation sequence storage unit 11 stores, for example, a linear operation sequence composed of an instruction sequence equivalent to the assembler language output by an existing compiler.

本発明は,このオペレーション列記憶部11に記憶され
ているオペレーション列から,最適な複合命令列を作成
する技術を提供するものである。
The present invention provides a technique for creating an optimal compound instruction sequence from the operation sequence stored in the operation sequence storage unit 11.

データ依存解析処理部12は,各オペレーションi1,i2,
…間のデータ依存関係,すなわち,定義/参照関係を解
析し,データ依存グラフ15を作成する。
The data dependence analysis processing unit 12 performs each operation i1, i2,
Analyze the data dependencies between..., That is, define / reference relationships, and create a data dependency graph 15.

優先順位決定処理部13は,データ依存グラフ15をもと
に,命令終了可能時間や命令発信可能時間などのいくつ
かの基準によりオペレーションの優先順位を決定し,デ
ータ依存グラフ15におけるオペレーションの並び換えを
行う。
The priority order determination processing unit 13 determines the priority order of operations based on the data dependency graph 15 based on several criteria such as an instruction end time and an instruction dispatch time, and rearranges the operations in the data dependency graph 15. I do.

複合型命令作成処理部14は,優先順位決定処理部13が
決定したオペレーションの優先順位に従って,各オペレ
ーションを複合型命令に配置し,複合型命令格納部16に
格納する。
The composite instruction creation processing unit 14 places each operation in a composite instruction according to the priority of the operation determined by the priority determination processing unit 13 and stores the operation in the composite instruction storage unit 16.

〔作用〕[Action]

オペレーションi2が,オペレーションi1の定義したデ
ータを参照し,オペレーションi5が,オペレーションi3
およびオペレーションi4の定義したデータを参照し,…
…というように,各オペレーション間にデータの定義/
参照の依存関係がある場合,データ依存解析処理部12
は,これを解析して第1図に示すようなデータ依存グラ
フ15を作成する。なお,データ依存グラフ15は,各オペ
レーションを示す制御表と,それらの制御表間のポイン
タによって実現される。
Operation i2 refers to the data defined by operation i1, and operation i5
And the data defined in operation i4, and ...
… And so on between data definitions /
If there is a reference dependency, the data dependency analysis processing unit 12
Analyzes this to create a data dependency graph 15 as shown in FIG. The data dependency graph 15 is realized by control tables indicating operations and pointers between the control tables.

このデータ依存グラフ15を参考にすることにより,ど
のオペレーションを先に実行させなければならないかが
わかる。また,各オペレーションの実行可能な時間を考
慮することにより,最短時間で実行できる基準を求める
ことができる。
By referring to the data dependency graph 15, it is possible to determine which operation must be executed first. In addition, by taking into account the time during which each operation can be executed, it is possible to obtain a standard that can be executed in the shortest time.

特に,この基準として,命令発信可能時間を考慮する
ことにより,定義/参照関係の逆転を防ぎ,また,命令
終了可能時間を考慮することにより,全体の終了時間を
早くすることができる。
In particular, as a criterion, the inversion of the definition / reference relationship can be prevented by taking into account the instruction transmission possible time, and the overall end time can be shortened by considering the instruction termination possible time.

複合型命令作成処理部14は,優先順位決定処理部13の
結果をもとに,オペレーションの組み合わせとして正し
いか否かの判定を行いながら,各オペレーションを複合
型命令中に配置していく。
The composite instruction creation processing unit 14 arranges each operation in the composite instruction while determining whether or not the combination of the operations is correct based on the result of the priority order determination processing unit 13.

第1図に示す例では,1番目の複合型命令I1にオペレー
ションi1,i3,i4が配置され,2番目の複合型命令I2にオペ
レーションi2,i5,i7が配置され,…というように,複合
型命令が作成されている。
In the example shown in FIG. 1, operations i1, i3, and i4 are arranged in the first composite instruction I1, operations i2, i5, and i7 are arranged in the second composite instruction I2, and so on. Type instructions have been created.

〔実施例〕〔Example〕

第2図は本発明により作成する複合型命令を実行する
複合型命令計算機の例,第3図は本発明の適用例,第4
図は本発明の実施例を説明するためのオペレーションの
並びの例,第5図は本発明の実施例に係るデータ依存グ
ラフの例,第6図は本発明の実施例で用いるデータ依存
グラフの節点のデータ構造,第7図は本発明の実施例で
用いる辞書のデータ構造,第8図は本発明の実施例に係
る優先順位の基準の例,第9図は本発明の一実施例処理
フローを示す。
FIG. 2 is an example of a compound instruction computer for executing a compound instruction created according to the present invention, and FIG. 3 is an application example of the present invention.
FIG. 5 shows an example of a sequence of operations for explaining the embodiment of the present invention, FIG. 5 shows an example of a data dependency graph according to the embodiment of the present invention, and FIG. 6 shows a data dependency graph used in the embodiment of the present invention. FIG. 7 shows a data structure of a dictionary used in the embodiment of the present invention, FIG. 8 shows an example of a priority standard according to the embodiment of the present invention, and FIG. 9 shows a process of an embodiment of the present invention. Shows the flow.

本発明は,例えば第2図に示す複合型命令計算機20で
実行する複合型命令の列を作成するものである。この複
合型命令計算機20は,2つの整数演算ユニット22,23と,
浮動小数点加算ユニット24と,浮動小数点乗算ユニット
25の4つの演算ユニットを備えている。これらの各演算
ユニットは,並列に動作可能である。
In the present invention, for example, a sequence of compound instructions to be executed by the compound instruction computer 20 shown in FIG. 2 is created. This composite instruction computer 20 has two integer operation units 22 and 23,
Floating point addition unit 24 and floating point multiplication unit
It has 25 operation units. Each of these arithmetic units can operate in parallel.

複合型命令は,図示省略した主記憶からフェッチさ
れ,複合型合命令レジスタ21に逐次セットされる。この
例では,1つの複合型命令内に,最大3つのオペレーショ
ンが入るようになっており,3オペレーションが同時に発
信されて,該当する整数演算ユニット22,23,浮動小数点
加算ユニット24,浮動小数点乗算ユニット25を動作させ
るようになっている。
The composite instruction is fetched from the main memory (not shown) and is sequentially set in the composite instruction register 21. In this example, a maximum of three operations are included in one compound instruction. The three operations are transmitted simultaneously, and the corresponding integer operation units 22, 23, floating-point addition unit 24, floating-point multiplication The unit 25 is operated.

各ユニットは,それぞれ1つのオペレーションだけを
実行できるので,複合型命令の中で組み合わせることの
できるオペレーションは,以下のようなものである。こ
こで, I:整数(Integer)系オペレーション(LOAD/STORE系を
含む) F:浮動小数点(Floating)系オペレーション B:分岐系オペレーション とする。
Since each unit can execute only one operation, the operations that can be combined in the compound instruction are as follows. Here, I: Integer operation (including LOAD / STORE) F: Floating operation B: Branch operation

B→1個と,I→2個。 B → 1 and I → 2.

B→1個と,I→1個と,F→1個。 B → 1 piece, I → 1 piece, F → 1 piece.

B→1個と,F→2個。 B → 1 and F → 2.

I→2個と,F→1個。 I → 2 and F → 1.

I→1個と,F→2個。 I → 1 and F → 2.

第3図は,以上のような複合型命令計算機20で実行す
る複合型命令を出力するコンパイラ30の構成例を示して
いる。
FIG. 3 shows an example of the configuration of a compiler 30 that outputs a compound instruction executed by the compound instruction computer 20 as described above.

コンパイラ30における処理フェーズ(a)〜(f)
は,従来の通常のコンパイラと同様である。すなわち,
以下の処理を行う。
Processing phases (a) to (f) in compiler 30
Is similar to a conventional ordinary compiler. That is,
The following processing is performed.

(a) ソースプログラムを入力して,構文解析を行
う。
(A) Input a source program and perform syntax analysis.

(b) 構文解析結果をもとに,意味解析を行う。(B) Perform semantic analysis based on the syntax analysis results.

(c) データの割付けを行う。(C) Allocate data.

(d) 処理論理の変更やデータ型の変更などの最適化
を行う。
(D) Optimization such as a change in processing logic or a change in data type is performed.

(e) レジスタの割付けを行う。(E) Allocate registers.

(f) アセンブラ言語レベルのコード生成を行う。(F) Generate code at the assembler language level.

本発明は,その次の処理フェーズ(g)に関連してお
り,コード生成フェーズ(f)の出力を,実行順に羅列
されたオペレーション列とみて,命令スケジューリング
を行う。その結果,複合型命令を作成する。
The present invention relates to the next processing phase (g), and performs instruction scheduling by regarding the output of the code generation phase (f) as an operation sequence listed in the order of execution. As a result, a compound instruction is created.

以下,具体例に従って,本発明の実施例を説明する。 Hereinafter, embodiments of the present invention will be described according to specific examples.

例えば,第4図に示すようなオペレーション〜の
並びから,第2図に示す複合型計算機20で実行する複合
型命令を作成するものとする。
For example, it is assumed that a composite instruction to be executed by the composite computer 20 shown in FIG. 2 is created from the sequence of operations shown in FIG.

第4図に示すオペレーションは,それぞれ次のような
機能を持つ。
The operations shown in FIG. 4 have the following functions.

なお,fpr1〜fpr5は浮動小数点レジスタを示し,S,b
(i),a(i)等は変数を示す。
Note that fpr1 to fpr5 indicate floating-point registers, and S, b
(I), a (i) and the like indicate variables.

(1) fload x,r1 浮動小数点変数xの値を,レジスタr1にロードする。(1) fload x, r1 Loads the value of floating-point variable x into register r1.

(2) fstore r1,x レジスタr1内の浮動小数点の値を,変数xにストアす
る。
(2) fstore r1, x Store the floating point value in register r1 in variable x.

(3) fmult r1,r2,r3 レジスタr1とレジスタr2内の浮動小数点を乗算し,結
果をレジスタr3に格納する。
(3) fmult r1, r2, r3 Multiplies the register r1 by the floating point in the register r2 and stores the result in the register r3.

(4) fadd r1,r2,r3 レジスタr1とレジスタr2内の浮動小数点を加算し,結
果をレジスタr3に格納する。
(4) fadd r1, r2, r3 Add the floating point in register r1 to the register r2 and store the result in register r3.

本発明に係る命令スケジューリングでは,第4図に示
すようなオペレーションの並びを入力して,以下のよう
な処理を行う。
In the instruction scheduling according to the present invention, the following processing is performed by inputting a sequence of operations as shown in FIG.

(i)データ依存グラフの作成 入力された各オペレーションを節点とし,そこから,
そのオペレーションのオペランドを定義している節点お
よび実行順序を変更できない(その命令を追い抜いて実
行できない)節点に対して,連鎖および逆連鎖をはる。
(I) Creation of data dependency graph Each input operation is set as a node, and from there,
Chain and reverse chain the nodes defining the operands of the operation and nodes whose execution order cannot be changed (the instruction cannot be overtaken and executed).

第5図は,第4図に示すオペレーションの並びから作
成したデータ依存グラフの例である。第5図に示す矢印
は定義連鎖であり,この矢印の逆は参照連鎖となる。例
えばのオペレーションでは,fpr1,fpr2を参照してお
り,このfpr1,fpr2を定義しているオペレーションは
,であることから,からおよびへの定義連鎖
がはられることになる。
FIG. 5 is an example of a data dependency graph created from the sequence of operations shown in FIG. The arrow shown in FIG. 5 is a definition chain, and the reverse of this arrow is a reference chain. For example, the operation refers to fpr1 and fpr2, and since the operation defining fpr1 and fpr2 is, the definition chain from to and from is performed.

この節点の情報は,例えば第6図に示すようなデータ
構造によって管理される。ここで,各要素は,以下の内
容である。
The information of this node is managed by a data structure as shown in FIG. 6, for example. Here, each element has the following contents.

命令列 :入力オペレーションを指す。Instruction sequence: Refers to an input operation.

節点番号:入力順のオペレーションの番号。Node number: The number of the operation in the input order.

定義連鎖:このオペレーションが利用しているオペレー
ションへの連鎖(すなわち,このオペレーションより以
前に実行されていなければならないオペレーションへの
連鎖)。
Definition chain: A chain to the operation that this operation is using (ie, a chain to an operation that must have been executed before this operation).

参照連鎖:このオペレーションの結果を利用しているオ
ペレーションへの連鎖。
Reference chain: a chain to the operation that is using the result of this operation.

FINISH :節点を並び換える基準値。FINISH: Reference value for sorting nodes.

DISPATCH:節点を並び換える第2の基準値。DISPATCH: Second reference value for reordering nodes.

オペランドの定義/参照は,各オペレーションに出現
するオペランドを,第7図に示すようなデータ構造を持
つ「辞書」に登録し,オペランドの出現ごとに,この辞
書の参照・更新・登録を行っていくことにより,調べる
ことができる。
Operand definition / reference is performed by registering operands appearing in each operation in a “dictionary” having a data structure as shown in FIG. 7, and referencing / updating / registering this dictionary every time an operand appears. By going, you can find out.

本実施例では,検索の高速化のため,この辞書を2分
木構造で管理するようにしており,オペランドのアルフ
ァベット順で,前方のものを左の子供,後方のものを右
の子供とするポインタで管理する。子供となるオペラン
ドがない場合,DICTIONARYの要素は,空ポインタであ
る。
In this embodiment, in order to speed up the search, this dictionary is managed in a binary tree structure. In the alphabetical order of the operands, the front one is the left child and the rear one is the right child. Manage with pointers. If no operand is a child, the DICTIONARY element is an empty pointer.

オペランドの種類は,浮動小数点レジスタ番号,汎用
レジスタ番号,変数名または定数名の種類を示すもので
ある。
The type of the operand indicates the type of the floating-point register number, general-purpose register number, variable name or constant name.

(ii)データ依存グラフの解析 データ依存グラフが完成したならば,そのグラフをも
とに,命令を選択するための優先順位の基準を計算す
る。
(Ii) Analysis of Data Dependence Graph When the data dependence graph is completed, a criterion of priority for selecting an instruction is calculated based on the graph.

データ依存グラフは,前述のように各節点(オペレー
ションの定義/参照関係を示したものといえる。
As described above, the data dependency graph indicates each node (operation definition / reference relationship).

2節点u,vの間に,v→uの関係がある(節点vの定義
連鎖が節点uを指している)ということは,vの実行はu
の実行が完了するまで待たなければならないことを意味
する。これはuの実行がtτ(τはマシンサイクル)か
かるとすれば,vの実行は,uの開始後tτ後に実行される
ということである。
The fact that there is a relationship v → u between two nodes u and v (the definition chain of node v points to node u) means that execution of v is u
Means that you have to wait until the execution is complete. This means that if the execution of u takes tτ (τ is a machine cycle), the execution of v will be executed tτ after the start of u.

このように,定義連鎖でつながれている節点の間に
は,「優先権」が存在する。この優先権を考慮したスケ
ジュールを行わなければならない。また,いくつかの実
行可能なオペレーションがあった場合に,実行の終了に
長時間かかるオペレーションを優先的に実行させたほう
が,効率よくスケジュールすることができる。そのた
め,命令終了可能時間を示すFINISHと,命令発信可能時
間を示すDISPATCHの2つの以下の基準を用いる。
Thus, "priority" exists between the nodes connected by the definition chain. The schedule must take this priority into account. In addition, when there are some executable operations, it is possible to schedule efficiently by giving priority to the operations that take a long time to finish the execution. Therefore, the following two criteria, FINISH, which indicates the time at which the command can be completed, and DISPATCH, which indicates the time at which the command can be transmitted, are used.

FINISH 命令終了可能時間を示す基準をFINISHといい,以下の
式で計算する。FINISH値が大きいほど,早く発信させる
必要がある。
The criterion that indicates the time at which the FINISH instruction can be completed is called FINISH and is calculated using the following formula. The higher the FINISH value, the sooner it needs to be transmitted.

{v|v→u}→:定義連鎖 ここで,EXEC(x)は,節点xのオペレーションを実
行するのに必要のするマシンサイクル数である。
{V | v → u} →: definition chain Here, EXEC (x) is the number of machine cycles required to execute the operation of node x.

DISPATCH DISPATCH(v)は,オペレーションvがその演算ユニ
ットに発信される最短のマシンサイクル時を示したもの
である。
DISPATCH DISPATCH (v) indicates the shortest machine cycle when operation v is transmitted to the operation unit.

各オペレーションが実行される演算ユニットが空き状
態で,キャッシュミスやTLBヒットミスなどがない通常
状態であれば,そのオペレーションの実行時間は,ハー
ドウェアによって決まっている。
If the operation unit in which each operation is executed is in an empty state and there is no cache miss or TLB hit miss in a normal state, the execution time of the operation is determined by hardware.

したがって,DISPATCH(v)は計算可能であり,以下
の式により計算される。DISPATCH値が小さい方ほど,早
く発信させなければならない。
Therefore, DISPATCH (v) can be calculated and is calculated by the following equation. The smaller the DISPATCH value, the sooner you must send.

第8図(イ)は,第5図に示すデータ依存グラフにつ
いて,以上の式により計算した各節点のFINISH値(FI)
を示しており,第8図(ロ)は,DISPATCH値(DI)を示
している。なお,この例では,オペレーションの実行時
間を次のように仮定している。
Fig. 8 (a) shows the FINISH value (FI) of each node calculated by the above formula for the data dependence graph shown in Fig. 5.
FIG. 8 (b) shows the DISPATCH value (DI). In this example, the execution time of the operation is assumed as follows.

fload/fstoreの実行時間→1τ fmult の実行時間 →4τ fadd の実行時間 →3τ (iii)節点の並び換え グラフの解析により求めたFINISHとDISPATCHとをもと
に,節点を並び換える。本実施例での並び換えの基準
は,優先度の高いものから以下の通りとしている。
fload / fstore execution time → 1τ fmult execution time → 4τ fadd execution time → 3τ (iii) Sorting nodes Sort nodes based on FINISH and DISPATCH obtained by graph analysis. In this embodiment, the rearrangement criteria are as follows, starting from the one with the highest priority.

FINISH値の小さい順番 FINISH値が等しい場合には,DISPATCH値の小さい順
番 FINISHもDISPATCHも等しい場合には,入力の順番 (iv)複合型命令の作成 優先順位に従って並べ換えた節点の順番に,以下の
(a)〜(c)の要領で複合型命令を作成する。
Smallest order of FINISH values If FINISH values are equal, small order of DISPATCH values. If FINISH and DISPATCH are equal, input order. (Iv) Creation of compound instruction. A composite instruction is created in the manner of (a) to (c).

(a) まず,オペレーションvを格納すべき複合型命
令を探す。探すときの出発点は, 複合型命令の基点, vを定義している節点uが格納されている命令の位
置, vと同じ演算ユニットを使用するもので,vより前に
発信されたオペレーションuが格納されている命令の位
置,のうち,複合型命令の基点から一番遠い命令, すなわち一番遅く発信される命令である。
(A) First, a composite type instruction to store the operation v is searched. The starting point for searching is the base point of the compound instruction, the position of the instruction where the node u defining v is stored, and using the same arithmetic unit as v, and the operation u issued before v Is the instruction farthest from the starting point of the compound instruction, that is, the instruction that is sent the latest among the positions of the instructions in which is stored.

(b) 出発点から複合型命令Iをたどり,節点vが命
令Iの中に組み合わせ的に格納できるかを調べる。もし
格納できる場合には,複合型命令Iの中にvを組み入れ
る。格納できない場合には,複合型命令Iの次の命令に
ついて同じことを行う。
(B) Trace the composite instruction I from the starting point and check whether the node v can be stored in combination in the instruction I. If it can be stored, v is incorporated in the compound instruction I. If it cannot be stored, the same operation is performed for the instruction following the compound instruction I.

節点vが,命令Iの中に格納できる条件は, i)命令Iの中にオペレーションを入れる余裕がある
(3オペレーションすべてが埋まっているわけではな
い), ii)3オペレーションの組み合わせが,ハードウェア
的に許されるものである, という条件である。このii)の条件は,演算の組み合わ
せについてのテーブルを作成しておけば,容易にチェッ
クできる。
The conditions under which the node v can be stored in the instruction I are as follows: i) there is room to put an operation in the instruction I (not all three operations are buried); ii) the combination of the three operations is hardware. The condition is that it is legally allowed. The condition of ii) can be easily checked by preparing a table for a combination of operations.

(c) 処理(b)の途中で,命令Iが3オペレーショ
ンで埋まったときは,新しく複合型命令を作成し,その
中にvを組み込む。
(C) If the instruction I is filled by three operations during the processing (b), a new composite instruction is created and v is incorporated therein.

以上の処理(a)〜(c)が終了したとき,複合型命
令の基点から順にたどったものが,求める複合型命令例
となる。
When the above-described processes (a) to (c) are completed, an example of the composite instruction to be obtained is sequentially obtained from the base point of the composite instruction.

第9図は,以上説明した本発明の実施例による処理の
概要を処理フローの形で示したものであり,以下のとお
りである。
FIG. 9 shows the outline of the processing according to the embodiment of the present invention described above in the form of a processing flow, and is as follows.

(i)各オペレーションを節点としたデータ依存グラフ
を作成する。
(I) Create a data dependency graph with each operation as a node.

(ii)データ依存グラフを解析し,優先順位の基準とす
るFINISH値とDISPATCH値とを各節点ごとに計算する。
(Ii) Analyze the data dependency graph, and calculate the FINISH value and DISPATCH value that are the priority criteria for each node.

(iii)FINISH値とDISPATCH値とをもとに,節点を並べ
換える。
(Iii) Reorder the nodes based on the FINISH value and DISPATCH value.

(iv)並べ換えた節点の順番に従って,各オペレーショ
ンを格納すべき複合型命令を探し,格納できる条件をチ
ェックしたうえで,複合型命令に組み入れる。
(Iv) According to the order of the rearranged nodes, a composite type instruction to store each operation is searched, conditions for storing are checked, and then incorporated into the composite type instruction.

以上の処理において,(i)〜(iii)は,命令実行
時間をできるだけ短くすることを考慮した処理であり,
(iv)は,命令長を短くすることを考慮した処理となっ
ている。
In the above processing, (i) to (iii) are processing in consideration of shortening the instruction execution time as much as possible.
(Iv) is a process in consideration of shortening the instruction length.

実施例として,第2図に示すような複合計算機20で実
行する複合型命令を作成する命令スケジューリングを説
明したが,演算ユニットの構成が変わっても,同様に本
発明を適用することが可能である。また,同時発信数は
必ずしも3でなくてもよく,同時発信数が異なっていて
も同様に実施できる。
As an embodiment, the instruction scheduling for creating a composite instruction to be executed by the composite computer 20 as shown in FIG. 2 has been described. However, the present invention can be similarly applied even if the configuration of the arithmetic unit changes. is there. In addition, the number of simultaneous transmissions is not necessarily three, and the same operation can be performed even if the number of simultaneous transmissions is different.

〔発明の効果〕〔The invention's effect〕

以上説明したように,本発明によれば,全体の実行時
間が短い最適な複合型命令列を作成することができ,ま
た,オペレーションを複合型命令に効率的に詰め込むこ
とにより,複合型命令数を少なくすることが可能にな
る。
As described above, according to the present invention, it is possible to create an optimal composite instruction sequence having a short overall execution time, and to efficiently pack operations into composite instructions to reduce the number of composite instructions. Can be reduced.

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

第1図は本発明の原理説明図, 第2図は本発明により作成する複合型命令を実行する複
合型命令計算機の例, 第3図は本発明の適用例, 第4図は本発明の実施例を説明するためのオペレーショ
ンの並びの例, 第5図は本発明の実施例に係るデータ依存グラフの例, 第6図は本発明の実施例で用いるデータ依存グラフの節
点のデータ構造, 第7図は本発明の実施例で用いる辞書のデータ構造, 第8図は本発明の実施例に係る優先順位の基準の例, 第9図は本発明の一実施例処理フロー, 第10図は本発明の課題を説明するための複合型命令の例
を示す。 図中,10はデータ処理装置,11はオペレーション列記憶
部,12はデータ依存解析処理部,13は優先順位決定処理
部,14は複合型命令作成処理部,15はデータ依存グラフを
表す。
FIG. 1 is a diagram for explaining the principle of the present invention, FIG. 2 is an example of a compound instruction computer for executing compound instructions created according to the present invention, FIG. 3 is an application example of the present invention, and FIG. FIG. 5 is an example of a data dependency graph according to an embodiment of the present invention, FIG. 6 is a data structure of nodes of the data dependency graph used in the embodiment of the present invention, FIG. 7 is a data structure of a dictionary used in the embodiment of the present invention, FIG. 8 is an example of a priority standard according to the embodiment of the present invention, FIG. 9 is a processing flow of an embodiment of the present invention, FIG. Shows an example of a compound instruction for explaining the problem of the present invention. In the figure, reference numeral 10 denotes a data processing device, 11 denotes an operation sequence storage unit, 12 denotes a data dependence analysis processing unit, 13 denotes a priority order determination processing unit, 14 denotes a composite instruction creation processing unit, and 15 denotes a data dependence graph.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 堀田 拡二 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (72)発明者 渡辺 照洋 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (56)参考文献 日経エレクトロニクス,No.487, 1989−11−27,P.199−200 電子情報通信学会技術研究報告,Vo l.89,No.167(CPSY89−3), P.43〜48 電子通信学会論文誌,J67−D,7, 1984,P.792〜799 (58)調査した分野(Int.Cl.7,DB名) G06F 9/44 ──────────────────────────────────────────────────続 き Continuing from the front page (72) Inventor Hiroji Hotta 1015 Uedanaka, Nakahara-ku, Kawasaki-shi, Kanagawa Prefecture Inside Fujitsu Co., Ltd. (56) References Nikkei Electronics, No. 487, 1989-11-27, p. 199-200 IEICE Technical Report, Vol. 89, No. 167 (CPSY89-3), p. 43-48 IEICE Transactions, J67-D, 7, 1984, p. 792-799 (58) Field surveyed (Int. Cl. 7 , DB name) G06F 9/44

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】同時発信の単位となる命令中に複数のオペ
レーションが格納される複合型命令におけるオペレーシ
ョンの組み合わせおよび配置位置を決定する複合型命令
スケジューリング処理装置において, 直線的に並べられたオペレーションについてのデータ依
存関係を解析するデータ依存解析処理部と, 解析したデータ依存関係をもとに,オペレーションの優
先順位を決定する優先順位決定処理部と, 決定した優先順位に従って,各オペレーションを複合型
命令に配置する複合型命令作成処理部とを備え, 前記優先順位決定処理部は,各オペレーションの命令終
了可能時間を示す第1の基準値と,命令発信可能時間を
示す第2の基準値とを用い,実行すべきオペレーション
の優先順位を,少なくとも前記第1の基準値の小さい順
番,第1の基準値が等しい場合には,前記第2の基準値
の小さい順番となるように決定する ことを特徴とする複合型命令スケジューリング処理装
置。
In a compound instruction scheduling processing apparatus for determining a combination and an arrangement position of operations in a compound instruction in which a plurality of operations are stored in an instruction serving as a unit of simultaneous transmission, operations which are linearly arranged A data dependency analysis unit that analyzes the data dependencies of each operation; a priority order determination unit that determines the priority of operations based on the analyzed data dependencies; And a composite instruction creation processing unit arranged in the first order, wherein the priority order determination processing unit sets a first reference value indicating a possible instruction end time of each operation and a second reference value indicating a possible instruction transmission time. The priority order of operations to be used and executed is determined at least in ascending order of the first reference value, When the reference values are equal, the composite instruction scheduling processing device is determined so that the second reference value is in ascending order.
JP16108690A 1990-06-19 1990-06-19 Composite instruction scheduling processor Expired - Fee Related JP3175768B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16108690A JP3175768B2 (en) 1990-06-19 1990-06-19 Composite instruction scheduling processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16108690A JP3175768B2 (en) 1990-06-19 1990-06-19 Composite instruction scheduling processor

Publications (2)

Publication Number Publication Date
JPH0451328A JPH0451328A (en) 1992-02-19
JP3175768B2 true JP3175768B2 (en) 2001-06-11

Family

ID=15728350

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16108690A Expired - Fee Related JP3175768B2 (en) 1990-06-19 1990-06-19 Composite instruction scheduling processor

Country Status (1)

Country Link
JP (1) JP3175768B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000284970A (en) * 1999-03-29 2000-10-13 Matsushita Electric Ind Co Ltd Program converting device and processor
CN1244050C (en) * 2000-03-10 2006-03-01 皇家菲利浦电子有限公司 Method for compiling a program
US20060265695A1 (en) * 2003-01-28 2006-11-23 Catena Corporation Software development preprocessing method, solftware control method, software development method, and software development device
JP2006243838A (en) 2005-02-28 2006-09-14 Toshiba Corp Program development device
JP2009048252A (en) * 2007-08-14 2009-03-05 Oki Electric Ind Co Ltd Program conversion device and compiler program
JP5140105B2 (en) * 2010-03-23 2013-02-06 Necシステムテクノロジー株式会社 Instruction scheduling apparatus, instruction scheduling method, and instruction scheduling program

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
日経エレクトロニクス,No.487,1989−11−27,P.199−200
電子情報通信学会技術研究報告,Vol.89,No.167(CPSY89−3),P.43〜48
電子通信学会論文誌,J67−D,7,1984,P.792〜799

Also Published As

Publication number Publication date
JPH0451328A (en) 1992-02-19

Similar Documents

Publication Publication Date Title
Neumann Efficiently compiling efficient query plans for modern hardware
Moon et al. An efficient resource-constrained global scheduling technique for superscalar and VLIW processors
US5499349A (en) Pipelined processor with fork, join, and start instructions using tokens to indicate the next instruction for each of multiple threads of execution
JP3311462B2 (en) Compile processing unit
Smith Dynamic instruction scheduling and the Astronautics ZS-1
JP2698033B2 (en) Computer system enabling out-of-order instruction execution and method of operating the same
US5974538A (en) Method and apparatus for annotating operands in a computer system with source instruction identifiers
EP0352935B1 (en) Pipelined processor
Treleaven et al. Combining data flow and control flow computing
JPH04503416A (en) dataflow multiprocessor system
Girkar et al. Partitioning programs for parallel execution
JP3175768B2 (en) Composite instruction scheduling processor
Uht A theory of reduced and minimal procedural dependencies
Kessler et al. Optimal integrated code generation for clustered VLIW architectures
Lee et al. Performing data flow analysis in parallel
Moon et al. Generalized multiway branch unit for VLIW microprocessors
EP0924603A2 (en) Compiler controlled dynamic scheduling of program instructions
Nakatani et al. Making compaction-based parallelization affordable
Page Parameterised processor generation
Krishnan et al. Executing sequential binaries on a clustered multithreaded architecture with speculation support
JP3461185B2 (en) Method and apparatus for registering source code line number to load module
JPH02176938A (en) Machine language instruction optimizing system
Wedig Dynamic Detection of Concurrency in DEL Instruction Streams
Kroha Code generation for a RISC machine
Dally et al. Mechanisms for parallel computers

Legal Events

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