JP3323147B2 - Compiling device, compiling method, and recording medium recording compiler program - Google Patents

Compiling device, compiling method, and recording medium recording compiler program

Info

Publication number
JP3323147B2
JP3323147B2 JP08110399A JP8110399A JP3323147B2 JP 3323147 B2 JP3323147 B2 JP 3323147B2 JP 08110399 A JP08110399 A JP 08110399A JP 8110399 A JP8110399 A JP 8110399A JP 3323147 B2 JP3323147 B2 JP 3323147B2
Authority
JP
Japan
Prior art keywords
instruction
instructions
range
sequence
generating
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
JP08110399A
Other languages
Japanese (ja)
Other versions
JP2000276356A (en
Inventor
哲也 藤澤
Original Assignee
エヌイーシーシステムテクノロジー株式会社
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 エヌイーシーシステムテクノロジー株式会社 filed Critical エヌイーシーシステムテクノロジー株式会社
Priority to JP08110399A priority Critical patent/JP3323147B2/en
Publication of JP2000276356A publication Critical patent/JP2000276356A/en
Application granted granted Critical
Publication of JP3323147B2 publication Critical patent/JP3323147B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はトレーススケジュー
リング法を用いた最適化コンパイラの、特に命令並び替
え範囲の決定を行うコンパイル装置、コンパイル方法お
よびコンパイラプログラムを記録した記録媒体に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an optimizing compiler using a trace scheduling method, and more particularly to a compiling apparatus for determining an instruction rearrangement range, a compiling method, and a recording medium on which a compiler program is recorded.

【0002】[0002]

【従来の技術】従来のトレーススケジューリング法を用
いた最適化コンパイラシステムの一例が、「1990年6
月、情報処理、Vol.31、No.6、764〜767ページ、中谷登
志男、VLIW計算機のためのコンパイラ技術、4.トレ
ース・スケジューリング法」に記載されている。
2. Description of the Related Art An example of an optimizing compiler system using a conventional trace scheduling method is disclosed in "1990 June.
Moon, Information Processing, Vol. 31, No. 6, pages 764-767, Toshio Nakatani, Compiler Technology for VLIW Computers, 4. Trace Scheduling Method ".

【0003】従来のトレーススケジューリング法を用い
た最適化コンパイラシステムは、「ソースプログラムを
中間語に翻訳する翻訳手段」と、「中間語の命令列を並
び替える範囲を決定する並び替え範囲決定手段」と、そ
の範囲の中で「中間語をより速く実行できるよう並び替
える命令並び替え手段」と、「並び替えられた中間語を
機械語命令として出力する機械語命令生成手段」から構
成されている。
A conventional optimizing compiler system using a trace scheduling method includes a "translating means for translating a source program into an intermediate language" and a "rearranging range determining means for determining a range in which an instruction sequence of an intermediate language is rearranged". And "instruction rearranging means for rearranging the intermediate language so that it can be executed faster" and "machine language instruction generating means for outputting the rearranged intermediate language as a machine language instruction". .

【0004】このような構成を有する従来の最適化コン
パイラシステムは次のように動作する。 (1)ソースプログラムを中間語に翻訳する。 (2)中間語の命令列から、命令の並び替えを行う範囲
を決定する。
A conventional optimizing compiler system having such a configuration operates as follows. (1) Translate the source program into an intermediate language. (2) A range in which instructions are rearranged is determined from the intermediate language instruction sequence.

【0005】この命令の並び替え範囲の決定は、以下の
ような手順で行う。 (2−1)中間語の命令列から処理の流れを示す流れ図
を作成する。 (2−2)その流れ図の中で、予想される実行回数が最
も多い命令を探す。 (2−3)実行回数が最も多い命令から流れ図を前後に
たどり、命令の並び替え範囲を決定する。 (3)命令並び替え範囲の中で命令を並び替える。
The determination of the instruction rearrangement range is performed in the following procedure. (2-1) Create a flowchart showing the flow of processing from the instruction sequence of the intermediate language. (2-2) In the flowchart, search for an instruction having the largest expected number of executions. (2-3) The flow chart is traced back and forth from the instruction with the largest number of executions to determine the instruction rearrangement range. (3) The instructions are rearranged in the instruction rearrangement range.

【0006】この命令の並び替えは、以下のような手順
で行う。 (3−1)命令並び替えの範囲の中で命令間の依存関係
を解析し、ある時点で、その命令の使用するデータがそ
ろっており、実行可能状態にある命令をすべて抽出す
る。 (3−2)実行可能状態にある命令のうち、その命令の
実行に要する資源と、先行する他の命令の実行に要する
資源とが衝突しない命令をひとつ選択し、プロセッサの
資源を割り当てる。 (3−3)すべての命令の処理が終わるまで繰り返すこ
とで、命令を選択された順に並び替える。 (4)並び替えた中間語を機械語命令として出力する。
The rearrangement of the instructions is performed in the following procedure. (3-1) Analyze dependencies between instructions in the range of instruction rearrangement, and at a certain point in time, extract all instructions that have data used by the instruction and are in an executable state. (3-2) Among instructions in the executable state, select one instruction in which the resource required for executing the instruction does not conflict with the resource required for executing another preceding instruction, and allocate the processor resources. (3-3) The instructions are rearranged in the selected order by repeating the processing until all the instructions are processed. (4) Output the rearranged intermediate language as a machine language instruction.

【0007】[0007]

【発明が解決しようとする課題】上述した従来のコンパ
イラシステムの第1の問題点は、並び替えの対象となる
命令の数が多くなると、各命令を並び替えるのに要する
時間が多くなり過ぎるということである。
A first problem of the above-mentioned conventional compiler system is that if the number of instructions to be rearranged increases, the time required to rearrange the instructions becomes too long. That is.

【0008】その理由は、ある命令の並び替えを行おう
とした場合に、依存関係のない他のすべての命令に対し
て要求する資源が衝突しないかどうかを調べる必要があ
るためである。
[0008] The reason is that, when an instruction is rearranged, it is necessary to check whether resources required for all other instructions having no dependency do not conflict with each other.

【0009】第2の問題点は、上述の問題を回避するた
めに、並び替えの対象とする命令を制限すると、命令の
並び替え範囲に選ばれた命令と選ばれなかった命令との
間でデータの転送が行われ、実行速度が低下するという
ことである。
A second problem is that, in order to avoid the above-mentioned problem, if the instructions to be rearranged are restricted, an instruction selected in the instruction rearrangement range and an instruction not selected are not selected. This means that the data is transferred and the execution speed is reduced.

【0010】その理由は、命令の並び順に並び替え対象
の命令を決定すると、並び替えの対象にならなかった命
令で使用するデータを定義する命令にもプロセッサの資
源(レジスタ)が割り当てられるが、レジスタの個数が
有限であるために、先行する命令の演算結果を常にレジ
スタ上に保持しておくことは出来ず、メモリとレジスタ
の間でデータの転送が行われるためである。
[0010] The reason is that when the instructions to be rearranged are determined in the order of the instructions, the resources (registers) of the processor are also allocated to the instructions that define the data used by the instructions that have not been rearranged. Because the number of registers is finite, the operation result of the preceding instruction cannot always be held in the register, and data is transferred between the memory and the register.

【0011】本発明の目的は、短い処理時間で実行速度
の速い命令列を生成できるように命令並び替えを行うコ
ンパイル装置、コンパイル方法およびコンパイラプログ
ラムを記録した記録媒体を提供することにある。
An object of the present invention is to provide a compiling apparatus, a compiling method, and a recording medium on which a compiling program is recorded, which rearranges instructions so that an instruction sequence with a high execution speed can be generated in a short processing time.

【0012】[0012]

【課題を解決するための手段】本発明のコンパイル装置
は、ソースプログラムから中間語を生成する中間語生成
手段と、前記中間語の命令列の依存関係を調査して依存
関係のある命令だけを命令並び替え範囲に設定した第1
の命令列を生成する命令並び替え範囲決定手段と、前記
第1の命令列から前記命令並び替え範囲内の命令を並び
替えて第2の命令列を生成する命令スケジュール手段
と、前記第2の命令列からオブジェクトプログラムを生
成するオブジェクトプログラム生成手段とを備えたこと
を特徴とする。
Compiling device of the present invention According to an aspect of the intermediate language generating means for generating an intermediate language from the source program, it depends to investigate the dependency of the instruction sequence of the intermediate language
The first in which only related instructions are set in the instruction rearrangement range
An instruction rearrangement range determining unit that generates an instruction sequence of the first instruction sequence; an instruction schedule unit that rearranges instructions within the instruction rearrangement range from the first instruction sequence to generate a second instruction sequence; Object program generating means for generating an object program from the instruction sequence.

【0013】本発明のコンパイル装置は、前記命令並べ
替え範囲に含まれる命令の限界数より多くの命令を命令
並び替え範囲に含まないことを特徴としてもよい。
[0013] The compiling apparatus of the present invention may be arranged so that the number of instructions larger than the limit number of instructions included in the instruction rearrangement range is increased.
It may be characterized in that it is not included in the sorting range .

【0014】[0014]

【0015】本発明のコンパイル方法は、ソースプログ
ラムから中間語を生成し、前記中間語の命令列の依存関
係を調査して依存関係のある命令だけを命令並び替え範
囲に設定した第1の命令列を生成し、前記第1の命令列
から前記命令並び替え範囲内の命令を並び替えて第2の
命令列を生成し、前記第2の命令列からオブジェクトプ
ログラムを生成することを特徴とする。
According to the compile method of the present invention, an intermediate language is generated from a source program, and a dependency relation of an instruction sequence of the intermediate language is generated.
Investigate the relation and check only the instructions that have a dependency
Generating a first sequence of instructions is set to enclose said from the first instruction sequence by rearranging the instructions within the instruction reordering range to generate a second instruction sequence, the object program from the second instruction sequence Is generated.

【0016】本発明のコンパイル方法は、前記命令並べ
替え範囲に含まれる命令の限界数より多くの命令を命令
並び替え範囲に含まないことを特徴としてもよい。
In the compiling method according to the present invention, the number of instructions larger than the limit number of instructions included in the instruction rearrangement range may be increased.
It may be characterized in that it is not included in the sorting range .

【0017】[0017]

【0018】本発明の記録媒体は、ソースプログラムか
ら中間語を生成する中間語生成処理と、前記中間語の命
令列の依存関係を調査して依存関係のある命令だけを命
令並び替え範囲に設定した第1の命令列を生成する命令
並び替え範囲決定処理と、前記第1の命令列から前記命
令並び替え範囲内の命令を並び替えて第2の命令列を生
成する命令スケジュール処理と、前記第2の命令列から
オブジェクトプログラムを生成するオブジェクトプログ
ラム生成処理とをコンピュータに実行させるためのコン
パイラプログラムを記録したことを特徴とする。
According to the recording medium of the present invention, there is provided an intermediate language generating process for generating an intermediate language from a source program, and examining the dependence of an instruction sequence of the intermediate language to instruct only an instruction having a dependence.
Generating an instruction reordering range determination process of generating a first sequence of instructions set decrees reordering range, a second instruction sequence by rearranging the instructions within the instruction reordering range from said first instruction sequence A compiler program for causing a computer to execute an instruction schedule process and an object program generation process for generating an object program from the second instruction sequence is recorded.

【0019】本発明の記録媒体は、前記命令並べ替え範
囲に含まれる命令の限界数より多くの命令を命令並び替
え範囲に含まないことを特徴としてもよい。
In the recording medium according to the present invention, the instruction rearranging unit may execute more than the limit number of instructions included in the instruction rearranging range.
It may be characterized in that it is not included in the range .

【0020】[0020]

【0021】[0021]

【発明の実施の形態】次に、本発明の実施の形態につい
て図面を参照して詳細に説明する。
Next, embodiments of the present invention will be described in detail with reference to the drawings.

【0022】図1は本発明の第1の実施の形態の構成を
示すブロック図である。図1を参照すると、コンパイル
装置101は、中間語生成手段102、命令並び替え範
囲決定手段103、命令スケジュール手段104、オブ
ジェクトプログラム生成手段105から構成されてい
る。
FIG. 1 is a block diagram showing the configuration of the first embodiment of the present invention. Referring to FIG. 1, the compiling device 101 includes an intermediate language generating unit 102, an instruction rearranging range determining unit 103, an instruction scheduling unit 104, and an object program generating unit 105.

【0023】中間語生成手段102は、ソースプログラ
ム106を読み込み、構文解析および意味解析を行い、
中間語107を生成する。
The intermediate language generating means 102 reads the source program 106, performs syntax analysis and semantic analysis,
The intermediate language 107 is generated.

【0024】命令並び替え範囲決定手段103は、中間
語107から処理の流れを表すフローグラフを作成する
フローグラフ作成手段111と、各命令の依存関係を調
査する依存関係判定手段112と、依存関係のある命令
群とそれ以外の命令群とを並び替える命令並び替え手段
113を備える。この命令並び替え範囲決定手段103
は、中間語107から第1の命令列108を生成する。
The instruction rearrangement range determining means 103 includes: a flow graph creating means 111 for creating a flow graph representing a processing flow from the intermediate language 107; a dependency determining means 112 for examining the dependency of each instruction; An instruction rearranging unit 113 for rearranging an instruction group having a command and another instruction group is provided. This instruction rearrangement range determining means 103
Generates a first instruction sequence 108 from the intermediate language 107.

【0025】命令スケジュール手段104は、第1の命
令列108から中間語107をより速く実行できるよう
並び替えた第2の命令列109を生成する。
The instruction schedule means 104 generates a second instruction sequence 109 from the first instruction sequence 108 which is rearranged so that the intermediate language 107 can be executed faster.

【0026】オブジェクトプログラム生成手段105
は、第2の命令列109からオブジェクトプログラム1
10を生成する。
Object program generating means 105
Is the object program 1 from the second instruction sequence 109.
Generate 10.

【0027】次に、図1および図2を参照して本実施の
形態の全体の動作について詳細に説明する。図2は命令
並び替え範囲決定手段103の動作を示すフローチャー
トである。ステップ201〜204はフローグラフ作成
手段111の動作である。ステップ205以降は依存関
係判定手段112と命令並べ替え手段113との動作で
ある。
Next, the overall operation of the present embodiment will be described in detail with reference to FIGS. FIG. 2 is a flowchart showing the operation of the instruction rearrangement range determining means 103. Steps 201 to 204 are operations of the flow graph creation unit 111. Step 205 and subsequent steps are operations of the dependency determination unit 112 and the instruction rearranging unit 113.

【0028】まず、図2の初期化処理(ステップ20
1)で命令並び替え範囲決定手段103の初期化を行
う。
First, the initialization process shown in FIG.
In 1), the instruction rearrangement range determining means 103 is initialized.

