JPH046020B2 - - Google Patents

Info

Publication number
JPH046020B2
JPH046020B2 JP3119282A JP3119282A JPH046020B2 JP H046020 B2 JPH046020 B2 JP H046020B2 JP 3119282 A JP3119282 A JP 3119282A JP 3119282 A JP3119282 A JP 3119282A JP H046020 B2 JPH046020 B2 JP H046020B2
Authority
JP
Japan
Prior art keywords
register
intermediate code
allocation
variable
array element
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
Application number
JP3119282A
Other languages
Japanese (ja)
Other versions
JPS58149543A (en
Inventor
Toshiaki Hirota
Yoshuki Tanakura
Toshihiro Hirabayashi
Masaaki Takiuchi
Masaki Aoki
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 JP3119282A priority Critical patent/JPS58149543A/en
Publication of JPS58149543A publication Critical patent/JPS58149543A/en
Publication of JPH046020B2 publication Critical patent/JPH046020B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/45Exploiting coarse grain parallelism in compilation, i.e. parallelism between groups of instructions

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Executing Machine-Instructions (AREA)
  • Complex Calculations (AREA)
  • Devices For Executing Special Programs (AREA)
  • Advance Control (AREA)

Description

【発明の詳細な説明】 (A) 発明の技術分野 本発明は、データ・レジスタ割当て処理装置、
特に例えば複数のパイプライン演算部をそなえた
ベクトル処理プロセツサに対して与えられたソー
ス・プログラムから目的プログラムを生成して供
給するコンパイラにおいて、逐次参照配列要素や
逐次参照変数のうちグローバル・レジスタ割付け
の行われなかつた変数を抽出し、或る回において
定義された値を次回の回転時における参照時点ま
でレジスタによる伝播を可能とするようレジスタ
割当てを行わせ、最適化されたコンパイル処理を
行うようにしたデータ・レジスタ割当て処理装置
に関するものである。
DETAILED DESCRIPTION OF THE INVENTION (A) Technical Field of the Invention The present invention provides a data register allocation processing device;
In particular, for example, in a compiler that generates and supplies an object program from a given source program to a vector processing processor equipped with multiple pipeline calculation units, it is necessary to use a compiler that generates and supplies an object program from a given source program to a vector processing processor equipped with multiple pipeline calculation units. Extract variables that were not executed, perform register allocation so that values defined at a certain rotation can be propagated by registers to the reference point at the next rotation, and perform optimized compilation processing. The present invention relates to a data register allocation processing device.

(B) 技術の背景と問題点 例えば、第1図Aに示す如く、ベクトルAに属
するエレメントa1,a2,…とベクトルBに属する
エレメントb1,b2,…との各エレメント相互を加
算して、エレメントC1,C2,…をもつベクトル
Cを生成するような、ベクトル命令を実行するベ
クトル処理プロセツサが存在している。第1図A
図示の場合、第番目のエレメント相互の加算を
行なうか否かをマスク・エレメントm1,m2,…
にて指示するようにされており、第1図Bに一般
化して示す如き処理が行なわれる。
(B) Technical background and problems For example, as shown in Figure 1A, if the elements a 1 , a 2 , ... belonging to vector A and the elements b 1 , b 2 , ... belonging to vector B are There are vector processing processors that execute vector instructions that add together to produce a vector C with elements C 1 , C 2 , . Figure 1A
In the illustrated case, the mask elements m 1 , m 2 ,...
The process is generalized as shown in FIG. 1B.

上記の如き処理を行なうベクトル処理プロセツ
サを有するデータ処理システムは、一実施例とし
て第2図図示の如きシステム構成をもつている。
図中の符号1は主記憶装置、2はメモリ制御装
置、3はベクトル処理プロセツサ、4はチヤネ
ル・プロセツサ、5は大記憶装置、6はスカラ処
理回路部、7はベクトル処理回路部、8−0,8
−1,…は夫々浮動小数点データ・レジスタ、9
−0,9−1,…は夫々複数個のデータ(エレメ
ント・データ)を格納し得るベクトル・レジス
タ、10−0,10−1,…は夫々複数個のマス
ク・データ(マスク・エレメント・データ)を格
納し得るマスク・レジスタ、11はベクトル長レ
ジスタであつて各ベクトル・レジスタに各納され
るエレメントの個数情報がセツトされるもの、1
2−0,12−1は夫々メモリ・アクセス・パイ
プライン、13は加減算パイプライン、14は乗
算処理パイプライン、15は除算処理パイプライ
ン、16はマスク処理パイプラインを表わしてい
る。
A data processing system having a vector processing processor that performs the above processing has a system configuration as shown in FIG. 2 as an embodiment.
In the figure, reference numeral 1 is a main storage device, 2 is a memory control device, 3 is a vector processing processor, 4 is a channel processor, 5 is a large storage device, 6 is a scalar processing circuit section, 7 is a vector processing circuit section, 8- 0,8
-1,... are floating point data registers, 9
-0, 9-1, ... are vector registers that can each store multiple pieces of data (element data), and 10-0, 10-1, ... are vector registers that can each store multiple pieces of mask data (mask element data). ); 11 is a vector length register in which information on the number of elements to be stored in each vector register is set; 1;
Reference numerals 2-0 and 12-1 represent memory access pipelines, 13 an addition/subtraction pipeline, 14 a multiplication processing pipeline, 15 a division processing pipeline, and 16 a mask processing pipeline.

上記の如きベクトル処理プロセツサが処理を実
行するに当つて、当該プロセツサが実行するに適
した形に、与えられたソース・プログラムをコン
パイルし目的プログラムを生成することが行なわ
れる。当該コンパイルを行なうコンパイラの構成
は第3図を参照して後述されるが、当該コンパイ
ルによるコンパイル処理に当つて、ベクトル処理
プロセツサが処理を実行する際に非所望な形でデ
ータ転送が生じないように、使用するデータ・レ
ジスタの割当てが行われる。
When a vector processing processor as described above executes a process, a given source program is compiled into a form suitable for execution by the processor to generate a target program. The configuration of the compiler that performs this compilation will be described later with reference to FIG. Then, the data registers to be used are allocated.

従来から、一般に変数に関しては使用するレジ
スタを1対1に割りつけるグローバル・レジスタ
方式が採用されているが、逐次参照配列要素や変
数のうちのあるものについては、上記グローバ
ル・レジスタの如き処理が行われてなく、ある回
において定義された値を次回の回転時に参照する
に当つてベクトル処理プロセツサが処理の際にス
トア処理→ロード処理→ストア処理→…の如くス
トア処理とロード処理とを繰返すこととなつてい
た。
Conventionally, a global register method has been adopted in which variables are allocated on a one-to-one basis, but for some sequentially referenced array elements and variables, processing like the global register method described above has been adopted. In order to refer to the value defined in a certain rotation at the next rotation, the vector processing processor repeats the store processing and load processing as follows: store processing -> load processing -> store processing ->... It had become commonplace.

(C) 発明の目的と構成 本発明は、上記の点を解決することを目的とし
ており、()上記逐次参照配列要素などの存在
を抽出し、()定義された値を次回の回転時に
おける参照時までレジスタによつて伝播するよう
に、コンパイルせしめることを特徴としている。
以下図面を参照しつつ説明する。
(C) Object and structure of the invention The present invention aims to solve the above points, and () extracts the existence of the above-mentioned sequential reference array element, etc., and () uses the defined value at the next rotation. It is characterized in that it is compiled so that it is propagated through registers until it is referenced.
This will be explained below with reference to the drawings.

(D) 発明の実施例 第3図は本発明に用いるコンパイラの一実施例
構成、第4図は本発明においてソース・プログラ
ムを中間コードに移してゆく態様を説明する説明
図、第5図はソース・プログラムをベクトル化し
てゆく態様を説明する説明図、第6図ないし第8
図は本発明による処理の概念を説明する説明図、
第9図および第10図は夫々本発明の一実施例構
成、第11図は逐次参照変数に対する処理例を示
している。
(D) Embodiment of the Invention Figure 3 shows the configuration of an embodiment of the compiler used in the present invention, Figure 4 is an explanatory diagram illustrating the manner in which a source program is transferred to intermediate code in the present invention, and Figure 5 is Explanatory diagrams explaining how to vectorize a source program, Figures 6 to 8
The figure is an explanatory diagram explaining the concept of processing according to the present invention,
9 and 10 respectively show the configuration of an embodiment of the present invention, and FIG. 11 shows an example of processing for sequential reference variables.

第3図において、17は大記憶装置に格納され
ているソース・プログラム、18はコンパイラ、
19はコンパイルされて大記憶装置上に格納され
る目的プログラム、20はソース解釈部、21は
記憶域割付け部、22はベクトル化部、23は中
間コード最適化部、24はレジスタ使用決定部、
25は目的プログラム出力部を表わしている。
In FIG. 3, 17 is a source program stored in a large storage device, 18 is a compiler,
19 is an object program which is compiled and stored on a large storage device; 20 is a source interpretation section; 21 is a storage allocation section; 22 is a vectorization section; 23 is an intermediate code optimization section; 24 is a register use determination section;
25 represents a target program output section.

コンパイラ18は、大記憶装置からソース・プ
ログラム17を取込んで、所望の目的プログラム
19を生成する。このとき図示の各部は次のよう
な処理を行う。
A compiler 18 takes in a source program 17 from a large storage device and generates a desired target program 19. At this time, each of the illustrated parts performs the following processing.

即ち、ソース解釈部20はソース・プログラム
17を大記憶装置から取込み、文解釈を行つて中
間コード(テキスト)に展開する。例えばソー
ス・プログラムが第4図図示左側の如き場合に図
示右側に示す如き中間コードに展開する。記憶域
割付け部21はプログラム内に出現する各種デー
タに対応して記憶域内番地を割当てる。ベクトル
化部22は、プログラム中のループ構造を検出
し、並列実行可能部分を認識し、第5図図示の如
く中間コード変更を行う。中間コード最適化部2
3は、中間コードのレベルで、第2図図示の如き
ベクトル処理プロセツサを有効に利用するための
最適化を施す。レジスタ使用決定部24は、中間
コードに現われたデータに対して、ベクトル処理
プロセツサ上の資源(レジスタ)を割当てる。そ
して目的プログラム出力部25は機械命令語を大
記憶装置へ出力しかつ命令語レベルでの最適化を
行う。
That is, the source interpreter 20 takes in the source program 17 from the large storage device, performs sentence interpretation, and develops it into intermediate code (text). For example, if the source program is as shown on the left side of FIG. 4, it is developed into intermediate code as shown on the right side of the figure. The storage area allocation unit 21 allocates addresses within the storage area corresponding to various data appearing within the program. The vectorizer 22 detects loop structures in the program, recognizes parallel executable portions, and changes intermediate code as shown in FIG. Intermediate code optimization section 2
3 performs optimization at the intermediate code level to effectively utilize a vector processing processor as shown in FIG. The register use determining unit 24 allocates resources (registers) on the vector processing processor to data appearing in the intermediate code. Then, the target program output unit 25 outputs the machine instruction words to the large storage device and performs optimization at the instruction word level.

ベクトル処理プロセツサを稼働させるためのコ
ンパイラは第3図図示の如き構成をもつており、
上記レジスタ使用決定部24が、ベクトル処理プ
ロセツサによる処理が行われる際に使用される当
該プロセツサ上のデータ・レジスタの割当てを行
う。しかし、次の如き問題が生じる。
The compiler for operating the vector processing processor has the configuration shown in Figure 3.
The register use determining unit 24 allocates data registers on the vector processing processor to be used when processing is performed by the processor. However, the following problem arises.

今、例えば第6図A図示の如きソース・プログ
ラムが与えられると、一般には第7図A図示の如
く目的プログラムが生成される。即ち「()デ
ータA(I)をレジスタ「0」にロードし、()
レジスタ「0」の内容をデータBとしてストア
し、()レジスタ「0」の内容にデータCを加
算し、()レジスタ「0」の内容をデータA(I
+1)としてストアする」という処理を繰返すよ
うに目的プログラムが生成される。しかし、上記
において例えばIの値がkのとき ST 0,A(I+1) においてストアされるレジスタ「0」の内容は、
次回の回転即ちI=(k+1)のとき L 0,A(I) においてレジスタ「0」にロードされる内容と同
じものである。したがつて、I=kのときに定義
された配列要素Aの値をI=(k+1)のときの
参照のために、レジスタの内容を保持することに
よつて伝播することが望まれる。
Now, when a source program as shown in FIG. 6A is given, a target program as shown in FIG. 7A is generally generated. That is, "() Load data A(I) into register "0", ()
Store the contents of register "0" as data B, () add data C to the contents of register "0", () store the contents of register "0" as data A (I
The target program is generated so as to repeat the process of ``store as +1)''. However, in the above example, when the value of I is k, the contents of register "0" stored at ST 0, A(I+1) are:
This is the same content that will be loaded into register "0" at L 0,A(I) in the next rotation, that is, when I=(k+1). Therefore, it is desirable to propagate the value of array element A defined when I=k by holding the contents of a register for reference when I=(k+1).

