JPH0713963A - Method for processing scheduling of vector instruction - Google Patents

Method for processing scheduling of vector instruction

Info

Publication number
JPH0713963A
JPH0713963A JP5147543A JP14754393A JPH0713963A JP H0713963 A JPH0713963 A JP H0713963A JP 5147543 A JP5147543 A JP 5147543A JP 14754393 A JP14754393 A JP 14754393A JP H0713963 A JPH0713963 A JP H0713963A
Authority
JP
Japan
Prior art keywords
instruction
vector
unit
arithmetic
scheduling
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
JP5147543A
Other languages
Japanese (ja)
Inventor
Eiji Nunohiro
永示 布広
Kazuhiro Aida
一弘 会田
Hiroyuki Sone
広幸 曽根
Hisato Ushijima
寿人 牛島
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.)
Hitachi Software Engineering Co Ltd
Hitachi Ltd
Original Assignee
Hitachi Software Engineering Co Ltd
Hitachi 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 Hitachi Software Engineering Co Ltd, Hitachi Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP5147543A priority Critical patent/JPH0713963A/en
Publication of JPH0713963A publication Critical patent/JPH0713963A/en
Pending legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To generate an object program having satisfactory usage efficiency in the arithmetic equipment of a vector processing processor by evading a register collision at the time of shifting an instruction. CONSTITUTION:A vector instruction scheduling part 8 is operated before a vector processing processor register assigning part 9 and inputs an intermediate language in a vector forming loop from the intermediate language 3. Information obtained by analizing the reliance between the kind of the arithmetic equipment used by the instruction at each one vector instruction unit and vector data used by the instruction is held in an instruction table in an instruction table generating part 81 and the rearrangement of the intermediate language is executed so as to make instruction arrangement in accordance with the configuration ratio of the arithmetic equipment of the vector processing processor based on the instruction table in an instruction arranging part 82.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、ベクトル命令のスケジ
ューリング処理方法に関し、特に、並列動作可能な複数
の演算器を有するベクトル処理プロセッサに対して、ソ
ース・プログラムから目的プログラムを生成するコンパ
イラにおいて、ベクトル処理プロセッサの演算器の使用
効率を向上させて実行性能の良い目的プログラムを生成
するのに好適なベクトル命令のスケジューリング処理方
法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a vector instruction scheduling method, and more particularly, to a vector processor having a plurality of arithmetic units capable of operating in parallel in a compiler for generating an object program from a source program, The present invention relates to a vector instruction scheduling method suitable for improving the usage efficiency of arithmetic units of a vector processor to generate a target program with good execution performance.

【0002】[0002]

【従来の技術】ベクトル命令のスケジューリング処理方
法としては、例えば特開昭58−149570号公報に
示されるように、ベクトル処理プロセッサのベクトルレ
ジスタを割当てた命令列から、依存関係のある部分命令
列を1つの命令群として、互いに依存関係のない複数の
命令群を抽出し、1つの命令群の実行シュミレーション
を行って演算器の空きを見つけ、別の命令群から当該演
算器を使用する命令をあてはめる方法が知られている。
2. Description of the Related Art As a vector instruction scheduling processing method, for example, as shown in Japanese Patent Laid-Open No. 149570/1983, a partial instruction string having a dependency relationship is extracted from an instruction string to which a vector register of a vector processor is assigned. As one instruction group, a plurality of instruction groups that do not depend on each other are extracted, an execution simulation of one instruction group is performed to find a vacancy of an arithmetic unit, and an instruction that uses the arithmetic unit is applied from another instruction group. The method is known.

【0003】[0003]

【発明が解決しようとする課題】上記従来方法は、依存
関係のない命令群同士でレジスタ衝突を起こさない範囲
では十分な効果がある。しかし、ベクトル処理プロセッ
サのベクトルレジスタを割当てた後の命令列をスケジュ
ーリングの対象としているため、依存関係のない命令群
同士であっても命令を移動した場合にレジスタ衝突が発
生する部分に関しては、演算器に空きがあっても命令の
移動ができず、つまり演算器の空きを解消できず、これ
が演算器の使用効率の向上の妨げになるという問題があ
った。
The above conventional method has a sufficient effect in the range where register collision does not occur between instruction groups having no dependency. However, since the instruction sequence after allocating the vector register of the vector processor is the target of scheduling, even if there is no dependency relationship between instruction groups, register collision will occur when the instructions move. There is a problem that the instruction cannot be moved even if there is a vacancy in the computing unit, that is, the vacancy in the computing unit cannot be eliminated, which hinders the improvement of the usage efficiency of the computing unit.

