JPH0795275B2 - Compile processor - Google Patents

Compile processor

Info

Publication number
JPH0795275B2
JPH0795275B2 JP62286604A JP28660487A JPH0795275B2 JP H0795275 B2 JPH0795275 B2 JP H0795275B2 JP 62286604 A JP62286604 A JP 62286604A JP 28660487 A JP28660487 A JP 28660487A JP H0795275 B2 JPH0795275 B2 JP H0795275B2
Authority
JP
Japan
Prior art keywords
mathematical function
function
processing
unit
conversion
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 - Fee Related
Application number
JP62286604A
Other languages
Japanese (ja)
Other versions
JPH01128136A (en
Inventor
真理子 坂本
浩士 長倉
秀夫 高嶋
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 JP62286604A priority Critical patent/JPH0795275B2/en
Publication of JPH01128136A publication Critical patent/JPH01128136A/en
Publication of JPH0795275B2 publication Critical patent/JPH0795275B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Description

【発明の詳細な説明】 〔概要〕 例えば平方根関数のような数学関数を含むソースプログ
ラムのコンパイルを行うコンパイル処理装置に関し, 数学関数がより高速処理ができる別の数学関数に変換可
能か否かを認識し,その変換を行うことによって,数学
関数の処理を最適化することを目的とし, 数学関数を含むソースプログラム(9)をコンパイルす
るコンパイル処理装置において, 前記ソースプログラム(9)を解析し中間言語を出力す
る構文解析部(3)と, 数学関数を使用形態において別の数学関数に変換する条
件を設定する条件記憶部(12)と, 前記条件記憶部(12)の内容および前記構文解析部
(3)が出力した中間言語にもとづいて,前記数学関数
を前記別の数学関数に変換する変換部(6)と, 前記変換部(6)の変換結果について目的コードを生成
する目的コード生成部(7)と から構成される。
DETAILED DESCRIPTION OF THE INVENTION [Outline] A compile processing device for compiling a source program including a mathematical function such as a square root function, and whether or not the mathematical function can be converted into another mathematical function capable of higher speed processing. In a compile processing device for compiling a source program (9) including a mathematical function for the purpose of optimizing the processing of the mathematical function by recognizing and performing the conversion, the source program (9) is analyzed and intermediate A syntax analysis unit (3) for outputting a language, a condition storage unit (12) for setting conditions for converting a mathematical function into another mathematical function in a usage pattern, contents of the condition storage unit (12) and the syntax analysis A conversion unit (6) for converting the mathematical function into the different mathematical function based on the intermediate language output by the unit (3), and a conversion result of the conversion unit (6). Constructed from object code generator for generating an object code and (7).

〔産業上の利用分野〕[Industrial application field]

本発明はコンパイル処理装置に関し,更に詳しくは,例
えば平方根関数のような数学関数を含むソースプログラ
ムのコンパイルを行うコンパイル処理装置に関する。
The present invention relates to a compilation processing device, and more particularly, to a compilation processing device for compiling a source program including a mathematical function such as a square root function.

科学技術計算の分野で用いられるプログラムにおいて
は,基本的な数学関数(平方根関数,指数関数,対数関
数,三角関数等)が大きなコストを占める(実行時間の
大きな割合を占める)ものが少なくない。
In many programs used in the field of scientific and technological calculation, many basic mathematical functions (square root function, exponential function, logarithmic function, trigonometric function, etc.) occupy a large cost (occupy a large proportion of execution time).

このようなプログラムでは,数学関数の処理の最適化に
よる処理速度の高速化が,実行性能の向上つまりプログ
ラム全体の実行時間の大幅な短縮に大きな効果をもたら
す。
In such a program, the speedup of the processing speed by optimizing the processing of the mathematical function has a great effect on the improvement of the execution performance, that is, the substantial reduction of the execution time of the entire program.

〔従来の技術〕[Conventional technology]

第4図は従来の数学関数のコンパイル処理の例を示す図
である。
FIG. 4 is a diagram showing an example of conventional compilation processing of a mathematical function.

ソースプログラムが入力されると(),コンパイラは
その構文解析を行い(),その解析結果に従ってソー
スプログラムと等価の中間言語(コード)を生成する
()。
When a source program is input (), the compiler parses it () and generates an intermediate language (code) equivalent to the source program according to the analysis result ().

ソースプログラムがFORTRANにより図示の如く, F=Q/SQRT(X+Y) −(1) と記述されていた場合,中間言語は例えば, とされる。ここで,SQRTは平方根関数,t1とt2はコンパイ
ラが生成した作業変数である。
When the source program is described by FORTRAN as F = Q / SQRT (X + Y)-(1), the intermediate language is, for example, It is said that Where SQRT is the square root function and t1 and t2 are the work variables generated by the compiler.

次に,コンパイラは,生成された中間言語に従って,目
的(オブジェクト)コードを生成する()。従って,
数学関数を処理するためのプログラムが格納された関数
ライブラリからは,平方根関数SQRTのプログラムが呼出
される()。
Next, the compiler generates a target (object) code according to the generated intermediate language (). Therefore,
The program of the square root function SQRT is called from the function library that stores the program for processing mathematical functions ().

平方根関数SQRTの処理においては,(2)式のt2=SQRT
(t1)を処理する場合,実際は,計算機内ではその処理
の都合上, の如き処理が行われるようにされている。
In the processing of the square root function SQRT, t2 = SQRT in equation (2)
When processing (t1), in reality, due to the processing convenience, The above processing is performed.

従って,(1)式は,実際は, の如く処理される。Therefore, equation (1) is actually Is processed as follows.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

前述の従来技術においては,数学関数の処理の最適化の
手段として,主に関数自体(関数ライブラリに格納され
た関数プログラム)の性能向上のみが考慮され,数学関
数がソースプログラムにおいてどのように使用されてい
るかという使用形態が考慮されることはなかった。
In the above-mentioned conventional technique, only the performance improvement of the function itself (function program stored in the function library) is mainly considered as means for optimizing the processing of the mathematical function, and how the mathematical function is used in the source program. The usage pattern of whether or not it was done was not considered.

即ち,(3)式の如き処理のなされる数学関数SQRTが
(1)式の如くソースプログラムで使用される場合, の如くに変換することにより,(4)式に比べ2回の割
算を省略して高速に処理することが可能であるにも拘ら
ず,(5)式による処理が行われることはなかった。
That is, when the mathematical function SQRT that is processed as shown in equation (3) is used in the source program as shown in equation (1), By performing the conversion as described above, it is possible to omit the division twice and process at high speed as compared with the expression (4), but the processing according to the expression (5) is not performed. .

換言すれば,数学関数の使用形態を認識して,数学関数
を別の数学関数に変換する,即ち,関数ライブラリから
の呼出し形式を変換する((3)式の のみを呼出すか,またはこれに相当する関数プログラム
を呼出す)ことは行われない。即ち,従来のコンパイラ
は,数学関数の使用形態の認識による最適化という手段
を持たないため,ソースプログラムの記述そのままの数
学関数に対応するような目的コードを生成するのみであ
った。
In other words, the usage form of the mathematical function is recognized, and the mathematical function is converted into another mathematical function, that is, the calling form from the function library is converted ((3) (Or only the corresponding functional program is called). That is, since the conventional compiler has no means for optimization by recognizing the usage form of the mathematical function, it only generates the target code corresponding to the mathematical function as it is in the description of the source program.

本発明は,数学関数がより高速処理ができる別の数学関
数に変換可能か否かを認識し,その変換を行うことによ
って,数学関数の処理を最適化することが可能なコンパ
イル処理装置を提供することを目的とする。
The present invention provides a compile processing device capable of optimizing the processing of a mathematical function by recognizing whether or not the mathematical function can be converted into another mathematical function capable of higher speed processing and performing the conversion. The purpose is to do.

〔問題点を解決するための手段〕[Means for solving problems]

第1図は本発明の原理構成図であり,本発明によるコン
パイラを備えた処理装置を示している。
FIG. 1 is a block diagram of the principle of the present invention, showing a processing device equipped with a compiler according to the present invention.

第1図において,1は中央処理装置(CPU)とメモリとを
含む処理装置,2はコンパイラ,3は構文解析部,4は最適化
処理部,5は認識部,6は変換部,7は目的コード生成部,8は
結合編集処理部,9はソースプログラム,10はオブジェク
トモジュール,11は関数ライブラリ,12は変換テーブル,1
3はロードモジュールである。
In FIG. 1, 1 is a processing unit including a central processing unit (CPU) and memory, 2 is a compiler, 3 is a syntactic analysis unit, 4 is an optimization processing unit, 5 is a recognition unit, 6 is a conversion unit, and 7 is Target code generator, 8 is a combined edit processor, 9 is a source program, 10 is an object module, 11 is a function library, 12 is a conversion table, 1
3 is a load module.

FORTRANの如き高級言語で記述されたソースプログラム
9は,コンパイラ2によって機械語コードに翻訳され,
その翻訳結果である目的コードの集合はオブジェクトモ
ジュール10として格納される。リンケージエディタの如
き結合編集処理部8は,目的コードに従って関数ライブ
ラリ11から呼出した関数プログラムと目的コード(オブ
ジェクトモジュール10)とを結合させて,関数プログラ
ムを直ちに参照できるようにした(実行可能な形式にし
た)ロードモジュール13を編集し,格納する。
The source program 9 written in a high-level language such as FORTRAN is translated into machine language code by the compiler 2,
The set of object codes that are the translation results are stored as the object module 10. The linkage edit processing unit 8 such as the linkage editor links the function program called from the function library 11 and the target code (object module 10) according to the target code so that the function program can be immediately referred to (executable format Edit the load module 13 and store it.

コンパイラ2において,構文解析部3は,ソースプログ
ラム9を解析して,中間言語(最適化前)に展開する。
最適化処理部4は,数学関数の使用形態を考慮すること
によって,中間言語の最適化を行う。この最適化された
中間言語について,目的コード生成部7が目的コードを
生成し,オブジェクトモジュール10に展開する。
In the compiler 2, the syntax analysis unit 3 analyzes the source program 9 and expands it into an intermediate language (before optimization).
The optimization processing unit 4 optimizes the intermediate language by considering the usage form of the mathematical function. With respect to this optimized intermediate language, the object code generator 7 generates an object code and expands it in the object module 10.

最適化処理部4においては,次の如き処理が行われる。The optimization processing unit 4 performs the following processing.

構文解析部3からの中間言語を入力とする認識部5は,
その中間言語に含まれる数学関数がより高速処理できる
別の数学関数に変換可能か否かを認識する。この認識
は,数学関数が所定の条件を満足する形で使用されてい
るかを調べることによって行われる。
The recognition unit 5, which receives the intermediate language from the parsing unit 3, as input,
Recognize whether or not a mathematical function included in the intermediate language can be converted into another mathematical function that can be processed at higher speed. This recognition is performed by checking whether the mathematical function is used in a manner satisfying a predetermined condition.

このために,例えば,変換テーブル12が用意される。変
化テーブル12には,変換のために満足すべき所定の条件
と,変換後の別の数学関数およびその使用条件とが登録
される。即ち,認識部5は,まず数学関数の使用形態を
認識し,次にこれが変換テーブル12に登録された所定の
条件と一致するかを変換テーブル12を参照して判断する
(一致する時に変換可能とされる)。なお,変換テーブ
ル12は,関数ライブラリ11内または最適化処理部4内に
設けられてもよい。
For this purpose, for example, the conversion table 12 is prepared. In the change table 12, a predetermined condition that should be satisfied for conversion, another mathematical function after conversion, and its use condition are registered. That is, the recognizing unit 5 first recognizes the usage form of the mathematical function, and then determines whether or not this matches a predetermined condition registered in the conversion table 12 by referring to the conversion table 12 (when the matching condition is satisfied, conversion is possible. And)). The conversion table 12 may be provided in the function library 11 or the optimization processing unit 4.

変換部6は,認識部5が変換可能とした数学関数につい
て,変換テーブル12を参照することによって,他の数学
関数への変換を行い,これに伴う必要な処理を行う。
The conversion unit 6 converts the mathematical function convertible by the recognition unit 5 into another mathematical function by referring to the conversion table 12, and performs necessary processing associated with the conversion.

関数ライブラリ11は,変換前の数学関数についての関数
プログラムの他,変換後の数学関数についての関数プロ
グラムも含むようにされる。
The function library 11 is configured to include a function program for a mathematical function before conversion and a function program for a mathematical function after conversion.

〔作用〕[Action]

コンパイラ2の最適化処理部4は,数学関数の使用形態
が所定の条件を満たす場合に,自動的に,別の数学関数
に変換するというコンパイル処理を行う。また,この変
換に伴う処理として,最適化処理部4は,別の数学関数
をその使用条件に合わせて使用するために,中間言語の
一部を変換するコンパイル処理を行う。
The optimization processing unit 4 of the compiler 2 performs a compile process of automatically converting to another mathematical function when the usage form of the mathematical function satisfies a predetermined condition. Further, as a process associated with this conversion, the optimization processing unit 4 performs a compile process for converting a part of the intermediate language in order to use another mathematical function according to its use condition.

これにより,ソースプログラム9との等価性を維持しつ
つも,ソースプログラム9における記述に拘らず,より
高速処理が可能な別の数学関数を用いて記述されたロー
ドモジュール13が得られる。
As a result, the load module 13 described by using another mathematical function capable of faster processing can be obtained regardless of the description in the source program 9 while maintaining the equivalence with the source program 9.

このように,高速処理のための数学関数の最適化が成さ
れた結果,処理装置1においてロードモジュール13(ソ
ースプログラム9)を実行する場合,その実行時間を短
縮することができる。
As described above, as a result of the optimization of the mathematical function for high-speed processing, when the load module 13 (source program 9) is executed in the processing device 1, the execution time can be shortened.

〔実施例〕〔Example〕

第2図は本発明の一実施例説明図であり,簡単な具体例
を示している。
FIG. 2 is an explanatory view of an embodiment of the present invention and shows a simple concrete example.

ソースプログラム9がFORTRANで記述されており,その
中に図示の如く前述の(1)式と同様の文があったとす
る。
It is assumed that the source program 9 is written in FORTRAN, and there is a statement similar to the above-mentioned expression (1) in the figure, as shown in the figure.

このソースプログラム9がコンパイラ2に入力される
と,構文解析部3がこれを解析し,最適化前の中間言語
からなる第1中間テキスト14を生成する。この時,
(1)式は図示の如く前述の(2)式と同様に展開され
る。
When the source program 9 is input to the compiler 2, the syntax analysis unit 3 analyzes it and generates a first intermediate text 14 made of an intermediate language before optimization. At this time,
The equation (1) is developed in the same manner as the above equation (2) as shown in the figure.

第1中間テキストは最適化処理部4に入力され,最適化
された中間言語からなる第2中間テキスト15が生成され
る。この時,(2)式は, の如く展開されている。ここでXSQRTは平方根の逆数を
求める関数,t3はコンパイラ2が生成した作業変数であ
る。また,関数SQRTとXSQRTとの関係は,変数をt4とす
ると, の如く表される。通常, を求めるためには,ニュートン=ラプソン法を用い,ま
を求めてからその逆数をとる処理を行う。つまり, を求めるのであれば,本来,最後の逆数をとる処理は不
要である。逆数をとる処理は1回の割り算で実現される
ため, を求める関数SQRT(x)よりも を求める関数XSQRT(x)の方が割り算の処理が1回だ
け少なくてすむ。
The first intermediate text is input to the optimization processing unit 4, and the second intermediate text 15 composed of the optimized intermediate language is generated. At this time, equation (2) is It is being developed like. Here, XSQRT is a function for obtaining the reciprocal of the square root, and t3 is a work variable generated by the compiler 2. Also, regarding the relationship between the functions SQRT and XSQRT, if the variable is t4, It is represented as. Normal, To obtain, the Newton-Raphson method is used. Then, the process of taking the reciprocal is performed. That is, To obtain, the process of taking the final reciprocal is not necessary. Since the process of taking the reciprocal is realized by one division, Than the function SQRT (x) The function XSQRT (x) that obtains requires only one division process.

(2)式と(6)式とを比較すると,次のようである。
変数t3を求める処理は,(7)式の関係を考慮すると,
変数t2を求める処理よりも割算が1回少ないので,この
分高速に処理される。また,Q*t3の処理は,割算よりも
掛算が高速処理できるので,Q/t2の処理よりもこの分速
く処理できる。従って,(6)式は(2)式をより高速
に処理することに適した形式に変換したものといえる。
Comparing equations (2) and (6) is as follows.
The process of obtaining the variable t3 is
Since the number of divisions is one less than in the process of obtaining the variable t2, the process is performed at a higher speed. In addition, since the processing of Q * t3 can be processed faster than multiplication, it can be processed faster than that of Q / t2. Therefore, it can be said that the expression (6) is converted into a format suitable for processing the expression (2) at a higher speed.

このように,最適化処理部4は,その認識部5において
数学関数SQRTがより高速処理できる数学関数XSQRTに変
換できることを認識し,その変換部6において当該変換
を第1中間テキスト14(式(2))に施して第2中間テ
キスト15(式(6))を得る。これにより,数学関数SQ
RTは,ソースプログラム9におけるその使用形態(割算
の除数として用いられる)までを考慮して,最適化処理
されたこととなる。
In this way, the optimization processing unit 4 recognizes in the recognition unit 5 that the mathematical function SQRT can be converted into a mathematical function XSQRT that can be processed at higher speed, and the conversion unit 6 converts the conversion into the first intermediate text 14 (expression ( 2)) to obtain the second intermediate text 15 (equation (6)). This allows the mathematical function SQ
The RT is optimized in consideration of its usage pattern (used as a divisor of division) in the source program 9.

目的コード生成部7は,第2中間テキスト15が入力され
ると,これに基づいてオブジェクトモジュール10を展開
する。
When the second intermediate text 15 is input, the object code generator 7 develops the object module 10 based on this.

結合編集処理部8は,入力されたオブジェクトモジュー
ル10に従って,数学関数XSQRTを関数ライブラリ11から
呼出す。そして,オブジェクトモジュール10と数学関数
とを結合編集し,ロードモジュール13を生成する。従っ
て,ロードモジュール13は,ソースプログラム9の記述
が数学関数SQRTであるにも拘わらず,より高速処理が可
能な数学関数XSQRTを用いて記述された機械語コードか
らなるものとされる。
The binding edit processing unit 8 calls the mathematical function XSQRT from the function library 11 according to the input object module 10. Then, the object module 10 and the mathematical function are combined and edited to generate the load module 13. Therefore, the load module 13 is composed of a machine language code described by using the mathematical function XSQRT capable of higher speed processing, although the source program 9 is described by the mathematical function SQRT.

処理装置1がロードモジュール13を実行する場合,ソー
スプログラム9の記述にそのまま対応したコンパイル処
理(第1中間テキスト14を得る処理)に従ったロードモ
ジュールを実行する場合に比べ,数学関数の処理の最適
化により,その実行時間を短くすることができる。な
お,このための処理は最適化処理部4において自動的に
行われるので,プログラマの負担はなく,また,特殊な
関数をソースプログラム中に導入してその可搬性を損な
うこともない。
When the processing device 1 executes the load module 13, as compared with the case where the load module according to the compile process (process for obtaining the first intermediate text 14) directly corresponding to the description of the source program 9 is executed, The optimization can shorten the execution time. Since the processing for this purpose is automatically performed by the optimization processing unit 4, there is no burden on the programmer, and the portability is not impaired by introducing a special function into the source program.

第3図は最適化処理部4における最適化処理フロー図で
ある。
FIG. 3 is a flow chart of optimization processing in the optimization processing unit 4.

最適化処理部4に第1中間テキスト14が入力される
と,認識部5は,使用する数学関数がSQRTであることを
認識する。換言すれば,関数ライブラリ11から呼出す数
学関数はSQRTであることを認識する。
When the first intermediate text 14 is input to the optimization processing unit 4, the recognition unit 5 recognizes that the mathematical function used is SQRT. In other words, it recognizes that the mathematical function called from the function library 11 is SQRT.

さらに,認識部5は,数学関数SQRTを用いた処理の
結果の値(t2)が割算の除数として参照されていること
を認識する。
Further, the recognition unit 5 recognizes that the value (t2) of the result of the processing using the mathematical function SQRT is referred to as the divisor of division.

認識部5は,処理で得た数学関数SQRTの使用形態
について,これが数学関数SQRTをより高速処理可能な別
の数学関数に変換できる条件に適合しているか否かを判
断する。このために,認識部5は変換テーブル12を参照
する。
The recognizing unit 5 judges whether or not the use form of the mathematical function SQRT obtained by the processing conforms to the condition that the mathematical function SQRT can be converted into another mathematical function that can be processed at higher speed. For this purpose, the recognition unit 5 refers to the conversion table 12.

変換テーブル12には,数学関数SQRTを用いた処理の結果
の値(t2)が割算の除数として参照されている時は,別
の数学関数XSQRTに変換可能なことが登録されている。
In the conversion table 12, when the value (t2) of the result of the processing using the mathematical function SQRT is referred to as the divisor of division, it is registered that it can be converted into another mathematical function XSQRT.

認識部5は,数学関数SQRTを用いた処理の結果の値
(t2)がソースプログラム9(第1中間テキスト14)に
おいて他に参照されているか否かを判断する。
The recognition unit 5 determines whether or not the value (t2) obtained as a result of the process using the mathematical function SQRT is referenced elsewhere in the source program 9 (first intermediate text 14).

認識部5において,次の (ア) 数学関数SQRTが使用されている。The following (a) mathematical function SQRT is used in the recognition unit 5.

(イ) その処理結果の値t2が割算の除数として用いら
れている。即ち,この使用形態が変換テーブル12に登録
されている。
(B) The value t2 of the processing result is used as a divisor for division. That is, this usage pattern is registered in the conversion table 12.

(ウ) その処理結果の値t2が他で参照されていない。(C) The value t2 of the processing result is not referenced elsewhere.

という命令列が認識された時,変換部6は次の処理を行
う。
When the instruction sequence is recognized, the conversion unit 6 performs the following processing.

変換部6は,変換テーブル12を参照して数学関数SQ
RTを別の数学関数XSQRTに変換する。即ち,(2)式中
のt2=SQRT(t1)を,(6)式中のt3=XSQRT(t1)に
変換する。
The conversion unit 6 refers to the conversion table 12 and refers to the mathematical function SQ.
Convert RT to another mathematical function XSQRT. That is, t2 = SQRT (t1) in the equation (2) is converted to t3 = XSQRT (t1) in the equation (6).

さらに,変換部6は,変換テーブル12を参照して,
処理のような変換を行った時の別の数学関数XSQRTの
使用形態を知り,必要な処理を行う。即ち,数学関数SQ
RTの処理結果の値t2を除数として参照している割算
((2)式のF=Q/t2)を,別の数学関数XSQRTの処理
結果の値t3を乗数として参照する掛算((6)式のF=
Q*t3)に変換する。これにより,(2)式と同じくソ
ースプログラム9の(1)式に等しい(6)式が得られ
る。
Further, the conversion unit 6 refers to the conversion table 12 and
Learn the usage pattern of another mathematical function XSQRT when performing conversion such as processing, and perform the necessary processing. That is, the mathematical function SQ
The division (F = Q / t2 of the equation (2)) that refers to the value t2 of the processing result of RT as a divisor is multiplied by the value t3 of the processing result of another mathematical function XSQRT as a multiplier ((6 ) F =
Convert to Q * t3). As a result, the equation (6), which is the same as the equation (1) of the source program 9 as in the equation (2), is obtained.

〔発明の効果〕〔The invention's effect〕

以上説明したように,本発明によれば,数学関数を含む
ソースプログラムのコンパイル処理において,数学関数
の使用形態までを考慮することにより,当該数学関数を
より高速処理可能な別の数学関数に変換することがで
き,プログラム全体の実行時間を短縮することができ
る。
As described above, according to the present invention, in a compilation process of a source program including a mathematical function, the mathematical function can be converted into another mathematical function that can be processed at higher speed by considering the usage form of the mathematical function. Therefore, the execution time of the entire program can be shortened.

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

第1図は本発明の原理構成図, 第2図は一実施例説明図, 第3図は最適化処理フロー図, 第4図は従来のコンパイル処理の例を示す図。 1は処理装置,2はコンパイラ,3は構文解析部,4は最適化
処理部,5は認識部,6は変換部,7は目的コード生成部,8は
結合編集処理部,9はソースプログラム,10はオブジェク
トモジュール,11は関数ライブラリ,12は変換テーブル,1
3はロードモジュール,14および15は中間テキストであ
る。
FIG. 1 is a block diagram of the principle of the present invention, FIG. 2 is an explanatory diagram of an embodiment, FIG. 3 is a flow chart of optimization processing, and FIG. 4 is a diagram showing an example of conventional compilation processing. 1 is a processor, 2 is a compiler, 3 is a syntax analysis unit, 4 is an optimization processing unit, 5 is a recognition unit, 6 is a conversion unit, 7 is a target code generation unit, 8 is a combined edit processing unit, 9 is a source program , 10 is an object module, 11 is a function library, 12 is a conversion table, 1
3 is a load module, and 14 and 15 are intermediate texts.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】数学関数を含むソースプログラム(9)を
コンパイルするコンパイル処理装置において, 前記ソースプログラム(9)を解析し中間言語を出力す
る構文解析部(3)と, 数学関数を使用形態において別の数学関数に変換する条
件を設定する条件記憶部(12)と, 前記条件記憶部(12)の内容および前記構文解析部
(3)が出力した中間言語にもとづいて,前記数学関数
を前記別の数学関数に変換する変換部(6)と, 前記変換部(6)の変換結果について目的コードを生成
する目的コード生成部(7)と から構成される ことを特徴とするコンパイル処理装置。
1. A compiling processor for compiling a source program (9) including a mathematical function, comprising: a parsing section (3) for analyzing the source program (9) and outputting an intermediate language; Based on the condition storage unit (12) for setting a condition for conversion into another mathematical function, the content of the condition storage unit (12) and the intermediate language output by the syntax analysis unit (3), A compilation processing device comprising: a conversion unit (6) for converting into another mathematical function, and a target code generation unit (7) for generating a target code for the conversion result of the conversion unit (6).
JP62286604A 1987-11-13 1987-11-13 Compile processor Expired - Fee Related JPH0795275B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62286604A JPH0795275B2 (en) 1987-11-13 1987-11-13 Compile processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62286604A JPH0795275B2 (en) 1987-11-13 1987-11-13 Compile processor

Publications (2)

Publication Number Publication Date
JPH01128136A JPH01128136A (en) 1989-05-19
JPH0795275B2 true JPH0795275B2 (en) 1995-10-11

Family

ID=17706565

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62286604A Expired - Fee Related JPH0795275B2 (en) 1987-11-13 1987-11-13 Compile processor

Country Status (1)

Country Link
JP (1) JPH0795275B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000284970A (en) * 1999-03-29 2000-10-13 Matsushita Electric Ind Co Ltd Program converting device and processor
DE10216602A1 (en) 2002-04-15 2003-10-30 Giesecke & Devrient Gmbh Optimization of compiler generated program code

Also Published As

Publication number Publication date
JPH01128136A (en) 1989-05-19

Similar Documents

Publication Publication Date Title
JP3190773B2 (en) Compile processing method of language processing program
JPH08202545A (en) Object-oriented system and method for generation of target language code
US20150020051A1 (en) Method and apparatus for automated conversion of software applications
JPH0795275B2 (en) Compile processor
CN115268918A (en) Automatic conversion method from C + + code to C code based on rule template
JPH0756745A (en) Compiler processing system for language processing program
JP2977642B2 (en) FORTRAN compilation processor
JP2956591B2 (en) Method and apparatus for parallelizing a loop having a conditional jump out of the loop
JP3003459B2 (en) Program creation support device
JPH0573332A (en) Parallel translation system for source program
JPH03144830A (en) Parallel processing system
JPS63187364A (en) Index variable vectorized compiling system
JP3327640B2 (en) Instruction code selection device
JPH03282826A (en) Parallel conversion translating system
Narayanan et al. Interfacing OpenAD and Tapenade
JPS6297031A (en) Matching system for bit number of mantissa part
JPH05313909A (en) Compiler system containing intermediate code line evolving function
JPH06242958A (en) Compilation system
JP2003208317A (en) Program development method
JPH04343140A (en) Parallelized processing system
JPH096626A (en) Perl script execution method
JPH0785000A (en) Vectorial compiling process method and processor
JPH0425969A (en) Compiling system which is made into definition arrangement vector under if sentence
JPH0612259A (en) Compiler processing system
JPH06274351A (en) Optimizing system for compiler

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees