JPS62239236A - Compiler for program - Google Patents
Compiler for programInfo
- Publication number
- JPS62239236A JPS62239236A JP8348986A JP8348986A JPS62239236A JP S62239236 A JPS62239236 A JP S62239236A JP 8348986 A JP8348986 A JP 8348986A JP 8348986 A JP8348986 A JP 8348986A JP S62239236 A JPS62239236 A JP S62239236A
- Authority
- JP
- Japan
- Prior art keywords
- program
- data
- executable program
- time
- executable
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000005457 optimization Methods 0.000 abstract description 6
- 238000011161 development Methods 0.000 abstract description 3
- 238000004904 shortening Methods 0.000 abstract 1
- 238000012545 processing Methods 0.000 description 15
- 238000000034 method Methods 0.000 description 7
- 230000014509 gene expression Effects 0.000 description 3
- 238000012937 correction Methods 0.000 description 2
- 241000894006 Bacteria Species 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、計算機システムに8けるプログラムのコンパ
イル装置に関し、特にプログラム?コンパイルする時に
最も効率よい実行形式プログラムを作成するように最適
化を行うコンパイル装置に関するものである。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a program compiling device for a computer system, and particularly to a program compiling device for a computer system. The present invention relates to a compiling device that performs optimization to create the most efficient executable program when compiling.
従来のコンパイル装置は、最適化を行う範囲として
■ プログラムの実行以前に定数となる式の計算、■
繰り返し現FLる等価な演算式の除去。Conventional compilation devices perform optimization as follows: ■ Calculation of expressions that become constants before program execution, ■
Removal of equivalent arithmetic expressions that are repeated.
■ ループ処理中の相対不変式の移動。■ Move relative invariant expressions during loop processing.
■ 副プログラムの展開。■ Development of sub-programs.
■ 再帰呼出しの消去。■ Eliminate recursive calls.
というプログラム0芽の文法的特徴のみを利用するもの
である。This program uses only the grammatical features of the program 0bud.
しかし、前述の方法だけでは、入力データの値の片寄り
によって取り得る処理がほぼ決まってしまうような場合
の最適化は、プログラム作成者自身が扱うデータ暑想定
し、効率のよい処理となるように考えて判断文の順序Z
決定することで行なわなければならない。この場合、プ
ログラム作成時に扱うことを想定していたデータ範囲で
は、最適なフローであっても、ユーザーが使用するうち
に人力データが変化していき(例えば、データ規模が大
きくなるなど)、かえって処理時間がかかるようになる
。あるいは、プログラマの想定したデータと実データと
が合っでいないために実際に実行すると処理時間が増し
てしまうということがある。However, with the above method alone, optimization in cases where the possible processing is almost determined by the unbalanced values of the input data is performed by assuming that the program creator handles the data himself/herself and trying to achieve efficient processing. Thinking about the order of judgment sentences Z
This must be done by making a decision. In this case, even if the flow is optimal for the data range that was intended to be handled when creating the program, the human data will change as the user uses it (for example, the data size increases), and the Processing time will be longer. Alternatively, the data assumed by the programmer and the actual data may not match, resulting in an increase in processing time when the program is actually executed.
従来の方法では、上記状況の場合、プログラム自体ケ修
正し直重ことで、実データに合うようにしなげ扛ばなら
ない。従って、修正工数がかかり。In the conventional method, in the above situation, it is necessary to modify the program itself to make it match the actual data. Therefore, it takes a lot of man-hours to make corrections.
また1人手を介するため、修正ミスが入り易いという欠
点がある。Furthermore, since it requires one person's intervention, there is a drawback that correction errors are likely to occur.
不発明の目的は、従来のプログラム最適化技術が最適化
の範囲としていなかった扱うデータによって処理の優先
順位を決定し、短時間でかつより効率の高い実行形式プ
ログラムを提供することである。The purpose of this invention is to determine processing priorities based on the data handled, which is not within the scope of optimization in conventional program optimization techniques, and to provide an executable program in a shorter time and with higher efficiency.
不発明のプログラムのコンパイル装置は、ソースプログ
ラムと実データの実行等から得られるf−夕を入力して
実行形式プログラムを作成するCとを特徴とする。The inventive program compiling device is characterized by creating an executable program by inputting a source program and information obtained from execution of actual data.
次に1本発明について図面?参照して説明する。 Next, a drawing about this invention? Refer to and explain.
第1図は本発明の一実施例であり、ソースプログラムの
他に、実行形式プログラムを実行させることによって得
られろ各処浬心の通1閥頻度等の災行時のデータを入力
としてコンパイル時行い、最適化された実行形式プログ
ラムを作成する。Fig. 1 shows an embodiment of the present invention, which is compiled by inputting, in addition to the source program, data at the time of a disaster, such as the frequency of one group in each area, which can be obtained by running an executable program. Create an optimized executable program.
にで、実行時データとして、第3肉に示すような、並列
選択の処理フローで、各処理ごとの通過頻度が与えら扛
たときを例に詳細71!′説明する。Now, as the runtime data, let's take an example of the case where the passing frequency of each process is given in the parallel selection process flow as shown in the third part. 'explain.
本発明のコンパイル装置の一実施例の処理フローを第2
図に示す。まず、ソースプログラムを読みこみ構文解析
を行う。ここでは、プログラムを基本ブロック(順序処
理だけからなる1かたまりとみなせる処理)に分割し、
グラフ化を行って、ループ、分岐、並列処理などの認識
を行う。ここまで第3図(a)に示す工うに考えら扛る
フロー、心あれば認識ができていることになる。次にa
JNtヒの要否判定を行い通常の処理しか行わない場合
は。The processing flow of one embodiment of the compiling device of the present invention is explained in the second embodiment.
As shown in the figure. First, the source program is read and the syntax is analyzed. Here, we will divide the program into basic blocks (processes that can be considered as one block consisting only of sequential processing),
Create graphs to recognize loops, branches, parallel processing, etc. Up to this point, if you have a mind, you will be able to recognize the flow of the process shown in Figure 3(a). Then a
When determining the necessity of JNt Hi and performing only normal processing.
実行形式作成処理に飛ぶが最適化処理を行う時は。Skip to executable format creation processing, but when performing optimization processing.
実行時に得られたデータ、(ここでは、並列処理各々の
通過頻度である)を読み込む。The data obtained during execution (here, the passing frequency of each parallel process) is read.
第3図(a)に示す処理フローは実際には、第3図(b
)に示すような判断文の並んだ形の処理に8きかえられ
て実行形式になるわけだが、実行時データを入力したこ
とにLv、判断文の順序を通過頻度の大きいものを先に
実行するように置き換える構文の読換えを行う。この後
、実行形式を作成する。The processing flow shown in Fig. 3(a) is actually shown in Fig. 3(b).
) The processing is changed to a process in which judgment statements are lined up as shown in 8 and becomes an execution format. Reread the syntax to replace it so that it looks like this. After this, create the executable format.
以上のようにして、最適化された。実行形式ケ得ること
ができる。Optimized as described above. You can get the executable form.
以上説明した裏5に、本発明は、プログラムのコンパイ
ル時にソースプログラムだけでなく、実行時のデータを
入力することにより1判断文の順序を入れ換え、通過頻
度の高いデータの判断が先にできる最適化を行わない場
合に比べ判断文に費や丁時間を節約できる実行形式のプ
ログラムが作成される。The second aspect of the present invention is to change the order of one judgment statement by inputting not only the source program but also the data at the time of execution when compiling the program. An executable program is created that saves the amount of time spent on judgment statements and time compared to the case where no conversion is performed.
特に、選択肢が数多く考えられるが、取る値は。In particular, there are many options to choose from, but what value should you take?
g3よそ決まっているといった場合、プログラム作成者
が作成時に考えなくとも1本発明を用いることで、効率
のよい実行形式プログラムを得ることができ、開発工数
の短縮ができる。また、ソースプログラム?コンパイル
装置にかけるだゆで実データのあった実行形式プログラ
ムができるという効果がある。If the g3 has been determined, by using the present invention, the program creator can obtain an efficient executable program without having to think about it at the time of creation, and the number of development steps can be reduced. Also, the source program? This has the effect that an executable program with actual data can be created by running it on a compiling device.
第1図は本発明の一実施例の構成図、第2図は本発明の
一実施例における処理フローを示すフローチャート、第
3図(a) 、 (b)は並列選択のフローの例を示す
フローチャートである。
代理人 弁理士 内 原 晋
$ 2 菌Fig. 1 is a block diagram of an embodiment of the present invention, Fig. 2 is a flowchart showing a processing flow in an embodiment of the invention, and Figs. 3 (a) and (b) show an example of the flow of parallel selection. It is a flowchart. Agent Patent Attorney Susumu Uchihara $2 Bacteria
Claims (1)
タとを入力して実行形式プログラムを生成することを特
徴とするプログラムのコンパイル装置。A program compiling device that generates an executable program by inputting a source program and data obtained from execution of actual data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP8348986A JPS62239236A (en) | 1986-04-10 | 1986-04-10 | Compiler for program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP8348986A JPS62239236A (en) | 1986-04-10 | 1986-04-10 | Compiler for program |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS62239236A true JPS62239236A (en) | 1987-10-20 |
Family
ID=13803890
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP8348986A Pending JPS62239236A (en) | 1986-04-10 | 1986-04-10 | Compiler for program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS62239236A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0744397A (en) * | 1993-07-30 | 1995-02-14 | Nec Corp | Program processing accelerating system |
-
1986
- 1986-04-10 JP JP8348986A patent/JPS62239236A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0744397A (en) * | 1993-07-30 | 1995-02-14 | Nec Corp | Program processing accelerating system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPS62239236A (en) | Compiler for program | |
JPH01118931A (en) | Program conversion system | |
JPH01240934A (en) | Automatic re-compiling method | |
JP2956591B2 (en) | Method and apparatus for parallelizing a loop having a conditional jump out of the loop | |
JP2554169B2 (en) | Relative Rank Analysis Method for Data Driven Processor | |
JPH0210429A (en) | Program structure processing system | |
JPS63318605A (en) | Nc part program generating device | |
JPH03144830A (en) | Parallel processing system | |
JPH0512752B2 (en) | ||
JP2870218B2 (en) | Parallel execution instruction sequence generation method | |
JP2518504B2 (en) | Target program generator | |
JP2682206B2 (en) | Optimization method of target program | |
JPH04153737A (en) | Output system for compile updating information | |
JP3018783B2 (en) | Compilation method | |
JPS61241843A (en) | Information processor | |
JPH04343140A (en) | Parallelized processing system | |
JPH07192034A (en) | Interpreter type simulation method | |
JPS63104139A (en) | Compiling system for cobol source list | |
JPH0126091B2 (en) | ||
JPH06348505A (en) | Compiling method | |
JPH03220669A (en) | Multiple loop vectorization compiling system | |
JPH02211542A (en) | Module management information calculating system | |
JPS6297031A (en) | Matching system for bit number of mantissa part | |
JPH03233730A (en) | Software error processing system | |
JPH0689164A (en) | Generation system and loading system for library file |