【0004】よって本発明の目的は、依存関係のない命
令群同士で命令移動をする場合のレジスタ衝突を回避し
て演算器の空きを少なくし、演算器の使用効率をより向
上させるためのベクトル命令のスケジューリング処理方
法を提供することにある。
Therefore, an object of the present invention is to provide a vector for avoiding register collision when moving instructions between non-dependent instruction groups to reduce the vacancy of the arithmetic unit and to improve the utilization efficiency of the arithmetic unit. It is to provide an instruction scheduling processing method.

【0005】[0005]

【課題を解決するための手段】本発明によれば、上記目
的を達成するために、並列動作可能な複数個の演算器を
有するベクトル処理プロセッサに対して、ソース・プロ
グラムから目的プログラムを生成するコンパイラにおい
て、ベクトル処理プロセッサのベクトルレジスタを割当
てる処理の前に、ベクトル命令のスケジューリング処理
を行う。
According to the present invention, in order to achieve the above object, a target program is generated from a source program for a vector processor having a plurality of arithmetic units that can operate in parallel. In the compiler, the vector instruction scheduling process is performed before the process of allocating the vector register of the vector processor.

【0006】このベクトル命令のスケジューリング処理
は、1ベクトル命令単位毎に、該ベクトル命令で使用す
るベクトルデータの依存関係、及び該命令で使用する演
算器の種別を解析した情報を該ベクトル命令対応に用意
した命令テーブルに保持し、該命令テーブルをもとにベ
クトル処理プロセッサの演算器の構成比即ちロード・ス
トア演算器数と算術・論理演算器数との割合に応じた命
令の配置を行う。
In this vector instruction scheduling process, the information obtained by analyzing the dependency relation of the vector data used in the vector instruction and the type of the arithmetic unit used in the instruction is associated with the vector instruction for each vector instruction unit. The prepared instruction table is held, and instructions are arranged according to the composition ratio of the arithmetic units of the vector processing processor, that is, the ratio of the number of load / store arithmetic units to the number of arithmetic / logical arithmetic units based on the instruction table.

【0007】[0007]

【作用】ベクトル処理プロセッサのベクトルレジスタ割
当てを行う前に、ソース・プログラムの中のベクトル化
ループに対する中間語を入力し、1ベクトル命令単位毎
に該ベクトル命令で使用するベクトルデータの依存関
係、及び該命令で使用する演算器の種別を解析した情報
を該ベクトル命令対応に用意した命令テーブルに保持
し、該命令テーブルをもとにベクトル処理プロセッサの
演算器の構成比即ちロード・ストア演算器数と算術・論
理演算器数との割合に応じた命令の配置を行うベクトル
命令のスケジューリングを行い、その後にベクトル処理
プロセッサのベクトルレジスタを割当てることによっ
て、演算器の使用効率の良い目的プログラムを生成する
ことができる。
Before the vector register allocation of the vector processor, the intermediate word for the vectorization loop in the source program is input, and the dependency of the vector data used in the vector instruction for each vector instruction unit, and The information obtained by analyzing the type of the arithmetic unit used in the instruction is held in an instruction table prepared for the vector instruction, and based on the instruction table, the composition ratio of the arithmetic units of the vector processor, that is, the number of load / store arithmetic units. A vector instruction that allocates instructions according to the ratio of the number of arithmetic and logical arithmetic units is scheduled, and after that, the vector register of the vector processor is allocated to generate a target program with efficient use of arithmetic units. be able to.

【0008】[0008]

