Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0439703B2 - - Google Patents
[go: Go Back, main page]

JPH0439703B2 - - Google Patents

Info

Publication number
JPH0439703B2
JPH0439703B2 JP61143602A JP14360286A JPH0439703B2 JP H0439703 B2 JPH0439703 B2 JP H0439703B2 JP 61143602 A JP61143602 A JP 61143602A JP 14360286 A JP14360286 A JP 14360286A JP H0439703 B2 JPH0439703 B2 JP H0439703B2
Authority
JP
Japan
Prior art keywords
source program
statement
information
analysis information
program
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
JP61143602A
Other languages
Japanese (ja)
Other versions
JPS63632A (en
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 filed Critical
Priority to JP61143602A priority Critical patent/JPS63632A/en
Publication of JPS63632A publication Critical patent/JPS63632A/en
Publication of JPH0439703B2 publication Critical patent/JPH0439703B2/ja
Granted legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 [概要] 原始プログラムとその実行解析情報をもとに、
最適化のための制御行を生成し、最適化制御行の
挿入された新原始プログラムを自動作成する処理
方式および特定のプログラム単位のベクトル化情
報の収集および表示をコマンドの入力で行う処理
方式である。
[Detailed Description of the Invention] [Summary] Based on the source program and its execution analysis information,
A processing method that generates control lines for optimization and automatically creates a new source program with the optimization control lines inserted, and a processing method that collects and displays vectorization information for a specific program unit by inputting a command. be.

[産業上の利用分野] 本発明、原始プログラムの作成処理方式に係わ
り、特にプログラムの実行解析情報による最適化
処理に関するものである。
[Industrial Application Field] The present invention relates to a source program creation processing method, and particularly to optimization processing using program execution analysis information.

ベクトルプロセツサを用いてデータ処理を実行
させる場合、作成された原始プログラムを、最も
ベクトルプロセツサを有効に使用し、処理時間を
短縮するよう最適化することが要求される。
When data processing is performed using a vector processor, the created source program is required to be optimized to use the vector processor most effectively and to shorten processing time.

[従来の技術] 実際に実用データを入れてプログラムを走行さ
せた場合に、DO文により繰り返し実行される繰
返し数がどれ程になるか、またIF文により真と
なる確率はどれ程になるか等を解析し推定したの
が実行解析情報である。
[Prior art] When a program is actually run with practical data input, how many repetitions will be executed by the DO statement, and what is the probability that the IF statement will be true? Execution analysis information is estimated by analyzing the above.

現在、原始プログラムをコンパイルする段階
で、この実行解析情報を用いて、ベクトルプロセ
ツサを最も効率的に動作させるよう最適化するこ
とが可能となつている。
Currently, at the stage of compiling a source program, it is possible to use this execution analysis information to optimize the vector processor so that it operates most efficiently.

そのため、原始プログラムの所定個所に実行解
析情報を含んだ制御情報を挿入し、これに基づい
てコンパイルすることが行われている。
Therefore, control information including execution analysis information is inserted into a predetermined location of the source program, and the program is compiled based on this information.

そのための制御行は、現在はバツチ処理によつ
て自動生成および自動挿入する手段はなかつた。
そのため、この制御行を挿入するには人手によら
なければならないという問題点があつた。
Currently, there is no means to automatically generate and automatically insert control lines for this purpose through batch processing.
Therefore, there was a problem in that the control line had to be inserted manually.

また、原始プログラムをベクトルプロセツサに
より処理に適するよう変換するベクトル化のため
の情報を、特定のプログラム単位(サブルーチ
ン)ごとにコマンド等の簡単な指定より得ること
はできなかつた。
Furthermore, it has not been possible to obtain vectorization information for converting a source program into one suitable for processing by a vector processor by simply specifying a command or the like for each specific program unit (subroutine).

[発明が解決しようとする問題点] 本発明は、これら従来の問題点を解消した新規
な原始プログラムの最適化処理方式を提供しよう
とするものである。
[Problems to be Solved by the Invention] The present invention aims to provide a novel source program optimization processing method that solves these conventional problems.

[問題点を解決するための手段] 第1図は本発明の原始プログラムの最適化処理
方式の原理ブロツク図を示す。
[Means for Solving the Problems] FIG. 1 shows a principle block diagram of the original program optimization processing method of the present invention.

第1図において、1は原始プログラムからDO
文を抽出し、DO文の繰返し回数を実行解析情報
から取り出す繰返し回数取出手段である。
In Figure 1, 1 is the DO from the source program.
This is a repetition count extraction means that extracts a statement and extracts the number of repetitions of a DO statement from execution analysis information.

2はDO文の繰返し回数を設定した最適化制御
行を生成し、新原始プログラムデータセツトに挿
入する制御行生成手段1である。
Reference numeral 2 denotes a control line generation means 1 that generates an optimization control line in which the number of repetitions of the DO statement is set and inserts it into the new source program data set.

3は原始プログラムからIF文を抽出し、IF文
の真率を実行解析情報から取り出す真率取出手段
であり、4はIF文の真率を設定した最適化制御
行を生成し、新原始プログラムデータセツトに挿
入する制御行生成手段2である。
3 is a true rate extraction means that extracts the IF statement from the source program and extracts the true rate of the IF statement from the execution analysis information, and 4 generates an optimization control line in which the true rate of the IF statement is set, and generates the new source program. This is a control line generating means 2 to be inserted into the data set.

原始プログラムおよびその実行解析情報を入力
し、上記手段1,2,3,4を次々に実行させる
ことにより、最適制御行を所定個所に挿入した新
原始プログラムが生成される。
By inputting a source program and its execution analysis information and sequentially executing the above means 1, 2, 3, and 4, a new source program with optimal control lines inserted at predetermined locations is generated.

5は、原始プログラムの実行解析情報からプロ
グラム単位名をメンバとする区分編成データセツ
トを作成し表示する区分編成データセツト作成手
段である。
Reference numeral 5 denotes a partitioned data set creation means for creating and displaying a partitioned data set having program unit names as members from the execution analysis information of the source program.

6は、指定されたプログラム単位名の解析情報
により不要部分を削除したデータセツトを作成し
ベクトルコンパイラに出力するベクトル化指定情
報作成手段である。
Reference numeral 6 denotes vectorization designation information creation means for creating a data set from which unnecessary parts are deleted based on the analysis information of the designated program unit name, and outputting the data set to the vector compiler.

7は、ベクトル化指定情報作成手段6からのデ
ータによりベクトルコンパイラから出力されたベ
クトル化情報を編集し表示する解析情報表示手段
である。
Reference numeral 7 denotes an analysis information display means for editing and displaying vectorization information output from the vector compiler using data from the vectorization designation information creation means 6.

上記手段5,6,7によつて、原始プログラム
の実行解析情報から、ルーチン単位ごとにベクト
ル化の情報を得たいものを指定し、その解析情報
を表示させることができる。
By means of the means 5, 6, and 7, it is possible to specify vectorization information for each routine from the execution analysis information of the source program and display the analysis information.

[作用] 上記の構成により、原始プログラムと実行解析
データから、最適化制御行を所定個所に挿入した
新しい原始プログラムを自動的に生成することが
でき、また所望のルーチンを指定してベクトル化
情報を表示させることが可能となる。
[Operation] With the above configuration, a new source program with optimization control lines inserted at predetermined locations can be automatically generated from the source program and execution analysis data, and vectorization information can be generated by specifying a desired routine. It becomes possible to display.

[実施例] 以下第2図〜第4図に示す実施例により、本発
明をさらに具体的に説明する。
[Example] The present invention will be described in more detail below with reference to Examples shown in FIGS. 2 to 4.

第2図は本発明の実施例による最適化制御行挿
入の処理例を示すブロツク図である。
FIG. 2 is a block diagram showing an example of processing for inserting optimization control lines according to an embodiment of the present invention.

第2図において、Aは入力された原始プログラ
ムを示し、Bは原始プログラムの実行解析情報を
示し、Cは本発明による処理を示し、Dは新しく
生成された原始プログラムを示している。
In FIG. 2, A indicates an input source program, B indicates execution analysis information of the source program, C indicates processing according to the present invention, and D indicates a newly generated source program.

入力された原始プログラム例は次のような意味
を持つ。
The input source program example has the following meaning.

REAL〓8TF1(500),TF2(500),…は、実数
型8バイトの数値の、最大500個のテーブルTF1
およびTF2の配列宣言である。TF3,TF4につい
ても同様である。
REAL〓8TF1 (500), TF2 (500), ... is a table TF1 with a maximum of 500 real 8-byte numbers.
and TF2 array declaration. The same applies to TF3 and TF4.

DO 10 I=1,N 10 A(I)=I は、文番号10、即ちA(I)=IをIの1からNま
で実行せよということであり、A(I)に1から
Nまでの値を入れよということである。
DO 10 I=1,N 10 A(I)=I means execute statement number 10, that is, A(I)=I from 1 to N in I, and This means that you should enter the value of .

DO 20 J=1,M IF(J.GT.II)=THEN TF1(J)=DSIN(TF2(J))〓… ENDIF 20 CONTINUE は、Jの1からMまで、Jが11より大きければ、
TF1(J)=DSIN(TF2(J)〓…を繰返し実行せ
よということである。DSINは倍精度のSINであ
る。
DO 20 J = 1, M IF (J.GT.II) = THEN TF1 (J) = DSIN (TF2 (J)) =... ENDIF 20 CONTINUE is from J 1 to M, if J is greater than 11,
This means that you should repeatedly execute TF1 (J) = DSIN (TF2 (J) =...). DSIN is a double precision SIN.

DO 80 J=1,M IF(TF1(J).GT.0.0E0)THEN TF3(J)=DSIN(TF2(J))+… … 80 CONTINUE は、Jの1からMまで、もしTF1(J)が0.0(単
精度)より大きければ、 TF3(J)=DSIN(TF2(J))+…を繰返し実行せ
よということである。
DO 80 J=1,M IF(TF1(J).GT.0.0E0)THEN TF3(J)=DSIN(TF2(J))+… 80 CONTINUE is from 1 of J to M, if TF1(J ) is greater than 0.0 (single precision), it means that TF3 (J) = DSIN (TF2 (J)) + ... should be executed repeatedly.

実行解析処理システムに対して、原始プログラ
ムと実用データを与えて 実行解析させた結果の
例がBである。
B is an example of the result of giving the execution analysis processing system a source program and practical data and having it perform an execution analysis.

この実行解析情報には、EXECの欄に原始プロ
グラムのSTATEMENTに対応す繰返し実行回
数が記載され、TRUEの欄に原始プログラムの
STATEMENTに対応する真率が記載されてい
る。
This execution analysis information includes the number of repeated executions corresponding to STATEMENT of the source program in the EXEC column, and the TRUE column of the source program.
The true rate corresponding to STATEMENT is listed.

Cは、上記の2つのデータセツトを使用して最
適化制御行の生成、および挿入処理を行う処理を
示す。
C shows the process of generating and inserting optimization control lines using the above two data sets.

第3図は、本発明の実施例による最適化制御行
挿入処理を示す流れ図である。
FIG. 3 is a flowchart showing optimization control row insertion processing according to an embodiment of the present invention.

入力された原始プログラムを新原始プログラム
用データセツトに複写しながら、その原始プログ
ラムの実行文の種類により、以下の処理を行う。
While copying the input source program to a new source program data set, the following processing is performed depending on the type of executable statement of the source program.

原始プログラムより取り出したレコードが
DO文で、且つ繰返し回数が不明のDO文であ
るかを判断し、そうであればへ進む。
The record retrieved from the source program is
Determine whether the statement is a DO statement and the number of repetitions is unknown, and if so, proceed to step.

DO文の実行回数とDO文の直後に存在する
実行文の実行回数をプログラム実行解析データ
セツトより取り出し、実行回数をDO文の実行
回数で割算を行い、その商の値を繰返し回数
(ループ回数)として求める。
The number of executions of the DO statement and the number of executions of the executable statement that immediately follows the DO statement are extracted from the program execution analysis data set, the number of executions is divided by the number of times the DO statement is executed, and the value of the quotient is the number of repetitions (loop (number of times).

DO文の繰返し回数を設定した最適化制御行
を生成し、新原始プログラムデータセツトに挿
入する。
Generates an optimization control line that sets the number of repetitions of the DO statement and inserts it into the new source program data set.

原始プログラムより取り出したレコードが
IF文かを判断し、そうであれば、へ進む。
The record retrieved from the source program is
Determine if it is an IF statement, and if so, proceed to.

プログラム実行解析データセツトに存在する
IF文の真率を取り出す(小数点以下の値は切
り捨てる。
Exists in the program execution analysis dataset
Extract the true rate of the IF statement (values below the decimal point are rounded down).

IF文の真率を設定した最適化制御行を生成
し、新原始プログラムデータセツトに挿入す
る。
Generates an optimization control line that sets the true rate of the IF statement and inserts it into the new source program data set.

第2図のDは、このようにして新しく生成さた
原始プログラムを示す。
D in FIG. 2 shows the source program newly generated in this way.

自動的に生成、挿入さた最適化制御行は、例え
ば、繰返し回数に関するものは、 VOCL LOOP REPEAT(150) 真率に関するものでは、 VOCL STMT.IF(50) と記述され、それぞれ実行文の次に挿入される。
The automatically generated and inserted optimization control lines are written as VOCL LOOP REPEAT (150) for the number of repetitions, VOCL STMT.IF (50) for the true rate, and are placed next to the executable statement. inserted into.

VOCLは、Vectorize Optimize Control Line
の略で定めたが、コンパイラが解釈できれば如何
なる形でもよい。
VOCL stands for Vectorize Optimize Control Line
Although it is defined as an abbreviation, it can be in any form as long as it can be interpreted by the compiler.

第4図は、本発明の実施例によるベクトル化情
報の収集および表示処理を示す流れ図である。
FIG. 4 is a flowchart illustrating a process for collecting and displaying vectorized information according to an embodiment of the present invention.

第4図において、Bは第2図において示したも
のと同一な実行解析情報である。
In FIG. 4, B is the same execution analysis information as shown in FIG.

Eは、原始プログラムの実行解析情報からプロ
グラム単位名をメンバとする区分編成データセツ
トを作成し表示する手段(手段5)である。
E is a means (means 5) for creating and displaying a partitioned dataset whose members are program unit names from the execution analysis information of the source program.

Fは、原始プログラムデータセツト(順編成)
とこれから編集された区分編成データセツトを示
す。
F is the source program data set (sequential organization)
and the segmented data set compiled from this.

Gは、ベクトル化指定のための解析情報表示画
面である。
G is an analysis information display screen for specifying vectorization.

Gの中で、V−COSTはベクトルプロセツサに
より処理したときの相対的処理時間を示し、S−
COSTはスカラプロセツサにより処理したときの
相対的処理時間を示し、V−RATEはベクトル
化率をそれぞれ各ルーチンごとに示す。V−
COSTおよびV−RATEは未だベクトル化を指定
してないから“0”である。
In G, V-COST indicates the relative processing time when processed by a vector processor, and S-COST
COST indicates the relative processing time when processed by the scalar processor, and V-RATE indicates the vectorization rate for each routine. V-
COST and V-RATE are "0" because vectorization has not been specified yet.

Hは、ベクトル化の情報を得たいルーチンをコ
マンドVCHECKにより指定した画面を示す。
H indicates a screen where a routine from which vectorization information is desired is specified by the command VCHECK.

Iは、指定されたプログラム単位名の解析情報
より不要部分を削除したデータセツトを作成し、
順編成に戻して、ベクトル(VP)コンパイラに
出力する手段(手段6)である。
I creates a dataset by removing unnecessary parts from the analysis information of the specified program unit name,
This is means (means 6) for returning the data to sequential organization and outputting it to a vector (VP) compiler.

Jは、手段6により作成されたデータセツトを
示す。
J indicates the data set created by means 6.

Kは、手段6により作成したデータによりVP
コンパイラから出力されたベクトル化情報を編集
し表示する手段(手段7)を示す。
K is VP based on the data created by means 6.
A means (means 7) for editing and displaying vectorization information output from a compiler is shown.

Lは、手段7により編集されたベクトル化情報
収集後の解析情報表示画面である。
L is an analysis information display screen after vectorization information edited by means 7 is collected.

Lに示すように、ルーチン名SUB001および
SUB003にベクトルプロセツサにより処理したと
きの相対的処理時間V−COSTおよびベクトル化
率V−RATEに、VPコンパイラによる解析デー
タが表示される。
As shown in L, routine name SUB001 and
Analysis data by the VP compiler is displayed in SUB003 for the relative processing time V-COST and vectorization rate V-RATE when processed by the vector processor.

[発明の効果] 以上説明のように本発明によれば、ベクトルプ
ロセツサによる処理のための最適化を自動的に行
うことができ、処理効率の向上に寄与する効果は
大である。
[Effects of the Invention] As described above, according to the present invention, optimization for processing by a vector processor can be automatically performed, and the effect of contributing to improvement of processing efficiency is significant.

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

第1図は本発明の原理ブロツク図、第2図は本
発明の実施例による最適化制御行挿入の処理例を
示すブロツク図、第3図は本発明の実施例による
最適化制御行挿入処理を示す流れ図、第4図は本
発明の実施例によるベクトル化情報の収集および
表示処理を示す流れ図である。 図において、1は繰返し回数取出手段、2は制
御行生成手段1、3は真率取出手段、4は制御行
生成手段2、5は区分編成データセツト作成手
段、6はベクトル化指定情報作成手段、7は解析
情報表示手段、をそれぞれ示す。
Fig. 1 is a block diagram of the principle of the present invention, Fig. 2 is a block diagram showing an example of optimization control line insertion processing according to an embodiment of the invention, and Fig. 3 is an optimization control line insertion processing according to an embodiment of the invention. FIG. 4 is a flowchart illustrating the process of collecting and displaying vectorized information according to an embodiment of the present invention. In the figure, 1 is a repetition number extraction means, 2 is a control line generation means 1, 3 is a true rate extraction means, 4 is a control line generation means 2, 5 is a segmented data set generation means, and 6 is a vectorization specification information generation means. , 7 indicate analysis information display means, respectively.

Claims (1)

【特許請求の範囲】 1 原始プログラムからDO文を抽出し、DO文
の繰返し回数を実行解析情報から取り出す第1の
手段(1)と、 DO文の繰返し回数を設定した最適化制御行を
生成し、原始プログラムに挿入する第2の手段(2)
と、 原始プログラムからIF文を抽出し、IF文の真
率を実行解析情報から取り出す第3の手段(3)と、 IF文の真率を設定した制御行を生成し、原始
プログラムに挿入する第4の手段(4)を備え、 原始プログラムと実行解析情報より、最適化制
御情報を挿入した原始プログラムを生成するよう
構成したことを特徴とする原始プログラムの最適
化処理方式。 2 原始プログラムの実行解析情報からプログラ
ム単位名をメンバとする区分編成データセツトを
作成し表示する第5の手段(5)と、 指定されたプログラム単位名の解析情報より不
要部分を削除したデータセツトを作成しベクトル
コンパイラに出力する第6の手段(6)と、 前記ベクトルコンパイラのベクトル化情報を編
集し表示する第7の手段(7)を備え、指定されたプ
ログラム単位のみのベクトル化情報の収集および
表示を行うよう構成したことを特徴とする原始プ
ログラムの最適化処理方式。
[Claims] 1. A first means (1) for extracting a DO statement from a source program and extracting the number of repetitions of the DO statement from execution analysis information, and generating an optimization control line in which the number of repetitions of the DO statement is set. and the second means of inserting it into the source program (2)
A third means (3) of extracting the IF statement from the source program and extracting the true rate of the IF statement from the execution analysis information, and generating a control line that sets the true rate of the IF statement and inserting it into the source program. A source program optimization processing method, comprising the fourth means (4), and configured to generate a source program into which optimization control information is inserted from the source program and execution analysis information. 2. Fifth means (5) of creating and displaying a partitioned data set whose members are program unit names from the execution analysis information of the source program, and a data set in which unnecessary parts are deleted from the analysis information of the specified program unit name. and a seventh means (7) for editing and displaying vectorization information of the vector compiler, and a seventh means (7) for editing and displaying vectorization information of the vector compiler. A method for optimizing a source program, characterized in that it is configured to perform collection and display.
JP61143602A 1986-06-19 1986-06-19 Optimization processing system for source program Granted JPS63632A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61143602A JPS63632A (en) 1986-06-19 1986-06-19 Optimization processing system for source program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61143602A JPS63632A (en) 1986-06-19 1986-06-19 Optimization processing system for source program

Publications (2)

Publication Number Publication Date
JPS63632A JPS63632A (en) 1988-01-05
JPH0439703B2 true JPH0439703B2 (en) 1992-06-30

Family

ID=15342538

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61143602A Granted JPS63632A (en) 1986-06-19 1986-06-19 Optimization processing system for source program

Country Status (1)

Country Link
JP (1) JPS63632A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014064798A1 (en) * 2012-10-25 2014-05-01 富士通株式会社 Execution control method, and information processing device
JP6331865B2 (en) 2014-08-13 2018-05-30 富士通株式会社 Program optimization method, program optimization program, and program optimization apparatus

Also Published As

Publication number Publication date
JPS63632A (en) 1988-01-05

Similar Documents

Publication Publication Date Title
JP2765969B2 (en) Schematic data-driven program development support system
US7647587B2 (en) Methods for enhancing type reconstruction
US20030200537A1 (en) Apparatus and method for using database knowledge to optimize a computer program
JPH0432416B2 (en)
US20030051234A1 (en) Compiler apparatus and method for devirtualizing virtual method calls
US6308324B1 (en) Multi-stage profiler
JPH0439703B2 (en)
JP2000207246A (en) Debugging support apparatus and method, and recording medium recording debug support software
JP3887097B2 (en) COMPILING METHOD, COMPILING DEVICE, AND COMPUTER-READABLE STORAGE MEDIUM CONTAINING COMPILING PROGRAM
JPH09292985A (en) Program reuse parts generation method
JP2820184B2 (en) Load module unit test support device
JPH0887417A (en) Compiler device
JPH06161773A (en) Generating device for parallel processing program
JP2748582B2 (en) Compile processing unit
JP2000231478A (en) Software automatic generation apparatus and method, recording medium
JP2882876B2 (en) Program test method
JP2001154998A (en) Parallel analysis instruction method and parallel general-purpose coupled analyzer
JPH04274519A (en) Automatically executing system for accelerating program
JP3149555B2 (en) Purpose converter for system design
JPS62135958A (en) Simulation system
JP2811804B2 (en) Variable output range specification method
CN114241079A (en) Automatic generation method and device of bank system architecture diagram
JP4327533B2 (en) Arithmetic processing program, arithmetic processing method, and arithmetic processing apparatus
JPH09265402A (en) Program conversion support method and apparatus
JPH04158446A (en) Calculation system for parallelization part ratio

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term