【0029】ステップ202で中間語がまだあるかどう
かを調べ、もしまだあれば、中間語取り出し処理(ステ
ップ203)に進み、中間語107から中間語をひとつ
取り出す。
At step 202, it is checked whether or not there is an intermediate word. If there is, an intermediate word extracting process (step 203) is performed to extract one intermediate word from the intermediate word 107.

【0030】さらに、中間語変換処理(ステップ20
4)に進み、ステップ203で取り出したひとつの中間
語をひとつの命令に変換する。
Further, an intermediate language conversion process (step 20)
Proceeding to 4), one intermediate language extracted in step 203 is converted into one instruction.

【0031】次に、依存関係解析処理(ステップ20
5)に進み、ステップ204で変換した命令が使用する
データを定義している命令が命令チェーンに登録されて
いればステップ204で変換した命令が使用するデータ
を定義している命令をチェーンから解除する。
Next, a dependency analysis process (step 20)
Proceeding to 5), if an instruction defining data used by the instruction converted in step 204 is registered in the instruction chain, release the instruction defining data used by the converted instruction in step 204 from the chain. I do.

【0032】さらに、命令チェーン登録処理(ステップ
206)に進み、ステップ204で変換した命令を命令
チェーンに登録する。
Further, the process proceeds to an instruction chain registration process (step 206), and the instruction converted in step 204 is registered in the instruction chain.