このために、本発明の一実施例においては、第
6図A図示の如きソース・プログラムが与えられ
たとき、第6図Aと同様な表現で表わして第6図
B図示の如き形に変形して、レジスタ使用決定部
24によつて使用レジスタを決定させるようにす
る。このようにすると、第6図B図示の処理は、
目的プログラム上で第7図B図示の如くなり、最
初にデータA(I)をループ外で例えばレジスタ
「2」に一度ロードするだけで足りるようになる。
For this purpose, in one embodiment of the present invention, when a source program as shown in FIG. 6A is given, it is expressed in the same expression as in FIG. 6A and transformed into a form as shown in FIG. 6B. Then, the register usage determining unit 24 determines the register to be used. In this way, the process shown in FIG. 6B is as follows.
The target program becomes as shown in FIG. 7B, and it is sufficient to first load data A(I) once into register "2" outside the loop.

第8図は、逐次参照変数Vがグローバル・レジ
スタにセツトされなかつた場合についての処理を
表わしている。即ち、第8図Aにおいては、例え
ばI=kのときの変数Vの値がI=(k+1)の
とき C=V*B なる処理を行う際に参照される形となつている。
FIG. 8 shows the processing when the sequential reference variable V is not set in the global register. That is, in FIG. 8A, for example, when I=k, the value of variable V is I=(k+1), which is referred to when performing the process C=V*B.

このような場合、第8図Bに概念的に示す如
く、変数Vを或るレジスタγにループ外の処理と
して一旦ロードしておくようにし、当該レジスタ
γの内容を用いて C=γ*B なる形で参照し、次いで γ=V+D なる形で変数Vの値をレジスタにセツトするよう
にする。このようにすることによつて、I=kの
ときに定義されたレジスタγの内容(Vの値)
は、I=(k+1)のときにレジスタによる伝播
によつて伝播されて、参照される形となる。即
ち、各回転が行われる都度、ストア→ロード→ス
トア→…が行われることがなくなる。
In such a case, as conceptually shown in Figure 8B, the variable V is temporarily loaded into a certain register γ as a process outside the loop, and the contents of the register γ are used to calculate C=γ*B. Then, the value of variable V is set in the register in the form γ=V+D. By doing this, the contents of register γ (value of V) defined when I=k
is propagated by register propagation and becomes referenced when I=(k+1). That is, store→load→store→ etc. is not performed every time each rotation is performed.

第9図は、第6図および第7図を参照して説明
した処理を実行する一実施例を示している。な
お、図示の符号26,27の処理は、第3図図示
の中間コード最適化部23において行われるもの
と考えてよい。図中26は配列要素検出部、27
は配列要素置換部、28はレジスタ割付け部であ
つて第3図図示のレジスタ使用決定部24におい
て行われるものを表わしている。
FIG. 9 shows an embodiment for carrying out the process described with reference to FIGS. 6 and 7. Note that the illustrated processes 26 and 27 may be considered to be performed in the intermediate code optimization section 23 illustrated in FIG. In the figure, 26 is an array element detection unit, 27
28 is an array element replacement section, and 28 is a register allocation section, which is performed in the register use determination section 24 shown in FIG.