【実施例】以下、本発明の一実施例を図面を用いて説明
する。図1は、本発明を適用したコンパイラの構成を示
す図である。このコンパイラ1は、並列動作可能な複数
個の演算器を有するベクトル処理プロセッサに対し、ソ
ース・プログラムから目的プログラムを生成するもの
で、その構成部分としてソースプログラム解析部5、ル
ープ解析部6、ベクトル化ループ解析部7、ベクトル命
令スケジューリング部8、ベクトル処理プロセッサレジ
スタ割当て部9、ストレージ割当て部10、スカラ処理
プロセッサレジスタ割当て部11、目的プログラム出力
部12がある。ベクトル命令スケジューリング部8は、
命令テーブル作成部81及び命令配置部82からなる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a diagram showing a configuration of a compiler to which the present invention is applied. This compiler 1 generates an object program from a source program for a vector processor having a plurality of arithmetic units that can operate in parallel. As its constituent parts, a source program analysis section 5, a loop analysis section 6, and a vector. There is a generalization loop analysis unit 7, a vector instruction scheduling unit 8, a vector processing processor register allocation unit 9, a storage allocation unit 10, a scalar processing processor register allocation unit 11, and an object program output unit 12. The vector instruction scheduling unit 8
The instruction table creating unit 81 and the instruction arranging unit 82 are included.

【0009】このコンパイラ1の動作の概要は次のとお
りである。ソース・プログラム解析部5が、大容量記憶
装置内のソース・プログラム2を読み込み、それを中間
語3に変換する。ループ解析部6が、この中間語3を入
力してソース・プログラムの制御の流れを解析し条件構
造やループ構造を検出すると同時に、変数及び配列デー
タの定義・参照関係を調べることにより依存解析を行
う。ベクトル化ループ解析部7が、ベクトル実行可能な
ループ構造を検出してベクトル化ループ構造に変換す
る。
The outline of the operation of the compiler 1 is as follows. The source program analysis unit 5 reads the source program 2 in the mass storage device and converts it into the intermediate language 3. The loop analysis unit 6 inputs the intermediate language 3 to analyze the control flow of the source program to detect the conditional structure and the loop structure, and at the same time, checks the definition / reference relationship of variables and array data to perform dependency analysis. To do. The vectorization loop analysis unit 7 detects a vector executable loop structure and converts it into a vectorization loop structure.

【0010】ベクトル命令スケジューリング部8が、演
算器の使用効率を向上させた命令配置となるよう中間語
の配置換えを行う。この処理の詳細は後述する。
The vector instruction scheduling unit 8 rearranges the intermediate words so that the instruction arrangement improves the usage efficiency of the arithmetic units. Details of this processing will be described later.

【0011】ベクトル処理プロセッサレジスタ割当て部
9が、ベクトル化ループ内の中間語に対してベクトル処
理プロセッサのベクトルレジスタを割当てる。ストレー
ジ割当て部10が、目的プログラムの実行に必要なデー
タ領域の割当てをおこなう。スカラ処理プロセッサレジ
スタ割当て部11が、スカラ命令で使用するスカラ処理
プロセッサのレジスタを割当てを行う。目的プログラム
出力部12が、機械命令語である目的プログラム4を大
容量記憶装置に出力する。
The vector processing processor register allocating unit 9 allocates the vector register of the vector processing processor to the intermediate word in the vectorization loop. The storage allocation unit 10 allocates a data area necessary for executing the target program. The scalar processing processor register allocation unit 11 allocates the registers of the scalar processing processor used in the scalar instruction. The target program output unit 12 outputs the target program 4, which is a machine instruction word, to the mass storage device.

【0012】次に、本発明の要部たるベクトル命令スケ
ジューリング部8の動作について詳細に説明する。前述
のように、ベクトル命令スケジューリング部8は命令テ
ーブル作成部81と命令配置部82から構成されている
が、その命令テーブル作成部81の動作について、図2
に示す処理フローを用いて説明する。
Next, the operation of the vector instruction scheduling unit 8 which is the main part of the present invention will be described in detail. As described above, the vector instruction scheduling unit 8 is composed of the instruction table creating unit 81 and the instruction arranging unit 82. Regarding the operation of the instruction table creating unit 81, FIG.
This will be described using the processing flow shown in.

【0013】まず、図1に示した中間語3からベクトル
化ループの中間語を入力し(処理101)、この中間語
をソース・プログラムの出現順とは逆順に走査して、未
走査の中間語があるかどうかを判定する(処理10
2)。未走査の中間語がある場合には命令テーブルの作
成処理(処理103〜処理105)を行い、ない場合に
は命令テーブルの作成処理を終了する。
First, an intermediate word of the vectorization loop is input from the intermediate word 3 shown in FIG. 1 (process 101), the intermediate word is scanned in the reverse order of the appearance order of the source program, and the unscanned intermediate word is scanned. It is determined whether there is a word (Process 10)
2). If there is an unscanned intermediate word, the instruction table creating process (process 103 to process 105) is performed.