【0033】ステップ202〜ステップ206を中間語
107の中に中間語がひとつもなくなるまで繰り返す。
Steps 202 to 206 are repeated until there is no intermediate language in the intermediate language 107.

【0034】この段階で、命令チェーンには定義したデ
ータをそれ以降のどの命令でも使用されない命令、ある
いはデータを定義しない命令が登録されている。
At this stage, in the instruction chain, an instruction whose defined data is not used in any subsequent instructions or an instruction whose data is not defined is registered.

【0035】次に、ステップ207で命令チェーンが存
在するか、命令並び替え範囲に含まれる命令の限界数を
越えていないかどうかを調べ、もし、命令チェーンが存
在し、命令並び替え範囲に含まれる命令の限界数を越え
ていなければ、命令選択処理1(ステップ208)に進
み、命令チェーンからひとつ命令を取り出す。命令並び
替え範囲に含まれる命令の限界数は、あらかじめ設定し
ておく。
Next, at step 207, it is checked whether or not the instruction chain exists or does not exceed the limit number of instructions included in the instruction rearrangement range. If the number does not exceed the limit number of instructions to be executed, the process proceeds to instruction selection processing 1 (step 208), and one instruction is taken out of the instruction chain. The limit number of instructions included in the instruction rearrangement range is set in advance.