図示検出部26は、第6図Aに示す如き配列要
素A(I)やA(I+1)の存在を、配列上の条件
と添字に関する条件とアドレスに関する条件とに
よつて検出する。即ち、 例えば配列上の条件としては、()ループ内
で定義かつ参照されることや()ループの実行
時に制御が必ず移行するブロツクにあることなど
を調べる。またアドレスに関する条件は、 (定義される配列要素のアドレス) −(参照される配列要素のアドレス) =(添字のループ内増分値) などによつて検出する。配列要素置換部27は、
()第6図B図示の如くループの準備ブロツク
にて内部変数GNの形で初期値A()をセツト
し、()第6図A図示の B(I)=A(I) の如き配列要素Aの参照を第6図B図示の如く B(I)=GN の形で上記内部変数GNの参照に置換し、()
第6図A図示の A(I+1)=B(I)+C(I) の如き定義を第6図B図示の如く GN=B(I)+C(I) A(I+1)=GN の形で内部変数GNの定義を介在させた形式に変
更する。そして言うまでもなく、第9図図示のレ
ジスタ割付け部28は、入力されてきた中間コー
ド(中間コードの形で入力される)にもとづいて
順次レジスタを割当ててゆく。この結果が第7図
B図示の如きものとなる。
The illustrated detection unit 26 detects the existence of array elements A(I) and A(I+1) as shown in FIG. 6A based on array conditions, subscript conditions, and address conditions. That is, for example, conditions on the array include that it is defined and referenced within the () loop, and that control is always transferred to a block when the () loop is executed. In addition, conditions related to addresses are detected by (address of defined array element) - (address of referenced array element) = (intra-loop increment value of subscript). The array element replacement unit 27
() Set the initial value A() in the form of internal variable GN in the loop preparation block as shown in Figure 6B, and create an array such as B(I) = A(I) as shown in Figure 6A. Replace the reference to element A with the reference to the internal variable GN in the form B(I)=GN as shown in Figure 6B, and write ()
The definition such as A(I+1)=B(I)+C(I) shown in Figure 6A is internalized in the form GN=B(I)+C(I) A(I+1)=GN as shown in Figure 6B. Change the definition of variable GN to an interposed format. Needless to say, the register allocation section 28 shown in FIG. 9 sequentially allocates registers based on the input intermediate code (input in the form of an intermediate code). The result is as shown in FIG. 7B.

第10図は、第8図を参照して説明した処理を
実行する一実施例を示している。なお、図示の処
理は、グローバル・レジスタに対して割付けられ
なかつた変数について行われるものであることか
ら、第3図図示のレジスタ使用決定部24におい
てグローバル・レジスタの使用が決定した後に行
われる。図中、29は逐次参照変数検出部であつ
てグローバル・レジスタに割つけられなかつた変
数を検出して処理対象の変数を抽出する。30は
レジスタ伝播範囲検出部であつて、レジスタ伝播
がどの範囲で行われるかを決定する。例えば1つ
のループ内で複数回の定義が行われる場合には、
最後の定義点が伝播開始点となる。また1つのル
ープ内で複数回の参照が行われる場合には、最初
の参照点が伝播終了点となる。
FIG. 10 shows an embodiment for executing the process described with reference to FIG. Note that the illustrated processing is performed on variables that have not been allocated to global registers, and is therefore performed after the use of the global registers has been determined in the register use determining unit 24 shown in FIG. In the figure, numeral 29 is a sequential reference variable detection unit that detects variables that have not been allocated to global registers and extracts variables to be processed. 30 is a register propagation range detection unit that determines in which range register propagation is performed. For example, if multiple definitions are performed within one loop,
The last defined point becomes the propagation starting point. Furthermore, when reference is made multiple times within one loop, the first reference point becomes the propagation end point.

更に31はレジスタ伝播処理部である。該処理
部31は次の如き処理を行う。即ち、 (1) 最初に、伝播媒体となるレジスタ(Rtとす
る)を抽出する。即ち、レジスタRtとしては
当該変数が定義される際に使用されるレジスタ
(Rdとする)であるか、変数参照点までにレジ
スタRdの内容が転送される他のレジスタ(Rf
とする)であるか、伝播範囲内で未使用のレジ
スタ(Ruとする)であるかのいずれかであり
実際にはグローバル・レジスタの割付けが終了
した後にレジスタRtが決定される。
Furthermore, 31 is a register propagation processing section. The processing section 31 performs the following processing. That is, (1) First, extract a register (referred to as Rt) that will be a propagation medium. In other words, register Rt is either a register (referred to as Rd) used when the variable is defined, or another register (rf) to which the contents of register Rd are transferred up to the variable reference point.
) or an unused register within the propagation range (referred to as Ru), and in reality, register Rt is determined after global register allocation is completed.

(2) もしもレジスタRtがレジスタRdでなかつた
場合には、レジスタRdの内容をストアする処
理の際にレジスタRdの内容をレジスタRtに転
送する処理を附加させる。
(2) If register Rt is not register Rd, add processing to transfer the contents of register Rd to register Rt during the process of storing the contents of register Rd.

(3) レジスタRtが決まれば、変数Vの参照に対
応して、レジスタRtの内容を参照するように
レジスタRtの割付けを行う。
(3) Once register Rt is determined, register Rt is allocated so that the contents of register Rt are referenced in response to reference to variable V.

(4) ループの準備ブロツクにおいて、変数Vの値
をレジスタRtにロードする命令を生成する。
(4) In the loop preparation block, generate an instruction to load the value of variable V into register Rt.

(5) もしも、当該ループの実行が終了した後に、
上記変数Vがループ外において参照される場合
には、ループの外において上記レジスタRtの
内容をストアする命令を生成する。
(5) If after the execution of the loop finishes,
When the variable V is referenced outside the loop, an instruction to store the contents of the register Rt is generated outside the loop.

第11図は、第11図A図示の如き、ソース・
プログラムが与えられた際に、レジスタRt=Rd
のとき(第11図B)、レジスタRt=Rfのとき
(第11図C、レジスタRt=Rd=Rfのとき(第
11図D)の夫々において、得られた目的プログ
ラムが夫々図示右側のものに変更された形となつ
ていることを示している。いずれの場合において
も、ループ外において、ロード(L)を実行して
おり、また必要に応じてループ外においてストア
(ST)を行つている形となつている。
FIG. 11 shows the source information as shown in FIG. 11A.
When the program is given, register Rt=Rd
(Figure 11B), when register Rt=Rf (Figure 11C), and when register Rt=Rd=Rf (Figure 11D), the obtained target programs are shown on the right side of the figure. In either case, a load (L) is executed outside the loop, and a store (ST) is executed outside the loop as necessary. It is taking shape.

(E) 発明の効果 以上説明した如く、本発明によれば、ループ回
転の間に、逐次参照データがレジスタによる伝播
によつて伝播される形となり、プロセツサによる
処理が行われる際に、非所望な形でのロード/ス
トア処理が大幅に減少される。
(E) Effects of the Invention As explained above, according to the present invention, sequentially referenced data is propagated by registers during loop rotation, and undesired load/store operations are significantly reduced.

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

第1図はベクトル命令に対応した処理を概念的
に説明する説明図、第2図は本発明にいうベクト
ル処理プロセツサを有する処理システムの一実施
例、第3図は本発明に用いるコンパイラの一実施
例構成、第4図はソース・プログラムを中間コー
ドに移してゆく態様を説明する説明図、第5図は
ソース・プログラムをベクトル化してゆく態様を
説明する説明図、第6図ないし第8図は本発明に
よる処理の概念を説明する説明図、第9図および
第10図は夫々本発明の一実施例構成、第11図
は逐次参照変数に対する処理例を示している。 図中、1は主記憶装置、2はメモリ制御装置、
3はベクトル処理プロセツサ、4はチヤネル・プ
ロセツサ、5は大記憶装置、9はベクトル・レジ
スタ、10はマスク・レジスタ、11ないし16
は夫々パイプライン演算部、17はソース・プロ
グラム、18はコンパイラ、19は目的プログラ
ム、20はソース解釈部、21は記憶域割付け
部、22はベクトル化部、23は中間コード最適
化部、24はレジスタ使用決定部、25は目的プ
ログラム出力部を表わしている。
FIG. 1 is an explanatory diagram conceptually explaining processing corresponding to vector instructions, FIG. 2 is an example of a processing system having a vector processing processor according to the present invention, and FIG. 3 is an example of a compiler used in the present invention. Embodiment configuration, FIG. 4 is an explanatory diagram illustrating the manner in which a source program is transferred to intermediate code, FIG. 5 is an explanatory diagram illustrating a manner in which a source program is vectorized, and FIGS. 6 to 8 9 is an explanatory diagram for explaining the concept of processing according to the present invention, FIGS. 9 and 10 each show an embodiment of the present invention, and FIG. 11 shows an example of processing for sequentially referenced variables. In the figure, 1 is a main storage device, 2 is a memory control device,
3 is a vector processing processor, 4 is a channel processor, 5 is a large storage device, 9 is a vector register, 10 is a mask register, 11 to 16
17 is a source program, 18 is a compiler, 19 is an objective program, 20 is a source interpreter, 21 is a storage allocation unit, 22 is a vectorization unit, 23 is an intermediate code optimization unit, 24 25 represents a register use determining section, and 25 represents a target program output section.

Claims (1)

【特許請求の範囲】 1 与えられたソース・プログラムから目的プロ
グラムを生成して供給するコンパイル装置におい
て、 上記ソース・プログラムの文解釈を行つて中間
コードに展開するソース解釈手段、 プログラム中に出現する各種データの記憶域内
番地を割り当てる記憶域割付け手段、 中間コードのレベルでプロセツサを有効に利用
するための最適化を施す中間コード最適化手段、 中間コードに現われたデータに実際の資源を割
り当てるレジスタ使用決定手段、 および目的プログラム出力手段をそなえてな
り、 更に、上記中間コード最適化手段は、少なくと
も、 逐次参照配列要素の存在を配列上の条件と添字
に関する条件とアドレスに関する条件とによつて
検出する逐次参照配列要素検出手段と、 当該逐次参照配列要素を内部変数を定義しかつ
当該定義された内部変数を利用する形で置換する
配列要素置換手段と、 をそなえると共に、 上記レジスタ使用決定手段は、与えられた中間
コードにもとづいてレジスタを割当ててゆき上記
逐次参照配列要素が定義されるレジスタの内容を
少なくとも次回の回転時に参照されるまで当該レ
ジスタ上に保持するレジスタ割付け手段をそな
え、 定義時の上記逐次参照配列要素の値を次回の回
転時に上記レジスタを介して伝播させるようにし
た ことを特徴とするデータ・レジスタ割当て処理装
置。 2 与えられたソース・プログラムから目的プロ
グラムを生成して供給するコンパイル装置におい
て、 上記ソース・プログラムの文解釈を行つて中間
コードに展開するソース解釈手段、 プログラム中に出現する各種データの記憶域内
番地を割り当てる記憶域割付け手段、 中間コードのレベルでプロセツサを有効に利用
する上での最適化を施す中間コード最適化手段、 中間コードに現われたデータに実際の資源を割
当てるレジスタ使用決定手段、 および目的プログラム出力手段をそなえてな
り、 更に、上記レジスタ使用決定手段は、与えられ
た中間コードにもとづいてレジスタを逐次割当て
てゆくレジスタ割付け手段を有すると共に、 少なくとも、 グローバル・レジスタ割付けのなされていない
逐次参照変数を検出する逐次参照変数検出手段
と、 1つのループ内でのレジスタ使用に当たつて最
後の定義点から次回の回転における最初の参照点
までのレジスタ伝播が行われる範囲を検出するレ
ジスタ伝播範囲検出手段と、 注目されるレジスタが、変数が定義される際に
使用される第1種のレジスタと、変数参照点まで
に上記第1種のレジスタの内容が転送される第2
種のレジスタと、伝播範囲内で未使用の第3種の
レジスタとのいずれであるかを調べた上で上記逐
次参照変数を伝播媒体となるレジスタに割付ける
と共に割付けに整合せしめる命令を生成するレジ
スタ伝播処理手段と をそなえ、 定義時の上記逐次参照変数の値を次回の回転時
に上記レジスタを介して伝播させるようにした ことを特徴とするデータ・レジスタ割当て処理装
置。
[Scope of Claims] 1. In a compiling device that generates and supplies a target program from a given source program, a source interpreter that interprets the sentences of the source program and develops it into intermediate code; Storage allocation means for allocating addresses within storage areas for various data; intermediate code optimization means for optimizing the processor to make effective use of the intermediate code; and register use for allocating actual resources to data appearing in intermediate code. and a target program output means; furthermore, the intermediate code optimization means detects the existence of a sequentially referenced array element based on at least a condition on the array, a condition on the subscript, and a condition on the address. The register use determining means comprises: a sequentially referenced array element detecting means; and an array element replacing means for replacing the sequentially referenced array element in a manner that defines an internal variable and uses the defined internal variable. A register allocation means is provided which allocates a register based on a given intermediate code and holds the contents of the register in which the sequentially referenced array element is defined in the register at least until the next rotation. A data register allocation processing device characterized in that the value of the sequential reference array element is propagated through the register during the next rotation. 2. In a compiling device that generates and supplies a target program from a given source program, a source interpreter that interprets the sentences of the source program and develops it into intermediate code, and addresses in the storage area of various data that appear in the program. A storage allocation means for allocating a memory area, an intermediate code optimization means for optimizing the effective use of a processor at the intermediate code level, a register use determination means for allocating actual resources to data appearing in the intermediate code, and a purpose. The register use determining means further includes register allocation means for sequentially allocating registers based on a given intermediate code, and at least sequential reference to which no global register allocation has been made. A sequential reference variable detection means for detecting variables; and a register propagation range for detecting the range in which register propagation is performed from the last definition point to the first reference point in the next rotation when registers are used within one loop. detection means, and the register of interest is a first type register used when a variable is defined and a second type register to which the contents of the first type register are transferred up to a variable reference point.
After checking whether it is a seed register or a third type register that is unused within the propagation range, it generates an instruction that allocates the sequential reference variable to the register that becomes the propagation medium and makes it consistent with the allocation. 1. A data register allocation processing device, comprising register propagation processing means, wherein the value of the sequential reference variable at the time of definition is propagated via the register at the next rotation.
JP3119282A 1982-02-27 1982-02-27 Processing system of assignment of data register Granted JPS58149543A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3119282A JPS58149543A (en) 1982-02-27 1982-02-27 Processing system of assignment of data register

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3119282A JPS58149543A (en) 1982-02-27 1982-02-27 Processing system of assignment of data register

Publications (2)

Publication Number Publication Date
JPS58149543A JPS58149543A (en) 1983-09-05
JPH046020B2 true JPH046020B2 (en) 1992-02-04

Family

ID=12324558

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3119282A Granted JPS58149543A (en) 1982-02-27 1982-02-27 Processing system of assignment of data register

Country Status (1)

Country Link
JP (1) JPS58149543A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01159734A (en) * 1987-12-16 1989-06-22 Fujitsu Ltd Data form conversion processing system in recursive operation

Also Published As

Publication number Publication date
JPS58149543A (en) 1983-09-05

Similar Documents

Publication Publication Date Title
US6202204B1 (en) Comprehensive redundant load elimination for architectures supporting control and data speculation
JP6159825B2 (en) Solutions for branch branches in the SIMD core using hardware pointers
US4965724A (en) Compiler system using reordering of microoperations to eliminate interlocked instructions for pipelined processing of assembler source program
US5247696A (en) Method for compiling loops having recursive equations by detecting and correcting recurring data points before storing the result to memory
JPS6028015B2 (en) information processing equipment
JP2016504699A (en) Hardware and software solutions for branching in parallel pipelines
Ebcioglu et al. Optimizations and oracle parallelism with dynamic translation
Wichmann et al. ALGOL 60 compilation and assessment
US20030079210A1 (en) Integrated register allocator in a compiler
KR101293700B1 (en) Method and apparatus of generating code for coarse-grained reconfigurable architecture
Liu et al. Techniques of program execution with a writable control memory
JPH046020B2 (en)
CN114127684B (en) Compiler for RISC processor with special register
JPS59165147A (en) Making into vector instruction system of conditional statement compiler
JPS6319906B2 (en)
JPH06103462B2 (en) Vector length control range division processing method
JP2556148B2 (en) Vector register allocation method
JPS6321946B2 (en)
Lindahl et al. Unboxed compilation of floating point arithmetic in a dynamically typed language environment
JPS62204374A (en) Processing system for double arithmetic optimization
JPS6319908B2 (en)
JPH053030B2 (en)
JPS6027947A (en) Vector generation system of loop including part which can not be made into vector in compiler
JPS6116362A (en) Vector processor control processing system
JPH0142019B2 (en)