【0014】命令テーブルの作成処理(処理103〜処
理105)は次のとおりである。まず、図4に示す形式
の命令テーブルを1つ確保すると同時に、その内容を0
で初期設定し(処理103)、走査対象となった中間語
から命令で使用する演算器の種別、即ちロード・ストア
演算器か算術・論理演算器のいずれか1つの種別を識別
して、それぞれ整数値0、1に対応させた情報として命
令テーブルに設定する(処理104)。つぎに、走査対
象となった中間語から命令で使用するベクトルデータを
検出すると同時に、前記検出したベクトルデータから依
存関係のある中間語を検出し、前記依存関係のあった中
間語に対応する命令テーブル内の同期ビットn(nは、
当該ベクトルデータが使用されている命令オペランド番
号に対応した値で1〜4の範囲の中の一つである)をO
N(1)にする。これと同時に、処理103で確保した
命令テーブル内の命令チェイン数の内容を1だけ増加さ
せる(処理105)。そして、処理102に制御を戻
す。以上が、命令テーブル作成部81の動作説明であ
る。
The instruction table creating process (process 103 to process 105) is as follows. First, one instruction table of the format shown in FIG.
Is initialized (step 103), the type of the arithmetic unit used in the instruction is identified from the scanned intermediate language, that is, one type of the load / store arithmetic unit or the arithmetic / logical arithmetic unit is identified, and The information corresponding to the integer values 0 and 1 is set in the instruction table (process 104). Next, the vector data used in the instruction is detected from the intermediate word that is the scan target, and at the same time, the intermediate word having the dependency relationship is detected from the detected vector data, and the instruction corresponding to the intermediate word having the dependency relationship is detected. Sync bit n in the table (where n is
Is a value corresponding to the instruction operand number in which the vector data is used, and is one of the range of 1 to 4)
Set to N (1). At the same time, the content of the number of instruction chains in the instruction table secured in step 103 is incremented by 1 (step 105). Then, the control is returned to the process 102. The above is the description of the operation of the instruction table creation unit 81.

【0015】次に、命令配置部82の動作について、図
3に示す処理フローを用いて説明する。まず、上記命令
テーブル作成部81で作成した命令テーブルを逐次入力
し、命令テーブル内の全同期ビットがOFF(0)であ
る命令テーブルを命令配置可能なものとして、命令テー
ブル内の演算器種別から命令で使用する演算器別に初期
登録する(処理201)。
Next, the operation of the instruction placement unit 82 will be described using the processing flow shown in FIG. First, the instruction table created by the instruction table creating unit 81 is sequentially input, and the instruction table in which all the synchronization bits in the instruction table are OFF (0) can be arranged, Initial registration is performed for each arithmetic unit used in the command (process 201).

【0016】次に、命令配置番号カウンタを1に初期設
定し(処理202)、命令配置すべき命令テーブルが登
録されているかどうかを判定し(処理203)、登録さ
れている場合に処理204に制御を渡し、登録されてい
ない場合には命令配置部82の処理を終了する。処理2
04では、演算器カウンタにベクトル処理プロセッサの
ロード・ストア演算器数(本実施例では2とする)を設
定し、ロード・ストア命令の配置処理(処理205〜処
理206)に進む。
Next, the instruction allocation number counter is initialized to 1 (process 202), it is judged whether or not the command table to which the command is allocated is registered (process 203), and if registered, the process 204 is executed. Control is passed, and if not registered, the processing of the instruction placement unit 82 is ended. Process 2
In 04, the number of load / store arithmetic units of the vector processing processor (2 in this embodiment) is set in the arithmetic unit counter, and the process proceeds to load / store instruction allocation processing (processing 205 to processing 206).

【0017】ロード・ストア命令の配置処理(処理20
5〜処理206)は次のとおりである。演算器カウンタ
が0でなく、かつ演算器種別が0(ロード・ストア演算
器)である命令テーブルが登録されているかどうか判定
する(処理205)。前記条件が成立する場合には命令
配置換え処理1(処理206)に、成立しない場合には
処理207に制御を渡す。
Load / store instruction allocation processing (processing 20)
5 to process 206) are as follows. It is determined whether the instruction table in which the arithmetic unit counter is not 0 and the arithmetic unit type is 0 (load / store arithmetic unit) is registered (step 205). If the above condition is satisfied, the control is passed to the instruction rearrangement process 1 (process 206), and if not satisfied, the control is passed to the process 207.

【0018】命令配置換え処理1(処理206)は、演
算器カウンタを1減じるとともに、登録されている命令
テーブル群から命令テーブル内の命令チェイン数が最大
のものを1つ選び、その命令テーブルに対応する中間語
を命令配置番号カウンタの示す所定の位置に配置し、命
令配置番号カウンタを1だけ増加させる。更に、前記配
置を行った中間語上にあるベクトルデータの夫々に対し
て、依存関係のある中間語を検出し、前記検出した中間
語の夫々に対応する命令テーブル内の前記ベクトルデー
タを使用する命令オペランド位置に対応する同期ビット
をOFF(0)にして同期待ちの解消を行う。この時、
同期待ちの解消を行った中間語に対し、対応する命令テ
ーブル内の全同期ビットがOFFであるとき命令配置可
能として命令テーブルを登録する。そして、前記配置を
行った中間語に対応する命令テーブルを削除し、処理2
05に制御を戻す。
In the instruction rearrangement process 1 (process 206), the arithmetic unit counter is decremented by one, and the one having the largest number of instruction chains in the instruction table is selected from the registered instruction table group, and the instruction table is stored in the instruction table. The corresponding intermediate word is placed at a predetermined position indicated by the instruction placement number counter, and the instruction placement number counter is incremented by one. Further, an intermediate word having a dependency relationship is detected for each of the vector data on the arranged intermediate word, and the vector data in the instruction table corresponding to each of the detected intermediate words is used. The synchronization wait corresponding to the instruction operand position is turned off (0) to cancel the synchronization wait. This time,
When all the synchronization bits in the corresponding instruction table are OFF with respect to the intermediate word for which the synchronization waiting is canceled, the instruction table is registered as the instruction can be arranged. Then, the instruction table corresponding to the arranged intermediate language is deleted, and the process 2
Return control to 05.

【0019】処理207は、演算器カウンタにベクトル
処理プロセッサの算術・論理演算器数(本実施例では2
とする)を設定し、算術・論理命令の配置処理(処理2
08〜処理209)に進む。算術・論理命令の配置処理
は、演算器カウンタが0でなく、かつ演算器種別が1
(算術・論理演算器)である命令テーブルが登録されて
いるかどうか判定し(処理208)、前記条件が成立す
る場合には命令配置換え処理2(処理209)に制御を
渡し、成立しない場合には処理203に制御を戻す。命
令配置換え処理2は、命令配置換え処理1と同様の処理
を行い、処理208に制御を戻す。
In step 207, the number of arithmetic / logical arithmetic units of the vector processing processor is set in the arithmetic unit counter (2 in this embodiment).
Set), and arithmetic / logical instruction allocation processing (processing 2)
08 to process 209). Arithmetic / logical instruction allocation processing is performed when the arithmetic unit counter is not 0 and the arithmetic unit type is 1
It is determined whether or not an instruction table, which is (arithmetic / logical operation unit), is registered (step 208). If the above condition is satisfied, control is passed to the instruction rearrangement process 2 (step 209). Returns control to process 203. The instruction rearrangement process 2 performs the same process as the instruction rearrangement process 1 and returns the control to the process 208.

【0020】以上のようにベクトル命令スケジューリン
グ部8は動作して、ベクトル化ループ内の中間語をベク
トル処理プロセッサの演算器の構成比率に応じた命令の
配置となるようにスケジューリングする。
The vector instruction scheduling unit 8 operates as described above, and schedules the intermediate words in the vectorization loop so that instructions are arranged according to the composition ratio of the arithmetic units of the vector processing processor.

【0021】本発明のスケジューリング処理方法を適用
したベクトル命令のスケジューリング例を以下に示す。
An example of vector instruction scheduling to which the scheduling method of the present invention is applied is shown below.

【0022】図5は、図1に示したコンパイラ1におい
て、ソース・プログラム1を入力してソース・プログラ
ム解析部5、ループ解析部6およびベクトル化ループ解
析部7の所定の処理をして得られるベクトル化ループの
中間語の一例を示す。この中間語の例を用いたスケジュ
ーリング例を説明する。
FIG. 5 is obtained by inputting the source program 1 into the compiler 1 shown in FIG. 1 and subjecting the source program analyzing section 5, loop analyzing section 6 and vectorized loop analyzing section 7 to predetermined processing. An example of the intermediate word of the vectorization loop used is shown. A scheduling example using this intermediate language example will be described.

【0023】命令テーブル作成部81は、図5に示した
中間語を逆順つまり、、……、の順に走査し、各
中間語に対して命令で使用する演算器の種別と命令で使
用するベクトルデータの依存関係を解析して図6に示す
命令テーブルを作成する。
The instruction table creating unit 81 scans the intermediate words shown in FIG. 5 in reverse order, that is, in the order of, ..., And the type of arithmetic unit used in the instruction and the vector used in the instruction for each intermediate word. An instruction table shown in FIG. 6 is created by analyzing the data dependency.

【0024】命令配置部82は、図6に示した命令テー
ブルを、、……、の順に入力して、全同期ビット
がOFFである命令テーブル、、、を命令配置
可能なロード・ストア演算器を使用する命令として初期
登録し、、、、の順に命令テーブルをチェイン
する。
The instruction arranging unit 82 inputs the instruction table shown in FIG. 6 in this order, ..., And the load / store arithmetic unit capable of arranging the instruction table in which all the synchronization bits are OFF. Is initially registered as an instruction using, and the instruction table is chained in the order of ,,,.

【0025】次に、命令配置番号カウンタに1を設定
し、命令配置すべき命令テーブル(、、、)が
登録されているので、演算器カウンタにロード・ストア
演算器数2を設定し、ロード・ストア命令の配置処理を
行う。このロード・ストア命令の配置処理により、命令
テーブルに対応する中間語を第1番目の命令として
配置し、命令テーブルの同期ビット2をOFFにし、
命令テーブルを削除する。さらに、命令テーブルに
対応する中間語を第2番目の命令として配置し、命令
テーブルの同期ビット3をOFFにすると同時に、命
令テーブルの全同期ビットがOFFになったため、命
令テーブルを命令配置可能な算術・論理演算器を使用
する命令として登録し命令テーブルを削除する。そし
て、演算器カウンタに算術・論理演算器数2を設定し、
算術・論理命令の配置処理を行う。算術・論理命令の配
置処理により、命令テーブルに対応する中間語を第
3番目の命令として配置し、命令テーブルの同期ビッ
ト2をOFFにすると同時に、命令テーブルの全同期
ビットがOFFになったため、命令テーブルを命令配
置可能なロード・ストア演算器を使用する命令として登
録し命令テーブルを削除する。
Next, since the instruction allocation number counter is set to 1 and the instruction table (,,,) to which the instruction is to be allocated is registered, the load / store operation unit number is set to 2 in the operation unit counter and the load is performed. • Performs store instruction allocation processing. By this placement processing of load / store instructions, the intermediate word corresponding to the instruction table is placed as the first instruction, and the synchronization bit 2 of the instruction table is turned off.
Delete the instruction table. Further, since the intermediate word corresponding to the instruction table is arranged as the second instruction and all the synchronization bits of the instruction table are turned off at the same time that the synchronization bit 3 of the instruction table is turned off, the instruction table can be placed in the instruction. Register as an instruction that uses an arithmetic / logical operation unit and delete the instruction table. Then, set the number of arithmetic / logical arithmetic units to the arithmetic unit counter,
Arrangement of arithmetic and logic instructions is performed. By the arithmetic / logical instruction arrangement process, the intermediate word corresponding to the instruction table is arranged as the third instruction, and the synchronous bit 2 of the instruction table is turned off, and at the same time, all the synchronous bits of the instruction table are turned off. The instruction table is registered as an instruction that uses a load / store arithmetic unit that can allocate instructions, and the instruction table is deleted.

【0026】以上の様に、配置すべき命令テーブルが登
録されているあいだ、ロード・ストア命令の配置処理と
算術・論理命令の配置処理を繰り返すことにより、図7
に示す中間語の配置となる。
As described above, while the instruction table to be arranged is registered, the arrangement process of the load / store instruction and the arrangement process of the arithmetic / logical instruction are repeated, so that FIG.
It becomes the arrangement of the intermediate language shown in.

【0027】スケジューリングを行う前のベクトル化ル
ープの中間語(図5)とスケジューリングを行った後の
ベクトル化ループの中間語(図7)の演算器の使用効率
を対比するため、それぞれの命令のタイミングチャート
を図8の(a)及び(b)に示す。このタイミングチャ
ートからも容易に理解されるように、本発明のスケジュ
ーリング処理により演算器の使用効率が向上する。
In order to compare the use efficiency of the arithmetic unit of the intermediate word of the vectorization loop before scheduling (FIG. 5) and the intermediate word of the vectorization loop after scheduling (FIG. 7), each instruction Timing charts are shown in FIGS. 8A and 8B. As can be easily understood from this timing chart, the use efficiency of the arithmetic unit is improved by the scheduling process of the present invention.

【0028】[0028]

【発明の効果】以上説明したように、本発明のベクトル
命令スケジューリング処理方法によれば、依存関係のな
い命令同士でのレジスタ衝突を回避した命令のスケジュ
ーリングが可能となり、演算器の使用効率を向上させた
目的プログラムが生成でき、目的プログラムの実行時間
を短縮することが可能となる。
As described above, according to the vector instruction scheduling processing method of the present invention, it is possible to perform instruction scheduling while avoiding register collision between instructions having no dependency, thereby improving the usage efficiency of arithmetic units. The generated target program can be generated, and the execution time of the target program can be shortened.

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

【図1】本発明が適用されたコンパイラの一実施例の構
成図である。
FIG. 1 is a configuration diagram of an embodiment of a compiler to which the present invention is applied.

【図2】ベクトル命令スケジューリング部における命令
テーブル作成処理のフローチャートである。
FIG. 2 is a flowchart of an instruction table creating process in a vector instruction scheduling unit.

【図3】ベクトル命令スケジューリング部における命令
配置処理のフローチャートである。
FIG. 3 is a flowchart of an instruction placement process in a vector instruction scheduling unit.

【図4】命令テーブルの内容例を示す。FIG. 4 shows an example of contents of an instruction table.

【図5】ベクトル化ループの中間語の一例を示す。FIG. 5 shows an example of an intermediate word of a vectorization loop.

【図6】図5の中間語に対する命令テーブル作成例を示
す。
6 shows an example of creating an instruction table for the intermediate language of FIG.

【図7】図5の中間語を命令スケジューリング処理した
後の中間語の配置を示す。
FIG. 7 shows an arrangement of intermediate words after instruction scheduling processing of the intermediate words of FIG.

【図8】(a)図5の中間語の命令タイミングチャート
である。(b)図7の中間語の命令タイミングチャート
である。
8 (a) is an instruction timing chart of the intermediate language of FIG. (B) It is an instruction timing chart of the intermediate language of FIG. 7.

【符号の説明】[Explanation of symbols]

1 コンパイラ 2 ソース・プログラム 3 中間語 4 目的プログラム 5 ソース・プログラム解析部 6 ループ解析部 7 ベクトル化ループ解析部 8 ベクトル命令スケジューリング部 81命令テーブル作成部 82 命令配置部 9 ベクトル処理プロセッサレジスタ割当て部 10 ストレージ割当て部 11 スカラ処理プロセッサレジスタ割当て部 12 目的プログラム出力部 DESCRIPTION OF SYMBOLS 1 compiler 2 source program 3 intermediate language 4 object program 5 source program analysis unit 6 loop analysis unit 7 vectorized loop analysis unit 8 vector instruction scheduling unit 81 instruction table creation unit 82 instruction placement unit 9 vector processing processor register allocation unit 10 Storage allocation unit 11 Scalar processing processor Register allocation unit 12 Target program output unit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 会田 一弘 神奈川県横浜市戸塚区戸塚町5030番地 株 式会社日立製作所ソフトウェア開発本部内 (72)発明者 曽根 広幸 神奈川県横浜市中区尾上町6丁目81番地 日立ソフトウェアエンジニアリング株式会 社内 (72)発明者 牛島 寿人 神奈川県横浜市中区尾上町6丁目81番地 日立ソフトウェアエンジニアリング株式会 社内 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Kazuhiro Aida 5030 Totsuka-cho, Totsuka-ku, Yokohama City, Kanagawa Prefecture Software Development Division, Hitachi, Ltd. (72) Hiroyuki Sone Inoue-cho, Naka-ku, Yokohama City, Kanagawa Prefecture 81 Hitachi Software Engineering Co., Ltd. In-house (72) Inventor Hisato Ushijima 6-81 Onoue-cho, Naka-ku, Yokohama-shi Kanagawa Hitachi Software Engineering Co., Ltd. In-house

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 並列動作可能な複数個の演算器を有する
ベクトル処理プロセッサに対して、ソース・プログラム
から目的プログラムを生成するコンパイラにおいて、ベ
クトル化ループ内の中間語を逐次入力して、1ベクトル
命令単位に命令で使用するベクトルデータの依存関係と
命令で使用する演算器を解析し、前記解析結果を保持す
る命令テーブルを作成し、前記作成した命令テーブルを
もとに、ベクトル処理プロセッサの演算器の構成比率に
応じた命令の配置となるようなベクトル命令のスケジュ
ーリングをベクトルレジスタ割当ての直前に施すことを
特徴とするベクトル命令のスケジューリング処理方法。
1. A vector processing processor having a plurality of arithmetic units capable of operating in parallel, in a compiler for generating an object program from a source program, sequentially inputting intermediate words in a vectorization loop to obtain one vector. Analyzing the dependency of vector data used in the instruction and the arithmetic unit used in the instruction for each instruction, creating an instruction table holding the analysis result, and calculating the vector processor based on the created instruction table A vector instruction scheduling method characterized by performing vector instruction scheduling immediately prior to vector register allocation so that instructions are arranged according to the composition ratio of the device.
JP5147543A 1993-06-18 1993-06-18 Method for processing scheduling of vector instruction Pending JPH0713963A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5147543A JPH0713963A (en) 1993-06-18 1993-06-18 Method for processing scheduling of vector instruction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5147543A JPH0713963A (en) 1993-06-18 1993-06-18 Method for processing scheduling of vector instruction

Publications (1)

Publication Number Publication Date
JPH0713963A true JPH0713963A (en) 1995-01-17

Family

ID=15432702

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5147543A Pending JPH0713963A (en) 1993-06-18 1993-06-18 Method for processing scheduling of vector instruction

Country Status (1)

Country Link
JP (1) JPH0713963A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013206291A (en) * 2012-03-29 2013-10-07 Fujitsu Ltd Program, code generation method and information processing apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013206291A (en) * 2012-03-29 2013-10-07 Fujitsu Ltd Program, code generation method and information processing apparatus
US9256437B2 (en) 2012-03-29 2016-02-09 Fujitsu Limited Code generation method, and information processing apparatus

Similar Documents

Publication Publication Date Title
Fisher et al. Parallel processing: A smart compiler and a dumb machine
JP3032031B2 (en) Loop optimization method and apparatus
JP3280449B2 (en) Compiling device
JP2004302706A (en) Program parallelization device, program parallelization method, and program parallelization program
JP3318051B2 (en) Translation processing method
JPH0713963A (en) Method for processing scheduling of vector instruction
Wolski et al. Program partitioning for NUMA multiprocessor computer systems
Kovačević et al. A solution for automatic parallelization of sequential assembly code
JPH06161773A (en) Generating device for parallel processing program
JP2000020482A (en) Loop parallelizing method
JPH03135630A (en) Instruction scheduling system
JP3114884B2 (en) Fuzzy inference processing compilation system
Liu et al. Parallel programming: Achieving portability through abstraction
JP3323147B2 (en) Compiling device, compiling method, and recording medium recording compiler program
dos Santos et al. Combining code motion and scheduling
JPH06290159A (en) Process assigning method for parallel computers
JPH06295246A (en) Instruction scheduling system
JPH07105015A (en) Compiling system
JP2001184320A (en) Distributed executing device and recording medium
JPH0689187A (en) Inline expansion optimizing method
JPH0689186A (en) Sort processing method
JP2001159983A (en) Scheduling method of common subexpression recognition type instruction
JPH06222926A (en) Virtual resource generating system
Sarvani et al. Unified instruction reordering and algebraic transformations for minimum cost offset assignment
JP2001290653A (en) Resource-assigning device