【0036】さらに、命令マーク処理(ステップ20
9)に進み、命令にマークする。
Further, the instruction mark processing (step 20)
Go to 9) and mark the instruction.

【0037】次に、ステップ210でステップ208で
選択した命令が使用するデータがあるかどうかを調べ、
もし、存在すれば、再帰呼出し処理(ステップ211)
に進み、命令が使用するデータを定義する命令、さらに
その命令が使用するデータを定義する命令・・・といっ
た風に再帰的に、ステップ209〜ステップ211を繰
り返す。
Next, at step 210, it is checked whether or not there is data used by the instruction selected at step 208.
If it exists, recursive call processing (step 211)
Steps 209 to 211 are recursively repeated, such as an instruction defining data used by the instruction, an instruction defining data used by the instruction, and so on.

【0038】もし、依存する命令がなければ、再帰的処
理から抜け出し、最終的にステップ207から処理を繰
り返す。
If there is no dependent instruction, the process exits from the recursive process and finally repeats the process from step 207.

【0039】次に、ステップ212に進み命令列を順に
たどる。まだ、最後でなければ、命令選択処理2(ステ
ップ213)に進み、命令をひとつ選択する。
Next, the flow advances to step 212 to sequentially follow the instruction sequence. If it is not the last, the process proceeds to the instruction selection process 2 (step 213) to select one instruction.

【0040】さらに、ステップ214に進み、ステップ
213で選択した命令がステップ209でマークされて
いるかどうかを調べる。
Further, the process proceeds to step 214, and it is checked whether or not the instruction selected in step 213 is marked in step 209.

【0041】もし、マークされていなければ、命令並び
替え処理(ステップ215)に進み、その命令を命令列
の最後に付け足す。
If it is not marked, the process proceeds to the instruction rearrangement process (step 215), and the instruction is added to the end of the instruction sequence.

【0042】ステップ212〜ステップ215を命令列
がなくなるまで繰り返す。
Steps 212 to 215 are repeated until there is no instruction sequence.

【0043】この段階で、命令列はステップ209でマ
ークされた命令とステップ209でマークされていない
命令がそれぞれ連続している。
At this stage, in the instruction sequence, the instruction marked in step 209 and the instruction not marked in step 209 are respectively continuous.

【0044】次に命令並び替え範囲決定処理(ステップ
216)に進み、命令列のうちステップ209でマーク
された命令の含まれる範囲を命令並び替え範囲として決
定する。
Next, the process proceeds to the instruction rearrangement range determination processing (step 216), and the range of the instruction sequence that includes the instruction marked in step 209 is determined as the instruction rearrangement range.

【0045】最後に、終了処理(ステップ217)に進
み処理を終わる。
Finally, the process proceeds to an end process (step 217) to end the process.

【0046】このようにして、命令並び替え範囲決定手
段103で第1の命令列108を生成する。命令スケジ
ュール手段104では、第1の命令列108の内、命令
並び替え範囲として決定された範囲内の命令を、中間語
をより速く実行できるように並べ替えて、第2の命令列
109を生成する。
Thus, the first instruction sequence 108 is generated by the instruction rearrangement range determining means 103. The instruction schedule unit 104 rearranges the instructions in the range determined as the instruction rearrangement range in the first instruction sequence 108 so that the intermediate language can be executed faster, and generates the second instruction sequence 109. I do.

【0047】次に、本発明の第2の実施の形態について
説明する。図3は本発明の第2の実施の形態の構成を示
すブロック図である。図3を参照すると、第2の実施の
形態は、コンパイル装置101と記録媒体121を含
む。記録媒体121は、コンパイラプログラムを記録し
ている。この記録媒体121は、磁気ディスク、半導体
メモリ、光ディスク、その他の記録媒体であってよい。
Next, a second embodiment of the present invention will be described. FIG. 3 is a block diagram showing a configuration of the second exemplary embodiment of the present invention. Referring to FIG. 3, the second embodiment includes a compiling device 101 and a recording medium 121. The recording medium 121 records a compiler program. This recording medium 121 may be a magnetic disk, a semiconductor memory, an optical disk, or another recording medium.

【0048】コンパイラプログラムは記録媒体121か
らコンパイル装置101に読み込まれ、第1の実施の形
態における中間語生成手段102、命令並び替え範囲決
定手段103、命令スケジュール手段104、オブジェ
クトプログラム生成手段105の処理と同様の処理を行
う。
The compiler program is read from the recording medium 121 into the compiling device 101, and is processed by the intermediate language generating means 102, the instruction rearranging range determining means 103, the instruction scheduling means 104, and the object program generating means 105 in the first embodiment. The same processing is performed.

【0049】コンパイラプログラムは、ソースプログラ
ム106から中間語107を生成する中間語生成処理
と、中間語107の命令列を調査して選ばれなかった命
令との間に依存関係がない命令を選んで命令並び替え範
囲を設定した第1の命令列108を生成する命令並び替
え範囲決定処理と、第1の命令列108から命令並び替
え範囲内の命令を中間語をより速く実行できるよう並び
替えて第2の命令列109を生成する命令スケジュール
処理と、第2の命令列109からオブジェクトプログラ
ム110を生成するオブジェクトプログラム生成処理と
を行う。命令並べ替え範囲に含まれる命令の限界数はあ
らかじめ設定しておく。
The compiler program selects an instruction having no dependency between the intermediate language generation processing for generating the intermediate language 107 from the source program 106 and the instruction not selected by examining the instruction sequence of the intermediate language 107. An instruction rearrangement range determining process for generating a first instruction sequence 108 in which an instruction rearrangement range is set, and rearranging the instructions in the instruction rearrangement range from the first instruction sequence 108 so that the intermediate language can be executed faster. An instruction schedule process for generating the second instruction sequence 109 and an object program generation process for generating the object program 110 from the second instruction sequence 109 are performed. The limit number of instructions included in the instruction rearrangement range is set in advance.

【0050】[0050]

【発明の効果】以上説明したように、本発明は、命令の
並び替え範囲に含まれる命令の最大数を越えないため、
さらに、命令の並び替え範囲として選んだ命令は、選ば
れなかった命令との間にデータの依存が存在しないの
で、境界でデータの転送が行われないため、処理時間の
著しい増加を招くことなく、実行速度の速い命令列を生
成することができるという効果がある。
As described above, the present invention does not exceed the maximum number of instructions included in the instruction rearrangement range.
Furthermore, the instruction selected as the instruction rearrangement range has no data dependency between the instruction not selected and the data is not transferred at the boundary, so that the processing time does not significantly increase. Thus, there is an effect that an instruction sequence with a high execution speed can be generated.

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

