JPS6186844A - Shift system for sequential instruction - Google Patents

Shift system for sequential instruction

Info

Publication number
JPS6186844A
JPS6186844A JP20892984A JP20892984A JPS6186844A JP S6186844 A JPS6186844 A JP S6186844A JP 20892984 A JP20892984 A JP 20892984A JP 20892984 A JP20892984 A JP 20892984A JP S6186844 A JPS6186844 A JP S6186844A
Authority
JP
Japan
Prior art keywords
instruction
block
instructions
post
wait
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
JP20892984A
Other languages
Japanese (ja)
Inventor
Hiroshi Nakada
弘 中田
Masaki Aoki
正樹 青木
Toshihiro Hirabayashi
平林 俊弘
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 JP20892984A priority Critical patent/JPS6186844A/en
Publication of JPS6186844A publication Critical patent/JPS6186844A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To extend a parallel executable part of an object program by comparing the arrangement of sequential items with that of intermediate texts and shifting the POST and WAIT instructions independently of each other. CONSTITUTION:The arrangement of sequential items is added to a WAIT instruction (VWT) to know the relation of dependence with a block B. Then the VWT can be shifted to a spot 2 from a spot 1 as long as no relation of dependence exists with the block B (range of alpha). Thus a part of beta is newly defined as a parallel executable part. For the shifts of both POST and WAIT instruction within a block, the POST instruction (VPT) set as shown in (a) is shifted in the direction opposite to the flow of control. While the VWT is shifted in the direction (IS) equal to the flow of control as shown in (b), and a part 1 is newly defined as a parallel executable part.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、スカラ命令及びベクトル命令を含むオブジェ
クト・プログラムを生成するコンパイラにおいて、逐次
化命令(P OS T命令及びWAIT命令)を移動し
て並列実行可能な命令部分を拡大できるようにした逐次
化命令の移動方式に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention provides a method for moving serialization instructions (POST instructions and WAIT instructions) in a compiler that generates object programs containing scalar instructions and vector instructions. This invention relates to a method for moving serialized instructions that can expand the number of instructions that can be executed in parallel.

〔従来技術と問題点〕[Prior art and problems]

第8図はコンパイラの概要を示す図である。なお、この
コンパイラは、ベクトル計算機を含むシステムで実行さ
れるオブジェクト・プログラムを生成するVPコンパイ
ラである。第8図において、■はソース解析部、2は構
造解析部、3はデータの割付部、4は最適化部、5はコ
ード生成部をそれぞれ示している。ソース解析部1は、
宣言文で定義された配列や変数とソース・プログラムの
手続き部における取扱との矛盾を検出したり、未定義の
配列や変数が定義又は参照されていないかを調べるもの
である。構造解析部2は、ソース、プログラムをブロッ
ク化したりするものである。データの割付は部3は、デ
ータに対してメモリ領域を割付たり、配列や変数に対し
て初期値を与えたりするものである。最適化部4は、D
o小ループベクトル化やヘクトル化後の最適化、レジス
タ割付は等を行うものである。コード生成部5は、中間
テキストを機械語命令に変換するものである。
FIG. 8 is a diagram showing an outline of the compiler. Note that this compiler is a VP compiler that generates an object program to be executed on a system including a vector computer. In FIG. 8, ■ indicates a source analysis section, 2 indicates a structure analysis section, 3 indicates a data allocation section, 4 indicates an optimization section, and 5 indicates a code generation section. The source analysis unit 1
It detects inconsistencies between arrays and variables defined in declaration statements and their handling in the procedure division of a source program, and checks whether undefined arrays or variables are defined or referenced. The structure analysis unit 2 converts sources and programs into blocks. The data allocation section 3 allocates memory areas for data and provides initial values to arrays and variables. The optimization unit 4
o Optimization after small loop vectorization and vectorization, register allocation, etc. The code generator 5 converts intermediate text into machine language instructions.

ヘクトル計算機においては、演算器の高速化とその演算
器に見合うデータの供給能力の向上が、実行効率向上の
重要な鍵である。このため最近のヘクトル計算機では、
並列動作可能な2本のロード/ストア・パイプラインを
用意し、データの供給能力を高めている。しかし、複数
のロード/ストア・パイプラインが並列に動作すること
により、メモリ・アクセス命令の同期化を行う必要が生
じた。メモリ・アクセス命令の同期化の方法としては、
POST/WAIT命令を用いる方法が知られている。
In a hector computer, increasing the speed of the arithmetic unit and improving the ability to supply data commensurate with the arithmetic unit are important keys to improving execution efficiency. For this reason, recent hector calculators use
Two load/store pipelines that can operate in parallel are provided to increase data supply capacity. However, with multiple load/store pipelines operating in parallel, it has become necessary to synchronize memory access instructions. As a method of synchronizing memory access instructions,
A method using POST/WAIT instructions is known.

この方法を用いることにより、PO8T命令以前のメモ
リ・アクセス命令とWAIT命令以後のメモリ・アクセ
ス命令との同期を取ることが出来る。例えば、 Do  20  i=1.IOQ ^(i)−A(i)+B(i) C(i)=A (i−1) 20 C0NTINLIE というソース・プログラムは、 VL   VO,A(1:100) VL   Vl、B(1:100) VADD  V3.VO,VI VST  V3.A(1:100) VL   V4.A(0:99) VST  V4.C(1:100) というベクトル命令列に変換されるが、第4番目のベク
トル命令と第5番目のベクトル命令を同時に行うと正し
い演算結果が得られないので、第4番目のベクトル命令
と第5番目のベクトル命令との間にPOST命令及びW
AIT命令を配置する必要がある。
By using this method, the memory access instructions before the PO8T instruction and the memory access instructions after the WAIT instruction can be synchronized. For example, Do 20 i=1. IOQ ^(i)-A(i)+B(i) C(i)=A (i-1) 20 The source program called C0NTINLIE is: VL VO,A(1:100) VL Vl,B(1:100 ) VADD V3. VO, VI VST V3. A (1:100) VL V4. A (0:99) VST V4. C(1:100), but if the 4th vector instruction and the 5th vector instruction are executed at the same time, the correct operation result will not be obtained, so the 4th vector instruction and the 5th vector instruction POST instruction and W between the fifth vector instruction
It is necessary to place an AIT instruction.

ところで、従来の■Pコンパイラにおいては、ソース・
プログラムが複雑なブロック構造を有している場合には
、逐次化命令を移動する最適化を行っていないので、並
列実行可能な部分も逐次化されてしまい、実行効率の低
下の要因となっている。
By the way, in the conventional ■P compiler, the source
If a program has a complex block structure, optimization to move serialized instructions is not performed, so parts that can be executed in parallel are also serialized, which causes a decrease in execution efficiency. There is.

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

本発明は、上記の考察に基づくものであって、■Pコン
パイラにおいて、ブロック間の結合を認識し、逐次化の
ためのPOST命令及びWAIT命令をそれぞれ独立し
て移動し、オブジェクト・プログラムの並列実行可能部
分を拡張出来るようにした逐次化命令の移動方式を提供
することを目的としている。
The present invention is based on the above considerations, and is based on the following: ■The P compiler recognizes connections between blocks, moves POST instructions and WAIT instructions for serialization independently, and parallelizes object programs. The purpose of this invention is to provide a method for moving serialized instructions that allows the executable part to be expanded.

〔目的を達成するための手段〕[Means to achieve the purpose]

そしてそのため本発明の逐次化命令の移動方式は、ベク
トル計算機上で実行されるオブジェクト・プログラムを
生成するコンパイラにおいて、POST命令及びWAI
T命令に逐次化項目の並びを付加し、上記逐次化項目の
並びと中間テキストの並びとを較べて、上記POST命
令を制御の流れと反対方向に移動し、上記WAIT命令
を制御の流れと同一方向に移動することを特徴とするも
のである。
Therefore, the serialization instruction movement method of the present invention is useful for a compiler that generates an object program to be executed on a vector computer.
Add a sequence of serialization items to the T command, compare the sequence of serialization items with the sequence of intermediate text, move the POST command in the opposite direction to the flow of control, and move the WAIT command to the flow of control. It is characterized by moving in the same direction.

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

以下、本発明を図面を参照しつつ説明する。 Hereinafter, the present invention will be explained with reference to the drawings.

第1図は本発明の概要を示す図である。VWTはWAI
T命令を示す。本発明は、逐次化項目の並びをPOST
/WAIT命令に付加することにより、POST/WA
IT命令の移動をチェックするものである。第1図の場
合、VWTに逐次化項目の並びを付加することによりブ
ロックBとの依存関係を知ることが出来る。第1図にお
いて、VWTが示す逐次化項目の並びとブロックB(α
の範囲)で依存関係がなければ、地点■から■へWAI
T命令VWTを移動でき、βの部分が新たに並列実行可
能部分となる。逐次化項目の並びとは、何を逐次化しな
ければならないかを示すものであり、例えばA、B、C
という配列又は変数があった場合、Aが逐次化する必要
あり、BとCとが逐次化の必要がない場合には、逐次化
項目の並びは、項目に対応付けられたビット列など BC で表現することができる。またブロック内に現れるデー
タの定義及び引用も、データに対応付けられたビット列
などで表現することができこれらの比較によってデータ
依存関係の有無を知ることができる。
FIG. 1 is a diagram showing an overview of the present invention. VWT is WAI
Indicates the T command. The present invention enables POST to list serialized items.
By adding /WAIT command, POST/WA
This is to check the movement of IT instructions. In the case of FIG. 1, the dependency relationship with block B can be known by adding the sequence of serialized items to the VWT. In Figure 1, the sequence of serialization items indicated by VWT and block B (α
range), if there is no dependency, WAI from point ■ to ■
The T instruction VWT can be moved, and the part β becomes a new part that can be executed in parallel. The sequence of serialization items indicates what must be serialized, for example, A, B, C.
If there is an array or variable, A needs to be serialized and B and C do not need to be serialized, then the sequence of serialized items is expressed as BC, such as the bit string associated with the item. can do. Furthermore, definitions and references of data that appear within a block can also be expressed as bit strings associated with the data, and by comparing these, it is possible to know whether there is a data dependency relationship.

第2図は1ブロツク内におけるPOST命令及びWAI
T命令のそれぞれの移動を示す図である。
Figure 2 shows the POST command and WAI within one block.
It is a figure which shows each movement of T command.

VPTはPOST命令を示す。第2図(イ)のように配
置されたVPTを制御の流れと反対方向(IP力方向に
移動し、VWTを制御の流れと同一方向(Is力方向に
移動すると、第2図(ロ)のようになり、■の部分が新
たに並列実行可能部分となる。例えば、 VL  VO,A(1:100) VL  Vl、B(1:100) VADD V2.Vl、VO VST  V2.A(1:100) VST  Vl、C(1;100) VPT V切T LGφ、 A (50) というブロックがあった場合、配列Aが逐次化項目であ
るが、VPTを第4番目と第5番目の命令の間に移動す
ることができる。そうすると、ベクトル・レジスタ■2
の第i番目のエレメント・データを配列Aの第i番目の
要素とするベクトル・ストア命令と、ベクトル・レジス
タ■1の第i番目のエレメント・データを配列Cの第i
番目の要素とするベクトル・ストア命令とを並行して行
うことが出来る。なお、■xはベクトル・レジスタを示
し、GXは汎用レジスタを示している。
VPT indicates POST command. If the VPT arranged as shown in Fig. 2 (a) is moved in the opposite direction to the control flow (in the IP force direction) and the VWT is moved in the same direction as the control flow (in the Is force direction), Fig. 2 (b) The part marked ■ becomes a new part that can be executed in parallel. For example, VL VO, A (1:100) VL Vl, B (1:100) VADD V2.Vl, VO VST V2.A (1 :100) VST Vl, C (1; 100) VPT V cut T LGφ, A (50) If there is a block, array A is a serialization item, but VPT is used as the fourth and fifth instruction. You can move between vector registers ■2.
A vector store instruction that sets the i-th element data of vector register ■1 to the i-th element of array A, and
The vector store instruction for the second element can be executed in parallel. Note that x indicates a vector register, and GX indicates a general-purpose register.

第3図はブロックが2方向に移動する場合のWAIT命
令の移動を説明する図である。図示の例では、ブロック
AのVWTがプロ・7りBとブロックCの2方向に移動
出来る。これにより、■及び■の部分が並列実行可能部
分となる。
FIG. 3 is a diagram illustrating movement of a WAIT command when a block moves in two directions. In the illustrated example, the VWT in block A can move in two directions: pro-7ri B and block C. As a result, the parts ``■'' and ``■'' become parts that can be executed in parallel.

第4図は2つのプロ・ツク(2方向)から分岐してくる
場合のWAIT命令の移動を説明する図である。図示の
ように、ブロックA及びブロックBからブロックCに制
御の流れがある場合でも、VWTがブロックCにおいて
1つになり、更に移動が可能になる。これにより、■及
び■の部分が並列実行可能部分となる。
FIG. 4 is a diagram illustrating the movement of a WAIT instruction when branching from two programs (two directions). As shown, even if there is control flow from block A and block B to block C, the VWT becomes one in block C and further movement is possible. As a result, the parts ``■'' and ``■'' become parts that can be executed in parallel.

第5図は1つのブロック内でループしている場合のPO
ST命令及びWAIT命令の移動を説明する図である。
Figure 5 shows PO when looping within one block.
FIG. 3 is a diagram illustrating movement of an ST command and a WAIT command.

第5図(イ)は従来のVPT及びVWTの配置を示して
おり、第5図(ロ)は本発明によるVPT及びVWTの
移動を示している。
FIG. 5(A) shows the arrangement of the conventional VPT and VWT, and FIG. 5(B) shows the movement of the VPT and VWT according to the present invention.

第5図(ロ)に示すようにブロックBの上側のVPTは
ブロックAに移動され、ブロックBの下側のVWTはブ
ロックCに移動される。これにより、■及び■の部分が
並列実行可能部分となる。
As shown in FIG. 5(b), the VPT above block B is moved to block A, and the VWT below block B is moved to block C. As a result, the parts ``■'' and ``■'' become parts that can be executed in parallel.

第6図は逐次化命令(POST及びWAIT命令)を移
動するための処理手順を説明する図である。
FIG. 6 is a diagram illustrating a processing procedure for moving serialized instructions (POST and WAIT instructions).

SL、未処理ブロック内で以下の情報を収集する。SL, collect the following information in the unprocessed block.

a、ブロック間結合の依存関係を把握する。a. Understand the dependencies of connections between blocks.

b、ブロック内のテキストの情報を収集する。b. Collect information on the text within the block.

S2.逐次化命令の移動 逐次化命令(POST命令とWAIT命令)を移動する
が、POST命令はIP力方向移動し、WAIT命令は
Is力方向移動する。
S2. Movement of serialized instructions Serialized instructions (POST and WAIT instructions) are moved, with the POST instruction moving in the IP force direction and the WAIT instruction moving in the Is force direction.

S3、逐次化命令移動の可否 移動対象となるブロックを収集し、ベクトル化されたデ
ータの定義・参照情報を示すビット列などで較べる。
S3: Possibility of serialization instruction movement? Collect blocks to be moved and compare them with bit strings indicating definition/reference information of vectorized data.

S4.テキスト単位の移動 メモリ・オペランドを持つテキストについても、ベクト
ル化された範囲にそのオペランドが重なるか否かを調べ
、移動の可否を知る。
S4. For text that has a movement memory operand in units of text, it is checked whether the operand overlaps with the vectorized range to know whether movement is possible.

なお、これらの処理は第8図のコンパイラの最適化部で
行われる。
Note that these processes are performed by the optimization section of the compiler shown in FIG.

第7図は逐次化項目の求め方を説明する図である。逐次
化項目は、1つの逐次化命令からその逐次化命令の移動
する方向に存在する他の逐次化命令までの範囲のすべて
のデータの定義・参照を表現するビット列の和(OR)
を取る事によって求められる。
FIG. 7 is a diagram illustrating how to obtain serialized items. The serialization item is the sum (OR) of bit strings that expresses the definition/reference of all data in the range from one serialization instruction to other serialization instructions that exist in the direction of movement of that serialization instruction.
It is found by taking .

第7図において、範囲Aの部分の逐次化項目は■のVW
Tと■のVPTに付加する。範囲Bの部分の逐次化項目
は■のVWTと■のVPTに付加する。
In Figure 7, the serialization item in range A is
Add to VPT of T and ■. The serialization items in the range B are added to the VWT (■) and the VPT (■).

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

以上の説明から明らかなように、本発明によれば、今ま
でより広範囲の命令が並列実行可能になり、実行効率を
向上させることが出来る。
As is clear from the above description, according to the present invention, a wider range of instructions can be executed in parallel than ever before, and execution efficiency can be improved.

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

第1図は本発明の概要を示す図、第2図は1ブロツク内
におけるPOST命令及びWAIT命令のそれぞれの移
動を示す図、第3図はブロックが2方向に移動する場合
のWAIT命令の移動を説明する図、第4図は2つのブ
ロック(2方向)から分岐してくる場合のWA I T
命令の移動を説明する図、第5図は1つのブロック内で
ループしている場合のPOST命令及びWAIT命令の
移動を説明する図、第6図は逐次化命令(POST及び
WAIT命令)を移動するための処理手順を説明する図
、第7図は逐次化項目の求め方を説明するだめの図、第
8図はコンパイラの概要を示す図である。 1・・・ソース解析部、2・・・構造解析部、3・・・
データの割付部、4・・・最適化部、5・・・コード生
成部。 坪1図 第2図 伴41カ 芋5図
Fig. 1 is a diagram showing an overview of the present invention, Fig. 2 is a diagram showing the movement of the POST instruction and WAIT instruction within one block, and Fig. 3 is a diagram showing the movement of the WAIT instruction when the block moves in two directions. Figure 4 is a diagram explaining WA I T when branching from two blocks (two directions).
A diagram explaining the movement of instructions. Figure 5 is a diagram explaining the movement of POST and WAIT instructions when looping within one block. Figure 6 is a diagram explaining the movement of serialized instructions (POST and WAIT instructions). FIG. 7 is a diagram illustrating a procedure for determining serialization items, and FIG. 8 is a diagram illustrating an overview of a compiler. 1... Source analysis section, 2... Structural analysis section, 3...
Data allocation section, 4... Optimization section, 5... Code generation section. Tsubo 1 Figure 2 Ban 41 Kaimo 5 Figure

Claims (1)

【特許請求の範囲】[Claims] ベクトル計算機上で実行されるオブジェクト・プログラ
ムを生成するコンパイラにおいて、POST命令及びW
AIT命令に逐次化項目の並びを付加し、上記逐次化項
目の並びと中間テキストの並びとを較べて、上記POS
T命令を制御の流れと反対方向に移動し、上記WAIT
命令を制御の流れと同一方向に移動することを特徴とす
る逐次化命令の移動方式。
In a compiler that generates an object program to be executed on a vector computer, the POST instruction and W
Add a sequence of serialization items to the AIT command, compare the sequence of serialization items with the intermediate text sequence, and create the above POS
Move the T instruction in the opposite direction of the control flow and perform the above WAIT
A serialized instruction movement method characterized by moving instructions in the same direction as the flow of control.
JP20892984A 1984-10-04 1984-10-04 Shift system for sequential instruction Pending JPS6186844A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20892984A JPS6186844A (en) 1984-10-04 1984-10-04 Shift system for sequential instruction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20892984A JPS6186844A (en) 1984-10-04 1984-10-04 Shift system for sequential instruction

Publications (1)

Publication Number Publication Date
JPS6186844A true JPS6186844A (en) 1986-05-02

Family

ID=16564461

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20892984A Pending JPS6186844A (en) 1984-10-04 1984-10-04 Shift system for sequential instruction

Country Status (1)

Country Link
JP (1) JPS6186844A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5247691A (en) * 1989-05-15 1993-09-21 Fujitsu Limited System for releasing suspended execution of scalar instructions following a wait instruction immediately upon change of vector post pending signal
JPH0717694U (en) * 1991-10-15 1995-03-31 季子 幸野 Bicycle basket cover

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5247691A (en) * 1989-05-15 1993-09-21 Fujitsu Limited System for releasing suspended execution of scalar instructions following a wait instruction immediately upon change of vector post pending signal
JPH0717694U (en) * 1991-10-15 1995-03-31 季子 幸野 Bicycle basket cover

Similar Documents

Publication Publication Date Title
Tzen et al. Trapezoid self-scheduling: A practical scheduling scheme for parallel compilers
Wise Aspects of applicative programming for parallel processing
US5303357A (en) Loop optimization system
JPH05143332A (en) Computer system having instruction scheduler and method for rescheduling input instruction sequence
Gao et al. A timed Petri-net model for fine-grain loop scheduling
JPH04336378A (en) Information processor
EP2799986B1 (en) Apparatus and method for translating multithread program code
Gibson et al. Engineering and scientific processing on the IBM 3090
JPS6186844A (en) Shift system for sequential instruction
JPH04293150A (en) Compiling method
JP3032030B2 (en) Loop optimization method and apparatus
Krohn A parallel approach to code generation for Fortran like compilers
JPH056712B2 (en)
JPH0241562A (en) Dividing and processing system for vector arithmetic string
Li et al. An Improved Method for Control Dependency in LLVM
Newport An introduction to Occam and the development of parallel software
Kitano et al. Performance evaluation of parallel heapsort programs
Shin et al. Identification of microprogrammable loops for problem oriented architecture synthesis
JPH03135630A (en) Instruction scheduling system
Deng et al. Superword level parallelism vectorization method for signal processing algorithms oriented to double loops
JPH0644270B2 (en) Vector processor control processing method
Thoreson et al. Instruction reference patterns in data flow programs
JPH04152464A (en) Compile processing system
JPH0512752B2 (en)
Evripidou et al. A decoupled data-driven architecture with vectors and macro actors