JPS6015772A - Processing system for inter-loop array processing vector - Google Patents
Processing system for inter-loop array processing vectorInfo
- Publication number
- JPS6015772A JPS6015772A JP12417583A JP12417583A JPS6015772A JP S6015772 A JPS6015772 A JP S6015772A JP 12417583 A JP12417583 A JP 12417583A JP 12417583 A JP12417583 A JP 12417583A JP S6015772 A JPS6015772 A JP S6015772A
- Authority
- JP
- Japan
- Prior art keywords
- variable
- vector
- subscript
- expression
- processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 claims description 45
- 230000014509 gene expression Effects 0.000 claims description 38
- 238000003672 processing method Methods 0.000 claims description 4
- 238000004458 analytical method Methods 0.000 abstract description 4
- 238000006243 chemical reaction Methods 0.000 abstract description 4
- 238000003491 array Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 11
- 238000010348 incorporation Methods 0.000 description 2
- 238000012916 structural analysis Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/76—Architectures of general purpose stored program computers
- G06F15/80—Architectures of general purpose stored program computers comprising an array of processing units with common control, e.g. single instruction multiple data processors
- G06F15/8053—Vector processors
Landscapes
- Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Complex Calculations (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
Description
【発明の詳細な説明】 囚 発明の技術分野 本発明はループ内配列処理ベクトル化処理方式。[Detailed description of the invention] Technical field of invention The present invention is an in-loop array processing vectorization processing method.
特に配列を用いている高級言語を、ベクトル処理装置で
実行される機械語に変換するにあたって。Especially when converting high-level languages that use arrays into machine language that can be executed on vector processing devices.
変換結果の実行を高速化するペクトライズを促進させた
ループ内配列処理ベクトル化処理方式に関するものであ
る。This invention relates to an in-loop array processing vectorization processing method that promotes pectorization to speed up the execution of conversion results.
fBl 技術の背景と問題点
複数個のデータに共通の処理手続が施される場合に、そ
れらを並列に実行処理するいわゆるベクトル処理装置が
用いられでいる。例えば、FORTRAN等の高級言語
でプログラムを作成する場合には、プログラム作成者は
、ベクトル処理装置によって、そのプログラムが実行さ
れることを何んら意識する必要はなく、その高級言語を
機械dt1に変換するときに、いわゆるコンパイラが、
可能なものについてベクトル命令を生成する。ベクトル
命令に変換できるものが多ければ多いほど、並列処理に
より、実行が高速化されることになる。Background and Problems of fBl Technology When a common processing procedure is applied to a plurality of pieces of data, a so-called vector processing device is used which executes the procedures in parallel. For example, when creating a program in a high-level language such as FORTRAN, the program creator does not need to be aware that the program will be executed by a vector processing device; When converting, the so-called compiler,
Generate vector instructions for what is possible. The more things that can be converted into vector instructions, the faster the execution will be due to parallel processing.
第1図は一般的なベクトル命令生成についての説明図、
第2図は従来技術の問題点説明図を示す。Figure 1 is an explanatory diagram of general vector instruction generation.
FIG. 2 shows a diagram illustrating problems in the prior art.
例えばカード・リード1から入力された被翻訳命令群4
において、高級言語の文■は、制御変数(を1から10
まで変化させつつ2文■までの命令文を10回繰り返す
ことを指示するものである。For example, a group of translated commands 4 input from card read 1
In , the high-level language sentence ■ has a control variable (from 1 to 10
This command instructs to repeat the imperative sentences up to 2 sentences (■) 10 times while changing them up to 2 times.
文■は、配列Bのデータと配列Cのデータとの和を、配
列Aに格納すべきことを示す。制御変数iが、配列A、
B、Cの添字として用いられている。Statement ■ indicates that the sum of the data in array B and the data in array C should be stored in array A. Control variable i is array A,
It is used as a subscript for B and C.
翻訳処理装置2は、被翻訳命令群4を機械語に展開する
にあたって9図示の如き中間表現5を考慮したうえで1
機械語命令群6に示されるような機械語命令を生成する
。命令■は、配列BのデータをオOベクトル・レジスタ
にロードするベクトル命令である。命令■は、配列Cの
データを第1ベクトル・レジスタに一一ドする命令であ
る。命令■は、オOベクトル・レジスタと第1ベクトル
・レジスタの和を、第2ベクトル・レジスタに格納する
命令である。命令■は第2ベクトル・レジスタの内容を
配列Aにストアする命令である。これらの命令は、実際
には、2進のコードで与えられる。翻訳処理装置コは9
機械語命令群6を生成して9例えば磁気ディスク装置3
に格納する。このようにベクトル命令に展開することに
より9通常であれば10回処理を繰り返すべきところを
、1回の並列処理で実行できるようになる。The translation processing device 2 takes into consideration the intermediate representation 5 as shown in Figure 9 when expanding the translated instruction group 4 into machine language.
Machine language instructions as shown in machine language instruction group 6 are generated. Instruction ■ is a vector instruction that loads the data of array B into the O vector register. Instruction (2) is an instruction for loading the data of array C into the first vector register. Instruction (2) is an instruction to store the sum of the O vector register and the first vector register in the second vector register. Instruction (2) is an instruction to store the contents of the second vector register in array A. These instructions are actually given in binary code. The translation processing device is 9
Generate a machine language instruction group 6 and send it to the magnetic disk device 3, for example.
Store in. By expanding the instructions into vector instructions in this way, it becomes possible to execute 9 processes in parallel, which would normally be repeated 10 times, in one parallel process.
第1図に示したベクトル化処理は、常に可能であるわけ
ではない。例えば、第2図イ)図示の如き。The vectorization process shown in FIG. 1 is not always possible. For example, as shown in Figure 2 A).
被翻訳命令群4の場合、配列データ7−1に対して、該
命令群を逐次処理により、正しく実行したとすると、結
果は、配列データ7−2の如くになる。しかし、ベクト
ル化して処理してしまうと。In the case of the instruction group 4 to be translated, if the instruction group is correctly executed on the array data 7-1 by sequential processing, the result will be as shown in the array data 7-2. However, if you process it by vectorizing it.
結果は配列データ7−3の如くになるので、誤ったデー
タとなる。すなわち、このような場合、ペクトライズは
できないこととなる。これは、配列の代入文において、
右辺および左辺の添字によって示されるデータ群に重な
り関係が生じることに起因する。このことから、従来1
例えばi2図(ロ)図示の被翻訳命令群4の場合9代入
文■において。The result is array data 7-3, which is incorrect data. That is, in such a case, pectorization cannot be performed. This means that in the array assignment statement,
This is caused by an overlapping relationship occurring between the data groups indicated by the subscripts on the right and left sides. From this, conventional 1
For example, in the case of the translated instruction group 4 shown in Figure i2 (b), in the assignment statement ■9.
右辺の配列に添字として用いられている変数りが。The variable used as a subscript in the array on the right side.
左辺の添字として用いられている制御変数iに対して、
どのような関係にあるかが不明であり、配列の重複関係
を認知できないため、ベクトル化することができなかっ
た。For the control variable i used as the subscript on the left side,
It was not possible to vectorize them because it was unclear what kind of relationship they had, and it was not possible to recognize the overlapping relationship between the sequences.
fcl 発明の目的と構成
本発明は上記問題点の解決を図り、ループ中の配列の添
字式中の変数を、ループの制御変数または定数を含むよ
うな変数の定義式で置き換えることにより、配列間の関
係を明確にし、ペクトライズを促進させて、高速で実行
されるオブジェクトを生成することを目的としている。fcl Object and Structure of the Invention The present invention aims to solve the above-mentioned problems, and replaces the variables in the subscript expression of the array in the loop with the definition expression of the variable that includes the control variable or constant of the loop. The purpose is to clarify the relationship between objects, promote pectorization, and generate objects that execute at high speed.
そのため1本発明のループ内配列処理ベクトル化処理方
式は。Therefore, the in-loop array processing vectorization processing method of the present invention is as follows.
複数個のデータを並列、処理するベクトル命令を実行す
るベクトル・ユニットと、スカシ・データを処理するス
カシ命令を実行するスカシ・ユニットとをそなえたベク
トル処理装置における機械語命令への翻訳処理装置にお
いて、繰り返し実行される形で表わされた被翻訳命令群
に現われる配列の添字であって、動作不明な変数を含む
添字を捜し出す添字走査手段と、上記動作不明な変数を
定義する式を捜し出す定義式走査手段と、該定義式走査
手段によって捜し出された式の内容を上記添字の情報に
組込む添字式組込み手段と、該添字大組込み手段によっ
て生成された新たな添字情報にもとづいてベクトル化の
可否を判定する判定手段と。In a translation processing device into machine language instructions in a vector processing device equipped with a vector unit that executes a vector instruction that processes multiple pieces of data in parallel, and a scashi unit that executes a scashi instruction that processes scashi data. , a subscript scanning means for searching for a subscript of an array that appears in a group of translated instructions expressed in a repeatedly executed form and that includes a variable whose operation is unknown; and a definition for searching for an expression that defines the variable whose operation is unknown. an expression scanning means, a subscript expression embedding means for incorporating the content of the expression found by the definition expression scanning means into the subscript information, and vectorization based on the new subscript information generated by the subscript large embedding means. and a determination means for determining whether or not it is possible.
該判定手段の判定結果に従って上記ベクトル命令を生成
するベクトル命令生成処理部とをそなえたことを特徴と
している。以下図面を参照しつつ説明する。The present invention is characterized by comprising a vector instruction generation processing section that generates the vector instruction according to the determination result of the determination means. This will be explained below with reference to the drawings.
fD) 発明の実施例
第3図は本発明の一実施例構成、第4図は本発明の一実
施例処理説明図、第5図は本発明の具体的な一実施例処
理態様の説明図を示す。fD) Embodiment of the Invention FIG. 3 is a configuration diagram of an embodiment of the present invention, FIG. 4 is an explanatory diagram of processing of an embodiment of the invention, and FIG. 5 is an explanatory diagram of processing mode of a specific embodiment of the present invention. shows.
第3図において、符号2および3は第1図に対応し、l
Oはベクトル処理装置、11はベクトル・ユニット、1
2はスカシ・ユニット、22は主記憶装置、23はチャ
ネル装置、24はオブジェクト・モジュール、25はソ
ース・モジュール。In FIG. 3, numerals 2 and 3 correspond to those in FIG.
O is a vector processing unit, 11 is a vector unit, 1
2 is a storage unit, 22 is a main storage device, 23 is a channel device, 24 is an object module, and 25 is a source module.
30は構文解析部、31は添字走査部、32は定義式走
査部、33は添字式組込み部、34はベクトル化可否判
定部、35はベクトル命令生成部。30 is a syntax analysis section, 31 is a subscript scanning section, 32 is a definition expression scanning section, 33 is a subscript expression embedding section, 34 is a vectorization possibility determination section, and 35 is a vector instruction generation section.
36はスカラ命令生成部を表わす。36 represents a scalar instruction generation section.
翻訳処理装置2は、逐次命令をフェッチして実行する装
置であって1例えばFORTRAN等の高級言語で記述
された被翻訳命令群からなるソース・モジュール25を
入力し、2進の機械語命令に変換して、オブジェクト・
モジュール24を例えば磁気ディスク装置3に出力する
装置である。The translation processing device 2 is a device that fetches and executes sequential instructions, and inputs a source module 25 consisting of a group of translated instructions written in a high-level language such as FORTRAN, and converts it into binary machine language instructions. Convert it to an object
This is a device that outputs the module 24 to, for example, the magnetic disk device 3.
翻訳処理装置2は、ベクトル処理装置10と同じ装置で
あってもよく、また他の処理装置であってもよい。The translation processing device 2 may be the same device as the vector processing device 10, or may be another processing device.
ベクトル処理装置10は9通常のスカシ命令と複数個の
データを並列に同時に処理するベクトル命令とを処理す
る装置であり、ベクトル・ユニット11とスカシ・ユニ
ット12とからなる。スカシ・ユニット12は、バッフ
ァ・ストレージ19スカラ演算器21とからなり、主記
憶装置22上のデータをレジスタ20にロードし、スカ
シ演算器21により、スカシ命令を逐次処理する。ベク
トル・ユニット11は、主記憶装置22からフェッチし
た命令がベクトル命令であるときに起動される。複数本
のロード/ストアのパイプライン13.13’を有し1
例えば32語×1ビットからなる256個のマスク・レ
ジスタ14と32語×64ビットからなる256個のベ
クトル・レジスタ14’とを有している。マスク回路1
5は2例えはFORTRANプログラムにおけるIF文
を含んだ手続きなどもベクトル化対象とするために、そ
の条件の真となるデータを指示するものである。The vector processing device 10 is a device that processes nine normal search instructions and a vector instruction for processing multiple pieces of data simultaneously in parallel, and is composed of a vector unit 11 and a search unit 12. The scashi unit 12 includes a buffer storage 19 and a scalar arithmetic unit 21, loads data on the main storage device 22 into a register 20, and uses the scashi arithmetic unit 21 to sequentially process scashi instructions. Vector unit 11 is activated when the instruction fetched from main memory 22 is a vector instruction. 1 with multiple load/store pipelines 13.13'
For example, it has 256 mask registers 14 consisting of 32 words x 1 bit and 256 vector registers 14' consisting of 32 words x 64 bits. Mask circuit 1
5 specifies the data for which the condition is true, in order to include a procedure including an IF statement in a FORTRAN program as a target for vectorization.
加算/論理演算器169乗算器17および除算器18は
、それぞれ、ベクトル命令によって、ベクトル・レジス
タ14′のデータ群を並列処理する。Addition/logic operator 169, multiplier 17, and divider 18 each process data groups in vector register 14' in parallel according to vector instructions.
一度に大量のデータを同時に処理するので、高速なデー
タ処理が可能である。主記憶装置22には。Since large amounts of data are processed simultaneously, high-speed data processing is possible. In the main storage device 22.
予めチャネル装置23を経由して、ベクトル命令を含む
オブジェクト・モジュール24もしくはそれを編集した
ロード・モジュールが、ロードされるようになっている
。An object module 24 containing vector instructions or a load module that is an edited version of the object module 24 is loaded in advance via the channel device 23.
上記の如きベクトル処理装置10の構成により。Due to the configuration of the vector processing device 10 as described above.
それによって実行される命令には、同じ処理内容であれ
ば、でさるだけベクトル命令が多く用いられていたほう
が望ましい。そのため2本発明に係る翻訳処理装置2は
、特に次のような構成を有している。As long as the processing contents are the same, it is preferable that vector instructions be used as many as possible. Therefore, the translation processing device 2 according to the present invention particularly has the following configuration.
W文M析部30は、ソース・モジュール25の被翻訳対
象について、そのシンタックスを解析するものである。The W sentence M analysis section 30 analyzes the syntax of the target to be translated in the source module 25.
添字走査部31は、添字式内の変数で動きの不明なもの
を捜し出す処理を行うものである。なお、添字は、複数
個のデータからなる配列内における位置を示すものと考
えてよい。添字走査部31は、特に配列の添字のうち、
その文を含む全ループの制御変数以外の変数を処理対象
とする。ここでループは2例えばFORTRANのDO
文による繰り返し処理される命令群であり。The subscript scanning unit 31 performs a process of searching for variables in the subscript expression whose movements are unknown. Note that the subscript may be considered to indicate a position within an array consisting of a plurality of pieces of data. In particular, the subscript scanning unit 31 scans the subscripts of the array.
Process variables other than the control variables of all loops including that statement. Here, the loop is 2 For example, FORTRAN DO
It is a group of instructions that are repeatedly processed by a statement.
制御変数は、そのループの繰り返し回数に依存した値を
もつ変数をいう。A control variable is a variable whose value depends on the number of repetitions of the loop.
定義式走査部32は、添字走査部31が捜し出した処理
対象の変数が、どのような変数または定数によって、予
め定められるかを示す定義式を。The definition formula scanning unit 32 scans a definition formula that indicates what kind of variable or constant is used to predetermine the variable to be processed that has been found by the subscript scanning unit 31.
以下の所定の範囲から捜し出す処理を実行するものであ
る。式の走査の対象となるブロックは、上記処理対象の
変数の出現したブロック、次に、上記処理対象の変数の
出現したループ内で、出現したブロックまでのバス上に
おいて必ず通過するブロック、および上記処理対象の変
数の出現したループの初期設定ブロックである。なお、
ブロックは翻訳の処理単位であって、処理の流れがユニ
ークに定まる部分をいう。It executes the following search process from a predetermined range. The blocks to be scanned by the expression are the block in which the variable to be processed appears, then the block that must pass through on the bus to the block where the variable to be processed appears in the loop where the variable to be processed appears, and the block in which the above variable appears. This is the initialization block of the loop where the variable to be processed appears. In addition,
A block is a processing unit of translation, and refers to a part where the flow of processing is uniquely determined.
添字式組込み部33は、定義式走査部32が捜し出した
式を、当該添字式に組込んで、処理対象の変数を他の変
数または定数に置き換える処理を行うものである。変数
を定義する式が、定数のみの式の場合、処理対象の文を
含むループの制御変数のうち、いずれか1つを含む式で
ある場合1式中に処理対象の変数が現われていない式で
ある場合に組込みを行う。例えば、ループの制御変数が
iおよびJであって、配列Aの代入文が。The subscript expression incorporation section 33 performs processing of incorporating the expression found by the definition expression scanning section 32 into the subscript expression, and replacing the variable to be processed with another variable or constant. If the expression that defines the variable is an expression containing only constants, or if the expression includes any one of the control variables of the loop that includes the statement to be processed.1 An expression in which the variable to be processed does not appear in the expression If so, perform the embedding. For example, the control variables of a loop are i and J, and the assignment statement for array A is:
A (J)= A (j十K)
で与えられている場合に、同じブロック内において、変
数Kが。In the same block, the variable K is given by A (J) = A (j + K).
K=J+10
で定義されているとすると、上記代入文は、添字式組込
み部33によって。Assuming that K=J+10 is defined, the above assignment statement is executed by the subscript expression embedding unit 33.
A (J) = A (s+J+10 )と置き換えら
れる。Replaced with A (J) = A (s+J+10).
ベクトル化可否判定部34は、添字式組込み部33によ
る組込み処理が終了した後に、配列代入式の右辺と左辺
とに現われる添字式を比較し1重なり関係があるかどう
かによって、ベクトル化できるかどうかを決定するもの
である。配列名が異なる場合にζよ、その部分は重なり
が生じないものとされるが1代入データに重なりが生じ
る場合であっても、データを後方から前方へ移動させで
代入する場合のように、ベクトル化しで処理するときと
、逐次処理するときとの処理結果が等しくなる場合には
、ベクトル化可能と判断する。After the subscript expression embedding unit 33 completes the embedding process, the vectorization possibility determining unit 34 compares the subscript expressions appearing on the right side and the left side of the array assignment expression, and determines whether vectorization is possible based on whether there is a one-overlap relationship. This is what determines the If the array names are different, it is assumed that no overlap occurs in that part, but even if there is an overlap in the assigned data, as in the case of assignment by moving the data from backward to forward, If the processing results when processing by vectorization and when processing by sequential processing are the same, it is determined that vectorization is possible.
ベクトル命令生成部35は、ベクトル化可否判定部34
がベクトル化可能と判定した文について。The vector instruction generation unit 35 includes a vectorization possibility determination unit 34.
Regarding sentences that are determined to be vectorizable.
ベクトル命令からなるオブジェクトを生成するものであ
り、スカラ命令生成部36は、ベクトル化できないもの
についで、スカラ命令に展開する処理を実行するもので
ある。The scalar instruction generation unit 36 generates an object consisting of vector instructions, and the scalar instruction generation unit 36 executes a process of expanding into scalar instructions those that cannot be vectorized.
上記植成により、翻訳処理装置2は9例えは214図図
示の如く処理する。なお2本発明に関連した処理を中心
に説明するが、他の処理については。With the above-mentioned planting, the translation processing device 2 performs processing as shown in FIG. 214, for example. Note that the description will focus on two processes related to the present invention, but other processes will be described.
従来と同様であると考えでよい。まず、″A−4図図示
処理40によって、添字情報を作成する。ソース中の添
字式どおりのものが抽出される。次に処理41により、
構造解析を所定の文法に従って行う。次に処理42の判
定により、全テキストについての処理終了が確認される
まで、処]j、l! 43から処理50までを繰り返す
。処理43によって、添字式内の変数の中で動きの不明
なものを捜す。動作不明な添字があれば、処理44によ
って、同一ブロックB1において、処理対象の添字に用
いられでいる変数を定義する式を捜す。処理45の判定
により、見つかれば、処理49へ移る。処理46では、
処理対象の変数Kが出現したDOループにおいて、必ず
通過するブロック、例えばB2.B3について、定義式
をさがす。枝分れするブロックB4.B5は、必ず通過
するとは限らないので。It can be considered that it is the same as before. First, subscript information is created by the "A-4 diagram illustration process 40. Subscript information according to the subscript formula in the source is extracted. Next, by process 41,
Structural analysis is performed according to a predetermined grammar. Next, until it is confirmed by the determination in process 42 that the processing for all texts has been completed, process] j, l! Steps 43 to 50 are repeated. Process 43 searches for variables in the subscript expression whose movement is unknown. If there is a subscript whose operation is unknown, a process 44 searches for an expression that defines a variable used in the subscript to be processed in the same block B1. As a result of the determination in process 45, if it is found, the process moves to process 49. In process 46,
In the DO loop in which the variable K to be processed appears, there is a block that always passes through, for example, B2. Search for the defining formula for B3. Branching block B4. B5 is not guaranteed to pass.
サーチ対象から外す。処理47により、見つかれば、処
理49へ移る。処理48では、初期設定ブロックB6.
B7などの、処理対象の変数が出現したDOループの外
部に、定義式があるかどうかを捜す。Remove from search targets. If it is found in process 47, the process moves to process 49. In process 48, initialization block B6.
A search is made to see if there is a definition expression outside the DO loop in which the variable to be processed appears, such as B7.
処理49の判定においで、定義式が見つからなかったと
判定された場合、および見つかっても組込み条件に合致
しないと判定された場合には、動作不明な変数はそのま
まの形で、処理42に戻り。If it is determined in step 49 that the definition expression is not found, or if it is determined that it does not match the built-in condition even if it is found, the process returns to step 42 with the variable whose behavior is unknown as is.
次のテキストについての処理に移る。組込みが可能であ
れば、処理50により、定義式を組込んで。Move on to processing the next text. If the incorporation is possible, the definition expression is incorporated in step 50.
変数をループの制御変数のような動きのわかるものに置
き換える。その後、処理42へ制御を移す。Replace the variable with something whose behavior is known, such as a loop control variable. Thereafter, control is transferred to process 42.
処理43以下の処理を全テキストについて行つた後は、
処理51へ移る。処理51では、添字の重なり関係をチ
ェックする。処理52による判定によって、ベクトル化
が可能であることがわかれば、処理53により、ベクト
ル命令に展開する。After performing the processing from step 43 on all texts,
The process moves to process 51. In process 51, the overlapping relationship of subscripts is checked. If it is determined by the process 52 that vectorization is possible, the process 53 expands it into a vector instruction.
ベクトル化できない場合には、処理54によって。If vectorization is not possible, process 54 is performed.
通常のスカラ命令によりオブジェクトを生成する。Create an object using normal scalar instructions.
次に処理55によって、全テキストについての機械語へ
の翻訳が終了したかどうかを判定し、まだの場合には8
次のテキスト内容について、処理51から処理54まで
を繰り返す。Next, in process 55, it is determined whether or not the translation of all texts into machine language has been completed, and if not, 8
Processes 51 to 54 are repeated for the next text content.
次に、牙5図を参照し、具体例に従って処理態様を説明
する。例えば、第5図(イ)図示の如き被翻訳命令群4
が与えられたとする。文S1.S3゜85.86は、そ
れぞれ右辺の式の66を左辺の変数に代入することを指
示する代入文である。特に。Next, the processing mode will be explained according to a specific example with reference to Fig. 5. For example, a group of translated instructions 4 as shown in FIG.
Suppose that is given. Sentence S1. S3°85.86 are assignment statements that instruct to assign 66 in the expression on the right side to the variable on the left side. especially.
文S6については、配列データが扱われている。Regarding sentence S6, array data is handled.
文S2およびB4は、いわゆるDoループを指示する文
であり2文S7までの命令文を繰り返し実行すべきこと
を示す。ループ制御変数JおよびLについての多重ルー
プになっている。Sentences S2 and B4 are statements that instruct a so-called Do loop, and indicate that the command statements up to the second sentence S7 should be repeatedly executed. There are multiple loops for loop control variables J and L.
添字走査部31は、被翻訳命令群4から、配列の添字で
あって、動作不明な変数を含むものを捜し出す。この例
の場合9文S6に配列があり、その添字情報は、第5図
(ロ)図示の如くになっており。The subscript scanning unit 31 searches the translated instruction group 4 for an array subscript that includes a variable whose operation is unknown. In this example, there is an array in the 9th sentence S6, and its subscript information is as shown in FIG. 5(b).
添字■と添字■との関係は明確であるが、添字■と添字
■との関係が不明な状態となっている。なお、配列Aに
ついては9代入される配列Bとは別の配列であるため、
ベクトル化の可否に影響を与えない。従来、このような
動作不明な添字■、■の関係があるとき、ベクトル化で
きないものとされていた。本発明の場合、以下のように
添字関係を明確にし、ベクトル化が促進される。The relationship between the subscripts ■ and the subscripts ■ is clear, but the relationship between the subscripts ■ and the subscripts ■ is unclear. Note that array A is a different array from array B to which 9 is assigned, so
Does not affect whether vectorization is possible. Conventionally, when there is a relationship between subscripts ■ and ■ whose behavior is unknown, it has been thought that it cannot be vectorized. In the case of the present invention, vectorization is promoted by clarifying the subscript relationship as follows.
定義式走査部32は、動作不明な変数iBおよびiAに
ついての定義式を捜し出す。この例の場合1文S3と文
S5とが見つけ出される。添字式組込み部33は1文S
3と文S5によって与えられた定義式を、添字情報に組
込む。これによって。The definition formula scanning unit 32 searches for definition formulas for variables iB and iA whose operations are unknown. In this example, one sentence S3 and one sentence S5 are found. The subscript type embedding part 33 is one sentence S
3 and the definition expression given by statement S5 are incorporated into the subscript information. by this.
文S6についての添字情報は、第5図(ハ)図示の如く
添字ω′、■′、■′に置き換えられることになる。The subscript information regarding the sentence S6 is replaced with subscripts ω', ■', and ■' as shown in FIG. 5(C).
ここで、添字の関係をチェックすると、左辺とベクトル
化にあたって問題はない。添字(−と添字ω′との関係
は、ループ制御変数りおよびJの動作範囲を調べること
によって明らかにされる。すなわち9文S4によって。Here, if you check the relationship between the subscripts, there is no problem with the left side and vectorization. The relationship between the subscript (-) and the subscript ω' is clarified by examining the loop control variables and the operating range of J. That is, by the ninth sentence S4.
1≦L≦J
O≦L−1各J−1
が得られ、これから
N≧N−L+1≧N−J+1
であることがわかる。従って、添字の関係は、第5図に
)図示のようになり、添字づが少なくとも「N−J+I
Jより大となるため1重ならないことがわかる。これに
より、被翻訳命令群4に現イっれるループ内配列につい
でのベクトル化がnJ能となる。1≦L≦J O≦L−1 each J−1 is obtained, and from this it can be seen that N≧N−L+1≧N−J+1. Therefore, the relationship between the subscripts is as shown in Figure 5), where the subscripts are at least "N-J+I
Since it is larger than J, it can be seen that there is no single overlap. As a result, the vectorization of the in-loop array that appears in the translated instruction group 4 becomes nJ-capable.
(E) 発明の詳細
な説明した如く本発明によれば、ベクトル化率を高める
ことができ、従来ベクトル化不可であった部分が、ベク
トル化されることにより、生成されるオブジェクトの実
行性能が向上する。(E) As described in detail, according to the present invention, the vectorization rate can be increased, and parts that could not be vectorized in the past are vectorized, thereby improving the execution performance of the generated object. improves.
第1図は一般的なベクトル命令生成についての説明図、
牙2図は従来技術の問題点説明図、第3図は本発明の一
実施例構成、第4図は本発明の一実施例処理説明図、第
5図は本発明の具体的な一実施例処理態様の説明図を示
す。
図中、2は翻訳処理装置、4は被翻訳命令群。
10はベクトル処理装置、11はベクトル・ユニット、
12はスカシ・ユニット、22は主記憶装置、23はチ
ャネル装置、24はオブジェクト・モジュール、25は
ソース・モジュール、30は構文解析部、31は添字走
査部、32は定義式走査部、33は添字式組込み部、3
4はベクトル化可否判定部、35はベクトル命令生成部
、36はスカラ命令生成部を表わす。
特許出願人 富士通株式会社Figure 1 is an explanatory diagram of general vector instruction generation.
Fig. 2 is an explanatory diagram of problems in the prior art, Fig. 3 is a configuration diagram of an embodiment of the present invention, Fig. 4 is an explanatory diagram of processing of an embodiment of the present invention, and Fig. 5 is a concrete implementation of the present invention. An explanatory diagram of an example processing mode is shown. In the figure, 2 is a translation processing device, and 4 is a group of instructions to be translated. 10 is a vector processing device, 11 is a vector unit,
12 is a search unit, 22 is a main storage device, 23 is a channel device, 24 is an object module, 25 is a source module, 30 is a syntax analysis section, 31 is a subscript scanning section, 32 is a definition expression scanning section, 33 is a Subscript type built-in part, 3
Reference numeral 4 represents a vectorization propriety determination section, 35 a vector instruction generation section, and 36 a scalar instruction generation section. Patent applicant Fujitsu Limited
Claims (1)
ベクトル・ユニットと、スカシ・データを処理するスカ
シ命令を実行するスカシ・ユニットとをそなえたベクト
ル処理装置における機械語命令への翻訳処理装置におい
て、繰り返し実行される形で表わされた被翻訳命令群に
現われる配列の添字であって、動作不明な変数を含む添
字を捜し出す添字走査手段と、上記動作不明な変数を定
義する式を捜し出す定義式走査手段と、該定義式走査手
段によって捜し出された式の内容を上記添字の情報に組
込む添字式組込み手段と、該添字式組込み手段によって
生成された新たな添字情報にもとづいてベクトル化の可
否を判定する判定手段と、該判定手段の判定結果に従っ
て上記ベクトル命令を生成するベクトル命令生成処理部
とをそなえたことを特徴とするループ内配列処理ベクト
ル化処理方式。In a translation processing device into machine language instructions in a vector processing device, which is equipped with a vector unit that executes a vector instruction that processes multiple pieces of data in parallel, and a scan unit that executes a scan instruction that processes scan data, A subscript scanning means that searches for a subscript of an array that appears in a group of translated instructions expressed in a repeatedly executed form and that includes a variable whose behavior is unknown, and a definition expression that searches for an expression that defines the variable whose behavior is unknown. a scanning means, a subscript expression incorporating means for incorporating the contents of the expression found by the definition expression scanning means into the subscript information, and whether or not vectorization is possible based on the new subscript information generated by the subscript expression incorporating means. 1. An in-loop array processing vectorization processing method, comprising: a determining means for determining the above-mentioned vector instruction; and a vector instruction generation processing section for generating the vector instruction according to the determination result of the determining means.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP12417583A JPH0235349B2 (en) | 1983-07-08 | 1983-07-08 | RUUPUNAIHAIRETSUSHORIBEKUTORUKASHORIHOSHIKI |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP12417583A JPH0235349B2 (en) | 1983-07-08 | 1983-07-08 | RUUPUNAIHAIRETSUSHORIBEKUTORUKASHORIHOSHIKI |
Publications (2)
Publication Number | Publication Date |
---|---|
JPS6015772A true JPS6015772A (en) | 1985-01-26 |
JPH0235349B2 JPH0235349B2 (en) | 1990-08-09 |
Family
ID=14878822
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP12417583A Expired - Lifetime JPH0235349B2 (en) | 1983-07-08 | 1983-07-08 | RUUPUNAIHAIRETSUSHORIBEKUTORUKASHORIHOSHIKI |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH0235349B2 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5969364U (en) * | 1982-11-01 | 1984-05-11 | 旭化成株式会社 | Floating prevention structure for underground boxes |
JPS6247776A (en) * | 1985-08-27 | 1987-03-02 | Fujitsu Ltd | Vector-conversion processing system |
JPS6375935A (en) * | 1986-09-19 | 1988-04-06 | Hitachi Ltd | Array subscript analysis method |
-
1983
- 1983-07-08 JP JP12417583A patent/JPH0235349B2/en not_active Expired - Lifetime
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5969364U (en) * | 1982-11-01 | 1984-05-11 | 旭化成株式会社 | Floating prevention structure for underground boxes |
JPS6247776A (en) * | 1985-08-27 | 1987-03-02 | Fujitsu Ltd | Vector-conversion processing system |
JPS6375935A (en) * | 1986-09-19 | 1988-04-06 | Hitachi Ltd | Array subscript analysis method |
Also Published As
Publication number | Publication date |
---|---|
JPH0235349B2 (en) | 1990-08-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Agerwala | Microprogram optimization: A survey | |
US5586020A (en) | Program transformation processing system and method | |
EP0467629B1 (en) | A loop compiler method & apparatus for a data processing system | |
JPS6312029A (en) | information processing equipment | |
CN104267654A (en) | Method and system for converting ladder diagram program into instruction list program and compiling instruction list program | |
JPH06103463B2 (en) | Code generation method | |
CN113791770A (en) | Code compiler, code compiling method, code compiling system, and computer medium | |
Graham | Bounded context translation | |
US5359539A (en) | Logic design system and circuit transformation rule compiler | |
JPS6015772A (en) | Processing system for inter-loop array processing vector | |
JP2002527816A (en) | Program optimization apparatus and method | |
EP0638862B1 (en) | Method and system for processing language | |
CN113031952A (en) | Method and device for determining execution code of deep learning model and storage medium | |
Kumar et al. | Revolutionizing Compilation: Lexical Analysis Approaches for Parallel Multi-Core Processing | |
CN118780351A (en) | Deep learning compilation optimization method, device, electronic device and storage medium | |
JPH11195011A (en) | Language translation processor, language translation processing method and record medium recording language translation processing program | |
JPH05204705A (en) | Processing method for detecting undefined parameter | |
JP2024022371A (en) | Processor and program that control pipeline processing based on jump instructions | |
JPH05189243A (en) | Conditional operation compilation processor | |
JP2001043209A (en) | Multiple nest loop program compile system | |
JP2001075831A (en) | Program processor, ic test system, program processing method and storage medium | |
JP2001265605A (en) | Compiler instruction sequence optimization method, compiler device, recording medium, and program | |
CN116679939A (en) | Method, device and medium for converting PLC instruction into target language | |
JPH1063675A (en) | Data retrieving method and data retrieving device applying the method | |
JPH07114474A (en) | Array element access method and information processing apparatus |