【図1】本発明の第1の実施の形態の構成を示すブロッ
ク図である。
FIG. 1 is a block diagram showing a configuration of a first exemplary embodiment of the present invention.

【図2】命令並び替え範囲決定手段の動作を示すフロー
チャートである。
FIG. 2 is a flowchart showing an operation of an instruction rearrangement range determining unit.

【図3】本発明の第2の実施の形態の構成を示すブロッ
ク図である。
FIG. 3 is a block diagram showing a configuration of a second exemplary embodiment of the present invention.

【符号の説明】[Explanation of symbols]

101 コンパイル装置 102 中間語生成手段 103 命令並び替え範囲決定手段 104 命令スケジュール手段 105 オブジェクトプログラム生成手段 106 ソースプログラム 107 中間語 108 第1の命令列 109 第2の命令列 110 オブジェクトプログラム 111 フローグラフ作成手段 112 依存関係判定手段 113 命令並び替え手段 121 記録媒体 Reference Signs List 101 Compiling device 102 Intermediate language generating means 103 Instruction rearranging range determining means 104 Instruction scheduling means 105 Object program generating means 106 Source program 107 Intermediate language 108 First instruction string 109 Second instruction string 110 Object program 111 Flow graph creating means 112 Dependency determining means 113 Instruction rearranging means 121 Recording medium

Claims (6)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 ソースプログラムから中間語を生成する
中間語生成手段と、前記中間語の命令列の依存関係を調
査して依存関係のある命令だけを命令並び替え範囲に
定した第1の命令列を生成する命令並び替え範囲決定手
段と、前記第1の命令列から前記命令並び替え範囲内の
命令を並び替えて第2の命令列を生成する命令スケジュ
ール手段と、前記第2の命令列からオブジェクトプログ
ラムを生成するオブジェクトプログラム生成手段とを備
えたことを特徴とするコンパイル装置。
1. An intermediate language generating means for generating an intermediate language from a source program, and checking dependency of an instruction sequence of the intermediate language.
An instruction rearrangement range determining means for generating a first instruction sequence in which only instructions having a dependency relationship are set in the instruction rearrangement range, and an instruction rearrangement range from the first instruction sequence. A compiling apparatus comprising: instruction scheduling means for rearranging instructions in the instruction sequence to generate a second instruction sequence; and object program generating means for generating an object program from the second instruction sequence.
【請求項2】 前記命令並べ替え範囲に含まれる命令の
限界数より多くの命令を命令並び替え範囲に含まない
とを特徴とする請求項1記載のコンパイル装置。
2. The compiling apparatus according to claim 1, wherein more instructions than the limit number of instructions included in the instruction rearrangement range are not included in the instruction rearrangement range .
【請求項3】 ソースプログラムから中間語を生成し、
前記中間語の命令列の依存関係を調査して依存関係のあ
る命令だけを命令並び替え範囲に設定した第1の命令列
を生成し、前記第1の命令列から前記命令並び替え範囲
内の命令を並び替えて第2の命令列を生成し、前記第2
の命令列からオブジェクトプログラムを生成することを
特徴とするコンパイル方法。
3. An intermediate language is generated from a source program.
Investigate the dependency of the instruction sequence of the intermediate language
Generating a first instruction sequence in which only instructions in the instruction rearrangement range are set in the instruction rearrangement range, and rearranging instructions in the instruction rearrangement range from the first instruction sequence to generate a second instruction sequence, 2
A compilation method characterized by generating an object program from a sequence of instructions.
【請求項4】 前記命令並べ替え範囲に含まれる命令の
限界数より多くの命令を命令並び替え範囲に含まない
とを特徴とする請求項3記載のコンパイル方法。
4. The compiling method of claim 3, wherein this <br/> and not included in many instruction reordering range instruction than the limit number of instructions contained in the instruction sorting range.
【請求項5】 ソースプログラムから中間語を生成する
中間語生成処理と、前記中間語の命令列の依存関係を調
査して依存関係のある命令だけを命令並び替え範囲に
定した第1の命令列を生成する命令並び替え範囲決定処
理と、前記第1の命令列から前記命令並び替え範囲内の
命令を並び替えて第2の命令列を生成する命令スケジュ
ール処理と、前記第2の命令列からオブジェクトプログ
ラムを生成するオブジェクトプログラム生成処理とをコ
ンピュータに実行させるためのコンパイラプログラムを
記録したことを特徴とする記録媒体。
5. An intermediate language generating process for generating an intermediate language from a source program, and checking the dependency of an instruction sequence of the intermediate language.
An instruction rearrangement range determining process for generating a first instruction sequence in which only instructions having a dependency relationship are set in the instruction rearrangement range, and the instruction rearrangement range is determined from the first instruction sequence. A compiler program for causing a computer to execute an instruction schedule process of rearranging the instructions in the instruction sequence to generate a second instruction sequence and an object program generation process of generating an object program from the second instruction sequence. Recording medium characterized by the above-mentioned.
【請求項6】 前記命令並べ替え範囲に含まれる命令の
限界数より多くの命令を命令並び替え範囲に含まない
とを特徴とする請求項5記載の記録媒体。
6. The recording medium of claim 5, wherein this <br/> and not included in many instruction reordering range instruction than the limit number of instructions contained in the instruction sorting range.
JP08110399A 1999-03-25 1999-03-25 Compiling device, compiling method, and recording medium recording compiler program Expired - Fee Related JP3323147B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP08110399A JP3323147B2 (en) 1999-03-25 1999-03-25 Compiling device, compiling method, and recording medium recording compiler program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP08110399A JP3323147B2 (en) 1999-03-25 1999-03-25 Compiling device, compiling method, and recording medium recording compiler program

Publications (2)

Publication Number Publication Date
JP2000276356A JP2000276356A (en) 2000-10-06
JP3323147B2 true JP3323147B2 (en) 2002-09-09

Family

ID=13737061

Family Applications (1)

Application Number Title Priority Date Filing Date
JP08110399A Expired - Fee Related JP3323147B2 (en) 1999-03-25 1999-03-25 Compiling device, compiling method, and recording medium recording compiler program

Country Status (1)

Country Link
JP (1) JP3323147B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6945768B2 (en) * 2019-05-31 2021-10-06 三菱電機株式会社 Detection device, detection method, and detection program

Also Published As

Publication number Publication date
JP2000276356A (en) 2000-10-06

Similar Documents

Publication Publication Date Title
US5606697A (en) Compiler system for language processing program
US5586328A (en) Module dependency based incremental compiler and method
US7784039B2 (en) Compiler, compilation method, and compilation program
US6760906B1 (en) Method and system for processing program for parallel processing purposes, storage medium having stored thereon program getting program processing executed for parallel processing purposes, and storage medium having stored thereon instruction set to be executed in parallel
JP2006338616A (en) Compiler device
JP2002149416A (en) Method for optimizing program and compiler using the same
EP0428560A1 (en) Machine process for translating programs in binary machine language into another binary machine language
JPS63201834A (en) Generation of object module
JP2008059279A (en) Technique for optimizing character string output processing
US9256437B2 (en) Code generation method, and information processing apparatus
JP3651774B2 (en) Compiler and its register allocation method
JP3323147B2 (en) Compiling device, compiling method, and recording medium recording compiler program
JP2002527816A (en) Program optimization apparatus and method
JP2001125792A (en) Optimization promoting device
JPH08305583A (en) Method for simulating cpu
US20050144605A1 (en) Information processing system and code generation method
JP3473391B2 (en) Program processing method, program processing device, and recording medium
JPH02176938A (en) Machine language instruction optimizing system
JP7026563B2 (en) High-level synthesis method, high-level synthesis program, high-level synthesis device
JP3018783B2 (en) Compilation method
JP3152194B2 (en) Compiling device, compiling method, and recording medium recording compiler
JPH0561687A (en) Processing system for compiler
JP2000242504A (en) Compiler device
JP2001034482A (en) Compile device, program optimizing device, compile processing method and recording medium
JP2004062324A (en) Optimizing compiler, method of optimizing program, program and storage medium

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20020604

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080628

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090628

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100628

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100628

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110628

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120628

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120628

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130628

Year of fee payment: 11

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees