JP2003316612A - Device for automatically preparing reduction program - Google Patents

Device for automatically preparing reduction program

Info

Publication number
JP2003316612A
JP2003316612A JP2002123318A JP2002123318A JP2003316612A JP 2003316612 A JP2003316612 A JP 2003316612A JP 2002123318 A JP2002123318 A JP 2002123318A JP 2002123318 A JP2002123318 A JP 2002123318A JP 2003316612 A JP2003316612 A JP 2003316612A
Authority
JP
Japan
Prior art keywords
program
reduced
processing
reduction
control unit
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
Application number
JP2002123318A
Other languages
Japanese (ja)
Inventor
Yoshie Inada
由江 稲田
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 JP2002123318A priority Critical patent/JP2003316612A/en
Publication of JP2003316612A publication Critical patent/JP2003316612A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To prepare a reduction program capable of the performance evaluation of the same level as a benchmark program while keeping the characteristics of the benchmark program regarding a device for automatically preparing the reduction program. <P>SOLUTION: The device is provided with a highly frequently processed part extraction part, a repetition number-of-times control part and a data amount reduction control part. The file forms of input, output and the output of respective processing parts are equalized, it is made possible to interrupt a processing in the respective processing parts and it is made possible to continue the processing from the processing part in the middle. An outermost loop part including a highly frequently processed function is detected in the highly frequently processed part extraction part and the program part is extracted. In the repetition number-of-times control part, the change of the processing by the number of times of repetition is checked from a counter value inside hardware, the number of times of the repetition is reduced to one in the case that there is no change, and the number of times of the repetition is reduced to one by making the processings before and after the change coexist even in the case that the number of times of the repetition can not be simply reduced to one for the processing in the middle of the repetition. <P>COPYRIGHT: (C)2004,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、プロセッサ(CP
U、MPU等)の設計時に、論理シュミレータで性能評
価するアプロケーションプログラムを縮小した縮小プロ
グラムを自動的に作成する縮小プログラム自動作成装置
に関する。
The present invention relates to a processor (CP
(U, MPU, etc.) When designing (U, MPU, etc.), the present invention relates to a reduced program automatic creation apparatus for automatically creating a reduced program obtained by reducing an allocation program for performance evaluation by a logic simulator.

【0002】近年、テクノロジの進歩によるプロセッサ
の性能の向上が目ざましい。これに連動し、プロセッサ
の性能を評価するアプリケーションプログラム群(これ
を「ベンチマークプログラム」という)も命令数やデー
タ量が大きく複雑化している。
In recent years, processor performance has been remarkably improved due to technological advances. In conjunction with this, a group of application programs that evaluate the performance of the processor (this is called a "benchmark program") also has a large number of instructions and a large amount of data, which is complicated.

【0003】このアプリケーションプログラムを実際の
速度の数万分の一で動作する論理シュミレータで動作さ
せようとすると数カ月かかってしまい、全実行を論理シ
ュミレータで実行し開発のプロセッサの論理回路の検証
を行ったり性能を見積もるのは現実的な時間では不可能
である。
It takes several months to operate this application program by a logic simulator that operates at tens of thousands of the actual speed, and the entire execution is executed by the logic simulator to verify the logic circuit of the developed processor. It is impossible to estimate performance or performance in a realistic time.

【0004】しかし、プロセッサの設計の早期の段階で
論理シュミレータを用いて評価し、開発のプロセッサに
フィードバックすることが要求されている。このため、
オリジナルプログラムの特性を保持しつつ論理シュミレ
ータで現実的な時間で実行可能な命令数にプログラムを
縮小する必要がある。
However, there is a demand for evaluation using a logic simulator in an early stage of processor design and feedback to the processor for development. For this reason,
It is necessary to reduce the number of instructions that can be executed in a realistic time by the logic simulator while maintaining the characteristics of the original program.

【0005】[0005]

【従来の技術】以下、従来例について説明する。2. Description of the Related Art A conventional example will be described below.

【0006】従来のプロセッサ設計時の論理シュミレー
タ上での検証や性能評価は、命令数の比較的小さいテス
トプログラムや小さなアプリケーションプログラムを用
いて行われてきた。ところが、これらの小さなプログラ
ム群では、一般にプロセッサの性能評価で用いる大きな
サイズのベンチマークプログラムではないため、論理回
路検証時のプロセッサ設計早期に他社の開発のプロセッ
サの性能と比較ができない。また、命令数が莫大である
ため、ベンチマークプログラムを論理シュミレータで実
行すると数カ月かかってしまう。
The conventional verification and performance evaluation on the logic simulator at the time of processor design have been performed using a test program or a small application program having a relatively small number of instructions. However, since these small program groups are not generally large-sized benchmark programs used for processor performance evaluation, they cannot be compared with the performance of processors developed by other companies early in processor design during logic circuit verification. Also, because of the huge number of instructions, it takes several months to execute a benchmark program with a logic simulator.

【0007】[0007]

【発明が解決しようとする課題】前記のような従来のも
のにおいては、次のような課題があった。
SUMMARY OF THE INVENTION The above-mentioned conventional device has the following problems.

【0008】従来は、ベンチマークプログラムの論理シ
ュミレータでの検証や性能評価は現実的な時間で実行で
きず、また、論理回路検証時のプロセッサ設計が早期に
他社の開発のプロセッサの性能と比較できなかった。
Conventionally, the verification and performance evaluation of a benchmark program by a logic simulator cannot be executed in a realistic time, and the processor design at the time of logic circuit verification cannot be compared with the performance of a processor developed by another company at an early stage. It was

【0009】本発明は、このような従来の課題を解決
し、ベンチマークプログラム(縮小対象のアプリケーシ
ョンプログラム)の特性を保持したまま、ベンチマーク
プログラムと同レベルの性能評価が可能な縮小プログラ
ムを自動的に作成することを目的とする。
The present invention solves such a conventional problem, and automatically maintains a reduced program capable of performance evaluation at the same level as that of the benchmark program while maintaining the characteristics of the benchmark program (reduction target application program). The purpose is to create.

【0010】[0010]

【課題を解決するための手段】本発明は前記の目的を達
成するため、次のように構成した。
In order to achieve the above object, the present invention has the following constitution.

【0011】(1) :アプリケーションプログラムの特徴
を保持したまま、命令数を縮小する縮小プログラム自動
作成装置であって、縮小対象のアプリケーションプログ
ラムに対し、高頻度処理部分の抽出を行う高頻度処理部
分抽出部と、繰り返し回数の制御を行う繰り返し回数制
御部と、データ量の削減制御を行うデータ量削減制御部
を備え、入力と出力と各処理部の出力のファイル形式を
等しくし、各処理部で処理を中断可能とし、途中の処理
部から処理を継続可能にする機能と、前記高頻度処理部
分抽出部で、高頻度処理関数を含む最外ループ箇所を検
出し、そのプログラム箇所を抽出する機能と、前記繰り
返し回数制御部で、ハードウェア内部のカウンタ値から
繰り返し回数による処理の変化を調査し、変化がない場
合は繰り返し回数を一回に削減し、繰り返しの途中で処
理が単純に繰り返し回数を一回に削減不可能な場合で
も、変化の前後の処理を混在させることで繰り返し回数
を一回に削減可能とする機能を備えていることを特徴と
する縮小プログラム自動作成装置。
(1): A reduced program automatic creation apparatus for reducing the number of instructions while retaining the characteristics of the application program, which is a high frequency processing part for extracting a high frequency processing part from the application program to be reduced. An extraction unit, a repetition number control unit that controls the number of repetitions, and a data amount reduction control unit that performs data amount reduction control are provided, and the file formats of the input and output and the output of each processing unit are made equal to each other. With the function that enables the processing to be interrupted at, and the processing can be continued from an intermediate processing unit, and the high-frequency processing part extraction unit detects the outermost loop location including the high-frequency processing function and extracts the program location. With the function and the repeat count control unit, the change in processing due to the repeat count is investigated from the counter value inside the hardware. Even if it is not possible to reduce the number of iterations to one once in the middle of the iteration, it is possible to reduce the number of iterations to one by mixing the processing before and after the change. A reduction program automatic creation device characterized in that

【0012】(2) :前記(1) の縮小プログラム自動作成
装置において、データ削減制御部は、変数のアクセスパ
ターンを認識し、縮小可能な変数を選択する制御手段を
備えていることを特徴とする。
(2): In the reduction program automatic creation apparatus of the above (1), the data reduction control unit includes control means for recognizing an access pattern of a variable and selecting a variable that can be reduced. To do.

【0013】(3) :前記(1) の縮小プログラム自動作成
装置において、前記データ量削減制御部は、キャッシュ
の容量を認識し、データ量の削減サイズを決定する決定
手段を備えていることを特徴とする。
(3): In the reduction program automatic creation apparatus of (1), the data amount reduction control unit is provided with deciding means for recognizing the cache capacity and determining the reduction amount of the data amount. Characterize.

【0014】(4) :前記(1) の縮小プログラム自動作成
装置において、前記データ量削減制御部は、キャッシュ
の容量性ミスを再現するため、アクセス変数のアドレス
を変えて再現する制御手段を備えていることを特徴とす
る。
(4): In the reduction program automatic creation apparatus of (1) above, the data amount reduction control unit is provided with control means for changing the address of the access variable to reproduce the cache capacity miss. It is characterized by

【0015】(5) :前記(1) の縮小プログラム自動作成
装置において、オリジナルプログラムと縮小プログラム
の類似度をキャッシュミス率で判断する機能を備えてい
ることを特徴とする。
(5): The reduced program automatic creation apparatus of the above (1) is characterized in that it has a function of judging the similarity between the original program and the reduced program by the cache miss rate.

【0016】(作用)前記構成に基づく本発明の作用を
説明する。
(Operation) The operation of the present invention based on the above configuration will be described.

【0017】(a) :前記(1) では、縮小対象のアプリケ
ーションプログラムに対し、高頻度処理部分抽出部が高
頻度処理部分を抽出し、繰り返し回数制御部が繰り返し
回数の制御を行い、データ量削減制御部がデータ量の削
減処理を行うことで、縮小対象アプリケーションプログ
ラムの特徴を保持したまま命令数を縮小する処理を行
う。
(A): In the above (1), the high-frequency processing part extraction section extracts the high-frequency processing section from the application program to be reduced, and the repetition number control section controls the repetition number to obtain the data amount. The reduction control unit performs a data amount reduction process, thereby performing a process of reducing the number of instructions while maintaining the characteristics of the reduction target application program.

【0018】この場合、入力と出力と各処理部の出力の
ファイル形式を等しくし、各処理部で処理を中断可能と
し、途中の処理部から処理を継続可能にする。また、高
頻度処理部分抽出部は高頻度処理関数を含む最外ループ
箇所を検出し、そのプログラム箇所を抽出する。
In this case, the file formats of the input and output and the output of each processing unit are made equal, the processing can be interrupted in each processing unit, and the processing can be continued from the processing unit in the middle. Further, the high-frequency processing portion extraction unit detects the outermost loop location including the high-frequency processing function and extracts the program location.

【0019】また、繰り返し回数制御部はハードウェア
内部のカウンタ値から繰り返し回数による処理の変化を
調査し、変化がない場合は繰り返し回数を一回に削減
し、繰り返しの途中で処理が単純に繰り返し回数を一回
に削減不可能な場合でも、変化の前後の処理を混在させ
ることで繰り返し回数を一回に削減可能とする。
Further, the repeat count control unit investigates the change in the process depending on the repeat count from the counter value in the hardware, reduces the repeat count to one when there is no change, and simply repeats the process in the middle of the repeat. Even if the number of times cannot be reduced to once, the number of repetitions can be reduced to one by mixing the processes before and after the change.

【0020】このようにすれば、3種類の処理部(高頻
度処理部分抽出部、繰り返し回数制御部、及びデータ量
削減制御部)で出力する中間ファイルは、入力する縮小
対象プログラムや実行モジュールとファイル形式が等し
いため、途中で処理を中断し中間ファイルとして保存
し、中間ファイルを入力として各処理部の途中から処理
を継続することができる。すなわち、処理の途中で終了
し、処理の途中から処理を開始することが簡単にできる
ので、オペレータ等が時間を自由に使えるし、作業効率
も極めて良い。
With this configuration, the intermediate files output by the three types of processing units (the high-frequency processing portion extraction unit, the repetition number control unit, and the data amount reduction control unit) are the input reduction target program and the execution module. Since the file formats are the same, the processing can be interrupted halfway and saved as an intermediate file, and the processing can be continued from the middle of each processing unit using the intermediate file as an input. That is, since it is possible to easily end the process in the middle of the process and start the process in the middle of the process, the operator or the like can freely use the time and the work efficiency is extremely good.

【0021】更に、ベンチマークプログラム(縮小対象
のアプリケーションプログラム)の特性を保持したま
ま、ベンチマークプログラムと同レベルの性能評価が可
能となる。そして、縮小プログラム自動生成装置によっ
て作成された縮小プログラムを論理シミュレータで実行
すれば、現実的な時間でベンチマークプログラムの性能
予測や検証ができ、開発プロセッサの設計開発の期間短
縮化や再チューニングに寄与するところが大きい。
Furthermore, it is possible to evaluate the performance at the same level as the benchmark program while maintaining the characteristics of the benchmark program (reduction target application program). By executing the reduced program created by the reduced program automatic generator with a logic simulator, the performance of the benchmark program can be predicted and verified in a realistic time, which contributes to shortening the period of design and development of the development processor and retuning. There is a lot to do.

【0022】(b) :前記(2) では、データ削減制御部の
制御処理は、変数のアクセスパターンを認識し、縮小可
能な変数を選択する。
(B): In the above (2), the control process of the data reduction control unit recognizes the access pattern of the variable and selects the variable that can be reduced.

【0023】このようにすれば、ベンチマークプログラ
ムの特性を保持したまま、ベンチマークプログラムと同
レベルの性能評価が可能となる。そして、縮小プログラ
ム自動生成装置によって作成された縮小プログラムを論
理シミュレータで実行すれば、現実的な時間でベンチマ
ークプログラムの性能予測や検証ができ、開発プロセッ
サの設計開発の期間短縮化や再チューニングに寄与する
ところが大きい。
In this way, performance evaluation at the same level as the benchmark program can be performed while maintaining the characteristics of the benchmark program. By executing the reduced program created by the reduced program automatic generator with a logic simulator, the performance of the benchmark program can be predicted and verified in a realistic time, which contributes to shortening the period of design and development of the development processor and retuning. There is a lot to do.

【0024】(c) :前記(3) では、データ量削減制御部
の決定手段は、キャッシュの容量を認識し、データ量の
削減サイズを決定する。このようにすれば、ベンチマー
クプログラムの特性を保持したまま、ベンチマークプロ
グラムと同レベルの性能評価が可能となる。そして、縮
小プログラム自動生成装置によって作成された縮小プロ
グラムを論理シミュレータで実行すれば、現実的な時間
でベンチマークプログラムの性能予測や検証ができ、開
発プロセッサの設計開発の期間短縮化や再チューニング
に寄与するところが大きい。
(C): In the above (3), the determining means of the data amount reduction control unit recognizes the capacity of the cache and determines the reduction size of the data amount. This makes it possible to perform performance evaluation at the same level as the benchmark program while maintaining the characteristics of the benchmark program. By executing the reduced program created by the reduced program automatic generator with a logic simulator, the performance of the benchmark program can be predicted and verified in a realistic time, which contributes to shortening the period of design and development of the development processor and retuning. There is a lot to do.

【0025】(d) :前記(4) では、データ量削減制御部
の制御手段は、キャッシュの容量性ミスを再現するた
め、アクセス変数のアドレスを変えて再現する。
(D): In the above (4), the control means of the data amount reduction control unit reproduces the cache variable miss by changing the address of the access variable.

【0026】このようにすれば、データ量を削減して
も、キャッシュミス率を同等にすることができる。ま
た、ベンチマークプログラムの特性を保持したまま、ベ
ンチマークプログラムと同レベルの性能評価が可能とな
る。そして、縮小プログラム自動生成装置によって作成
された縮小プログラムを論理シミュレータで実行すれ
ば、現実的な時間でベンチマークプログラムの性能予測
や検証ができ、開発プロセッサの設計開発の期間短縮化
や再チューニングに寄与するところが大きい。
In this way, the cache miss rate can be made equal even if the data amount is reduced. In addition, it is possible to perform performance evaluation at the same level as the benchmark program while maintaining the characteristics of the benchmark program. By executing the reduced program created by the reduced program automatic generator with a logic simulator, the performance of the benchmark program can be predicted and verified in a realistic time, which contributes to shortening the period of design and development of the development processor and retuning. There is a lot to do.

【0027】(e) :前記(5) では、縮小プログラム自動
作成装置は、オリジナルプログラムと縮小プログラムの
類似度をキャッシュミス率で判断する。このようにすれ
ば、ベンチマークプログラムの特性を保持したまま、ベ
ンチマークプログラムと同レベルの性能評価が可能とな
る。そして、縮小プログラム自動生成装置によって作成
された縮小プログラムを論理シミュレータで実行すれ
ば、現実的な時間でベンチマークプログラムの性能予測
や検証ができ、開発プロセッサの設計開発の期間短縮化
や再チューニングに寄与するところが大きい。
(E): In the above (5), the reduced program automatic creation apparatus judges the similarity between the original program and the reduced program based on the cache miss rate. This makes it possible to perform performance evaluation at the same level as the benchmark program while maintaining the characteristics of the benchmark program. By executing the reduced program created by the reduced program automatic generator with a logic simulator, the performance of the benchmark program can be predicted and verified in a realistic time, which contributes to shortening the period of design and development of the development processor and retuning. There is a lot to do.

【0028】[0028]

【発明の実施の形態】以下、本発明の実施の形態を図面
に基づいて詳細に説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described in detail below with reference to the drawings.

【0029】§1:縮小プログラム自動作成装置全体の
説明 図1は縮小プログラム自動作成装置の説明図である。図
1に示したように、高頻度処理部分抽出部1は、対象と
なるベンチマークプログラム(縮小対象のアプリケーシ
ョンプログラム)と実行モジュールを入力とし、高頻度
処理部分を抽出したプログラムとその実行モジュールを
中間ファイルとして新たに作成するものである。
§1: Description of the entire reduction program automatic creation apparatus FIG. 1 is an explanatory diagram of the reduction program automatic creation apparatus. As shown in FIG. 1, the high-frequency processing part extraction unit 1 receives a benchmark program (application program to be reduced) and an execution module as an input, and intermediates the program and the execution module from which the high-frequency processing part is extracted. It is to be newly created as a file.

【0030】繰り返し回数制御部2は、高頻度処理部分
抽出部1で作成したプログラムと実行モジュールを入力
とし、繰り返し回数を削減したプログラムとその実行モ
ジュールを中間ファイルとして新たに作成するものであ
る。データ量削減制御部3は、繰り返し回数制御部2で
作成したプログラムと実行モジュールを入力し、データ
量を削減したプログラムと実行モジュールを作成するも
のである。
The repeat count control unit 2 receives the program and execution module created by the high frequency processing part extraction unit 1 and newly creates a program and its execution module with a reduced repeat count as an intermediate file. The data amount reduction control unit 3 inputs the program and the execution module created by the repetition number control unit 2 and creates a program and an execution module with a reduced data amount.

【0031】前記のように、縮小プログラム自動作成装
置は、高頻度処理部分抽出部1と、繰り返し回数制御部
2と、データ量削減制御部3からなる3種類の処理部を
備えている。そして、各処理部で出力する中間ファイル
は、入力する縮小対象プログラムや実行モジュールとフ
ァイル形式が等しいため、途中で処理を中断し中間ファ
イルとして保存し、中間ファイルを入力として各処理部
の途中から処理を継続することが可能である。
As described above, the reduced program automatic creation apparatus includes three types of processing units, which are the high frequency processing portion extraction unit 1, the repetition number control unit 2, and the data amount reduction control unit 3. The intermediate file output by each processing unit has the same file format as the input reduction target program or execution module, so processing is interrupted and saved as an intermediate file, and the intermediate file is input from the middle of each processing unit. It is possible to continue processing.

【0032】このように処理の途中で終了したり、処理
の途中から処理を継続することが可能なので、時間が自
由であり、作業効率が良い。また、中間ファイルとして
縮小プログラムと実行モジュールをセットで保存するた
め、一旦、処理を終了し、また、途中から縮小プログラ
ムの作成処理を開始することができる。
As described above, since the processing can be ended in the middle of the processing or the processing can be continued from the middle of the processing, the time is free and the work efficiency is good. Moreover, since the reduction program and the execution module are stored as a set as an intermediate file, the processing can be ended once and the reduction program creation processing can be started halfway.

【0033】§2:高頻度処理部分抽出部の詳細な説明 図2は高頻度処理部分抽出部の説明図である。図2に示
したように、高頻度処理部分抽出部1は、縮小対象とな
るベンチマークプログラムと実行モジュールを入力とし
動作する。また、高頻度処理部分抽出部1では、プロフ
ァイラ14はプログラム中の主要関数とその処理時間割
合(プロファイラ情報)を出力する。
§2: Detailed Explanation of High Frequency Processing Part Extraction Unit FIG. 2 is an explanatory diagram of the high frequency processing part extraction unit. As shown in FIG. 2, the high frequency processing part extraction unit 1 operates by inputting a benchmark program and an execution module to be reduced. Further, in the high-frequency processing portion extraction unit 1, the profiler 14 outputs the main function in the program and its processing time ratio (profiler information).

【0034】図2の最外ループ検出部11は、プロファ
イル情報と高頻度処理の閾値αを入力とし、その値以上
の関数を高頻度処理関数と認識しその関数の最外ループ
箇所を検出する。プログラム生成部12は、最外ループ
の箇所をプログラムから抽出し、新たな中間ファイルと
して高頻度処理抽出プログラムを作成する。
The outermost loop detection unit 11 in FIG. 2 receives profile information and a threshold value α for high-frequency processing, recognizes a function equal to or more than that value as a high-frequency processing function, and detects the outermost loop location of the function. . The program generation unit 12 extracts the outermost loop location from the program and creates a high-frequency processing extraction program as a new intermediate file.

【0035】実行モジュール生成部13は、前記高頻度
処理抽出プログラムをコンパイラ15によってコンパイ
ルし、中間実行モジュールとして高頻度処理抽出実行モ
ジュールを作成する。なお、前記閾値αは、予めオペレ
ータが入力しておいたものを使用する。また、前記プロ
ファイラ14は、プログラムの動作解析を行うツールの
ことを言う。
The execution module generation unit 13 compiles the high frequency process extraction program by the compiler 15 to create a high frequency process extraction execution module as an intermediate execution module. It should be noted that the threshold value α used is one that the operator has previously input. The profiler 14 refers to a tool for analyzing the operation of a program.

【0036】§3:繰り返し回数制御部の詳細な説明
(図3、図4参照) 図3は繰り返し回数制御部の説明図である。また、図4
はループ回転数縮小部における挙動変化の説明図であ
り、A図は挙動が変化しないもの→繰り返し回数1回に
削減可能、B図は挙動が変化するもの→単純に繰り返し
回数1回に削減不可能、C図は繰り返し回数削減による
プログラム生成部の説明図を示す。また、図4のC図に
おいて、C−1はオリジナルプログラムコード、C−2
はループ削減プログラムコードを示す。
§3: Detailed Description of Repeat Count Control Section (See FIGS. 3 and 4) FIG. 3 is an explanatory diagram of the repeat count control section. Also, FIG.
Is a diagram for explaining the behavior change in the loop rotation speed reduction unit. In FIG. A, the behavior does not change. → It is possible to reduce the number of repetitions to 1 time. In Fig. B, the behavior changes. → It is simply reduced to 1 repetition number. Yes, FIG. C shows an explanatory diagram of the program generation unit by reducing the number of repetitions. Further, in FIG. 4C, C-1 is the original program code, C-2
Indicates loop reduction program code.

【0037】繰り返し回数制御部2は、高頻度処理部分
抽出部1から出力された中間ファイルと実行モジュール
を入力として動作する。ループ回数による挙動調査部2
1は、ハードウェアカウンタ26(CPU内部のカウン
タ)を起動させ、ループ回数(プログラムのループ回
数)が1回終了する毎に、ループ数毎の命令数M(M:
メガステップ)と2次キャッシュミス率(%)を出力す
る。
The repetition number control unit 2 operates with the intermediate file and the execution module output from the high frequency processing part extraction unit 1 as inputs. Behavior investigation part 2 by the number of loops
1 starts the hardware counter 26 (counter inside the CPU), and every time the loop count (the loop count of the program) ends once, the number of instructions M (M:
It outputs the mega step) and the secondary cache miss rate (%).

【0038】ループ回転数縮小部22は、ループ回数に
よる挙動調査部21の出力結果からループの挙動変化を
検出する。挙動変化とは、ループ数と命令数の変化と、
ループ数と2次キャッシュミス率の変化から行う。
The loop rotation speed reduction unit 22 detects a behavior change of the loop from the output result of the behavior investigation unit 21 according to the number of loops. Behavior changes are changes in the number of loops and instructions,
It is performed by changing the number of loops and the secondary cache miss rate.

【0039】例えば、図4のA図のように、ループ数と
命令数が比例し、かつ、ループ数が変化しても2次キャ
ッシュミス率が一定であれば、ループ間で挙動が変化し
ないと見なし、すなわち、1ループの挙動は全ループの
挙動を反映しているとみなされ、ループ回転数を1ルー
プに削減可能とする。
For example, as shown in FIG. 4A, if the number of loops is proportional to the number of instructions and the secondary cache miss rate is constant even if the number of loops changes, the behavior does not change between the loops. That is, the behavior of one loop is considered to reflect the behavior of all loops, and the loop rotation speed can be reduced to one loop.

【0040】プログラム生成部24においては、ループ
回転数を1としたプログラムコードを新たに生成する。
これに対し、図4のB図に示したように、ループ数と命
令数が比例せず、ループ数の変化に伴い2次キャッシュ
ミス率も変化する場合は、1ループの挙動は全ループの
挙動を反映しているとは言えず、単純に1ループに削減
不可能である。そのため、挙動変化箇所調査部23がル
ープ間で挙動が変化する部分を検出して調査する。
The program generator 24 newly generates a program code having a loop rotation speed of 1.
On the other hand, as shown in FIG. 4B, when the number of loops and the number of instructions are not proportional and the secondary cache miss rate changes as the number of loops changes, the behavior of one loop is It cannot be said that the behavior is reflected, and it cannot simply be reduced to one loop. Therefore, the behavior change point investigation unit 23 detects and investigates a portion where the behavior changes between the loops.

【0041】図4のC図のC−1では、関数funcA()
が250回処理され、関数funcB()が(4000−2
50)回処理されるため、ループ処理間の前後で挙動が
異なる。ループ間で処理の挙動が変化する回数と変化ル
ープ番号(この例では250)を検出する。
In C-1 of FIG. 4C, the function funcA ()
Is processed 250 times, and the function funcB () becomes (4000-2
Since it is processed 50 times, the behavior is different before and after the loop processing. The number of times the processing behavior changes between loops and the changed loop number (250 in this example) are detected.

【0042】挙動変化箇所調査部23では、全ループ回
数4000回のうち250回目のループで処理が変化す
ることから、変化回数1回を検出し、変化ループ番号2
50を検出する。プログラム生成部24は、前記挙動変
化箇所調査部23の情報を受信し、1ループ削減のプロ
グラムを作成する。
The behavior change point investigation unit 23 detects one change count because the process changes in the 250th loop out of 4000 total loop counts, and changes loop number 2
Detect 50. The program generation unit 24 receives the information of the behavior change point investigation unit 23 and creates a program for reducing one loop.

【0043】図4のC図のC−2では、前記プログラム
生成部24で自動生成した1ループ抽出のプログラムコ
ードを示す。ループ回数を1回に削減し、それぞれの関
数funcA()、funcB()の処理の割合を、ループ回転
数の比率で決定したプログラムコードを新たに生成す
る。
C-2 in FIG. 4C shows a program code for one-loop extraction which is automatically generated by the program generating section 24. The number of loops is reduced to one, and a program code is newly generated in which the processing ratios of the respective functions funcA () and funcB () are determined by the ratio of the loop rotation speed.

【0044】このように、繰り返し回数制御部2で、ハ
ードウェア内部のカウンタ値から繰り返し回数による処
理の変化を調査し、変化がない場合は繰り返し回数を一
回に削減し、繰り返しの途中で処理が単純に繰り返し回
数を一回に削減不可能な場合でも、変化の前後の処理を
混在させることで繰り返し回数を一回に削減可能とす
る。
As described above, the repeat count control unit 2 investigates the change in the process depending on the repeat count from the internal counter value of the hardware. If there is no change, the repeat count is reduced to one and the process is repeated. Even if it is impossible to simply reduce the number of repetitions to one, it is possible to reduce the number of repetitions to one by mixing the processes before and after the change.

【0045】その後、実行モジュール生成部25は、前
記プログラム生成部24で自動生成したプログラムをコ
ンパイルし、中間実行モジュールとして繰り返し削減実
行モジュールを作成する。
After that, the execution module generation unit 25 compiles the program automatically generated by the program generation unit 24, and repeatedly creates a reduction execution module as an intermediate execution module.

【0046】§4:データ量削減制御部の詳細な説明
(図5、6、7参照) 図5はデータ量削減制御部の説明図である。また、図6
は縮小変数選択部における変数アクセス解析図及びデー
タ量削減におけるプログラム生成部の説明図であり、A
図は縮小変数選択部における変数アクセス解析図、B図
はデータ量削減におけるプログラム生成部の説明図であ
る。また、図6のA図において、(a) は縮小可能な変
数、(b) は縮小不可能な変数を示す。また、図6のB図
において、(a) はオリジナルプログラムコード、(b) は
データ削減プログラムコードを示す。
§4: Detailed description of data amount reduction control unit (see FIGS. 5, 6, and 7) FIG. 5 is an explanatory diagram of the data amount reduction control unit. In addition, FIG.
Is a variable access analysis diagram in the reduced variable selection unit and an explanatory diagram of a program generation unit in data amount reduction,
The figure is a variable access analysis diagram in the reduced variable selection unit, and the diagram B is an explanatory diagram of the program generation unit in the data amount reduction. Further, in FIG. 6A, (a) shows a variable that can be reduced and (b) shows a variable that cannot be reduced. Further, in FIG. 6B, (a) shows the original program code and (b) shows the data reduction program code.

【0047】また、図7はデータ量削減におけるキャッ
シュミス率再現方法の説明図であり、(a) 図はオリジナ
ルプログラムコード、(b) 図はキャッシュミスが発生し
ないコード、(c) 図はキャッシュミスが発生するコード
を示す。
FIG. 7 is an explanatory diagram of a method of reproducing the cache miss rate in reducing the amount of data. (A) is the original program code, (b) is the code in which no cache miss occurs, and (c) is the cache. Indicates the code that makes the mistake.

【0048】データ量削減制御部3は、繰り返し回数制
御部2で出力された中間ファイルと実行モジュールを入
力として動作する。縮小変数選択部31では、変数のア
クセスパターンを解読し縮小可能な変数を選出する。
The data amount reduction control unit 3 operates with the intermediate file and the execution module output from the repeat count control unit 2 as inputs. The reduced variable selection unit 31 decodes the variable access pattern and selects a variable that can be reduced.

【0049】図6において、A図の(a) はデータサイズ
を縮小することによりアクセスストライドの幅が変化し
ない変数である。例えば、double a[100][10
0]の配列データのアクセスが1次元目から順にアクセ
スされるものは、処理の後の方でアクセスされる2次元
目を縮小可能である。これは、参照領域を削減してもキ
ャッシュラインへのアクセスが変わらないためである。
In FIG. 6, (a) in FIG. 6A is a variable in which the width of the access stride does not change by reducing the data size. For example, double a [100] [10
[0] array data is accessed sequentially from the first dimension, the second dimension accessed later can be reduced. This is because the access to the cache line does not change even if the reference area is reduced.

【0050】図6において、A図の(b) はデータサイズ
を縮小することによりアクセスストライドの幅が変化す
る変数である。例えば、double b[100][100]
の配列データのアクセスが2次元目からストライドアク
セスされるものは、処理の後の方でアクセスされる1次
元目を削減すると、変数アクセスのストライド幅がオリ
ジナルのアクセスと異なってしまい、アクセスするキャ
ッシュラインの位置も異なってしまうことから、オリジ
ナルプログラムのキャッシュミス率を再現できない。
In FIG. 6, (b) of FIG. 6A is a variable in which the width of the access stride changes by reducing the data size. For example, double b [100] [100]
If the array data is accessed stride from the second dimension, the stride width of the variable access will be different from the original access if the first dimension accessed after processing is reduced, and the cache to be accessed Since the line positions are also different, the cache miss rate of the original program cannot be reproduced.

【0051】そのため、縮小変数選択部31では、変数
のアクセスパターンを解読し、ストライドアクセスを行
っていない変数を選択する。
Therefore, the reduced variable selection unit 31 decodes the variable access pattern and selects a variable that has not been stride-accessed.

【0052】縮小サイズ決定部32では、開発するプロ
セッサ(例えば、CPU)の2次キャッシュサイズを入
力し、変数の縮小サイズを決定する。オリジナルプログ
ラムは変数のサイズが大きいため、大量のデータを参照
し頻繁にキャッシュからの追い出しが発生するためキャ
ッシュミス率も高い。
The reduced size determination unit 32 inputs the secondary cache size of the processor (for example, CPU) to be developed, and determines the reduced size of the variable. The original program has a large variable size, so a large amount of data is referenced and the data is frequently flushed from the cache, resulting in a high cache miss rate.

【0053】これに対し、変数のサイズを縮小しすぎる
と参照する領域が減ることから、データがキャッシュ上
に残ってしまい、キャッシュからの追い出しが発生し難
く、キャッシュミス率が低くなってしまう。従って、縮
小するサイズはキャッシュからの追い出しが起きるサイ
ズにする必要があり、縮小するサイズを2次キャッシュ
のサイズ以上になるように決定する。
On the other hand, if the size of the variable is reduced too much, the area to be referred to will be reduced, so that the data will remain in the cache, it will be difficult to flush the data from the cache, and the cache miss rate will be low. Therefore, the size to be reduced must be a size at which flushing from the cache occurs, and the size to be reduced is determined to be equal to or larger than the size of the secondary cache.

【0054】縮小対象変数はサイズの大きいものから選
択する。例えば、2次キャッシュのサイズが8Kbyteで
ある場合、1次元配列double a[]のサイズを8Kbyte
以上になるように配列aの配列サイズを決定し縮小す
る。オリジナルプログラムの配列aがキャッシュのサイ
ズよりも小さければ配列サイズは縮小しない。
Variables to be reduced are selected from those having a large size. For example, if the size of the secondary cache is 8 Kbytes, the size of the one-dimensional array double a [] is 8 Kbytes.
The array size of the array a is determined and reduced as described above. If the array a of the original program is smaller than the cache size, the array size is not reduced.

【0055】プログラム生成部33は、変数サイズが縮
小されたプログラムコードを生成し、これに応じ縮小変
数を支配するループ回転数を縮小したプログラムコード
を生成する。例えば、図6のB図の(b) は、配列aのサ
イズが10000から500に縮小されたことによりル
ープの回転数も10000から500に縮小された例を
示す。
The program generator 33 generates a program code with a reduced variable size, and accordingly generates a program code with a reduced loop rotation speed that governs the reduced variable. For example, (b) of FIG. 6B shows an example in which the size of the array a is reduced from 10,000 to 500, and the number of rotations of the loop is also reduced from 10,000 to 500.

【0056】実行モジュール生成部34は、プログラム
生成部33で自動生成したプログラムをコンパイラによ
ってコンパイルし、中間実行モジュールとしてデータ量
削減実行モジュールを作成する。この実行モジュール
は、キャッシュミス率調査部35で、開発プロセッサ
(例えば、CPU)のキャッシュ構成のキャッシュシミ
ュレータ38でキャッシュミス率が計測される。このミ
ス率がオリジナルプログラムのミス率とほぼ一致してい
れば、作成された縮小プログラムと実行モジュールを最
終的縮小実行モジュールとして出力する。
The execution module generation unit 34 compiles the program automatically generated by the program generation unit 33 by the compiler to generate a data amount reduction execution module as an intermediate execution module. In this execution module, the cache miss rate examining unit 35 measures the cache miss rate by a cache simulator 38 having a cache configuration of a development processor (for example, CPU). If this error rate is substantially the same as the error rate of the original program, the created reduction program and execution module are output as the final reduction execution module.

【0057】これに対し、オリジナルプログラムのキャ
ッシュミス率と明らかに異なる場合は、生成された縮小
プログラムと実行モジュールは縮小されたものと認証さ
れない。この原因は、図6のB図の(b) のプログラムコ
ード変更の影響が図6のB図の(b) 以外の処理の箇所で
起きたことになる。
On the other hand, if the cache miss rate of the original program is clearly different, the generated reduced program and execution module are not certified as reduced. The cause of this is that the influence of the program code change of FIG. 6B, (b), occurred at a processing location other than that of FIG. 6B, (b).

【0058】図7の(a) はオリジナルのプログラムコー
ドを示し、処理C、D共に参照される領域が十分に大き
いため、キャッシュミスが生じる。図7の(b) において
は、処理Cでキャッシュミスが生じる様、配列データの
サイズを縮小してプログラムコードを変更したため、キ
ャッシュミスが生じるが、処理Dでは参照する配列デー
タaが処理Cでキャッシュに残っており、処理Dではそ
のデータを参照するためキャッシュミスが生じない。
FIG. 7A shows the original program code, and since the areas referred to by both processes C and D are sufficiently large, a cache miss occurs. In FIG. 7B, a cache miss occurs because the size of the array data is reduced and the program code is changed so that a cache miss occurs in the process C. However, in the process D, the array data a referred to is the process C. It remains in the cache, and since the data is referenced in the process D, no cache miss occurs.

【0059】キャッシュ挙動再生部36では、これに対
応するためプログラムコードと実行モジュールが再生さ
れる。図7の(c) では、処理Dの参照アドレスを処理C
でしたアドレスと異なるものになるようアクセス変数の
アドレスを変更してキャッシュに残っていないアドレス
を使用することでミス率を再現する。
In the cache behavior reproducing unit 36, the program code and the execution module are reproduced to cope with this. In FIG. 7C, the reference address of the process D is set to the process C.
The miss rate is reproduced by changing the address of the access variable so that it is different from the address that was not used and using the address that is not left in the cache.

【0060】プログラム中の変更は配列データのインデ
ックスを変更したプログラムコードが生成される。この
コードは再びコンパイラによって実行モジュールにな
り、キャッシュミス率調査部35でオリジナルプログラ
ムのミス率と比較され、ほぼ一致している場合は、縮小
プログラムと実行モジュールとして出力される。
For the change in the program, a program code in which the index of the array data is changed is generated. This code becomes an execution module again by the compiler, is compared with the miss rate of the original program by the cache miss rate examining unit 35, and if they are almost the same, it is output as a reduced program and an execution module.

【0061】図1に示した繰り返し回数制御部2やデー
タ量削減制御部3で作成した実行モジュールは、2次キ
ャッシュミス率の類似度で、オリジナルプログラムと縮
小プログラムの等価性を定義する。2次キャッシュミス
率はメインメモリへのアクセスを生じるためレイテンシ
が大きく、プロセッサ(例えば、CPU)の性能に多大
に影響を与えるため、2次キャッシュミス率を同等に
し、縮小プログラムの性能評価に使用する。
The execution modules created by the repeat count control unit 2 and the data amount reduction control unit 3 shown in FIG. 1 define the equivalence between the original program and the reduced program by the degree of similarity of the secondary cache miss rate. The secondary cache miss rate has a large latency because it causes access to the main memory and greatly affects the performance of the processor (for example, CPU). Therefore, the secondary cache miss rate is made equal and used for performance evaluation of the reduced program. To do.

【0062】§5:具体的な装置例と記録媒体の説明 図8は具体的な装置例である。図1に示した縮小プログ
ラム自動作成装置は、例えば、図8に示した装置により
実現することができる。この装置例は、パーソナルコン
ピュータ、ワークステーション等の任意のコンピュータ
により実現する装置であり、コンピュータ本体41と、
該コンピュータ本体41に接続されたディスプレイ装置
42、キーボード、マウス等の入力装置43、リムーバ
ブルディスクドライブ(RDD)44と、磁気ディスク
装置(MDD)45等を備えている。
§5: Description of Specific Device Example and Recording Medium FIG. 8 shows a specific device example. The reduction program automatic creation apparatus shown in FIG. 1 can be realized by, for example, the apparatus shown in FIG. This device example is a device realized by an arbitrary computer such as a personal computer or a workstation, and includes a computer main body 41,
The computer main body 41 includes a display device 42, an input device 43 such as a keyboard and a mouse, a removable disk drive (RDD) 44, and a magnetic disk device (MDD) 45.

【0063】そして、コンピュータ本体41には、装置
内の各種制御等を行うCPU(中央演算処理装置)4
6、各種パラメータ等のデータを格納しておくためのR
OM(不揮発性メモリ)47、CPU46がワーク用と
して使用するメモリ48、外部のI/O装置とのインタ
フェース制御を行うインタフェース制御部49、外部と
の通信制御を行う通信制御部50等を備えている。
Then, in the computer main body 41, a CPU (central processing unit) 4 for performing various controls inside the apparatus, etc.
6. R for storing data such as various parameters
An OM (nonvolatile memory) 47, a memory 48 used by the CPU 46 for work, an interface control unit 49 for performing interface control with an external I / O device, a communication control unit 50 for performing communication control with the outside, and the like are provided. There is.

【0064】そして、図1に示した装置が行う前記処理
は、例えば、予め、ハードディスク装置(HDD)45
の磁気ディスクに格納(記録、或いは記憶)しておいた
プログラムを、CPU46の制御により読み出し、該C
PU46が読み出したプログラムを実行することにより
行う。
The processing performed by the apparatus shown in FIG. 1 is performed in advance, for example, on a hard disk drive (HDD) 45.
The program stored (recorded or stored) in the magnetic disk of the above is read under the control of the CPU 46, and the C
This is performed by executing the program read by the PU 46.

【0065】しかし、本発明は、このような例に限ら
ず、例えば、ハードディスク装置45の磁気ディスク
に、次のようにしてプログラムを格納し、このプログラ
ムをCPU46が実行することで前記処理を行うことも
可能である。
However, the present invention is not limited to such an example, and for example, a program is stored in the magnetic disk of the hard disk device 45 as follows, and the CPU 46 executes this program to perform the above processing. It is also possible.

【0066】:他の装置で作成されたリムーバブルデ
ィスク(フロッピィディスク、CD−ROM、その他の
光ディスク等)に格納されているプログラム(他の装置
で作成したプログラムデータ)を、リムーバブルディス
クドライブ44で読み取り、ハードディスク装置45の
記録媒体(磁気ディスク)に格納する。
Read by a removable disk drive 44 a program (program data created by another device) stored in a removable disk created by another device (floppy disk, CD-ROM, other optical disk, etc.). , On the recording medium (magnetic disk) of the hard disk device 45.

【0067】:LAN、インターネット等の通信回線
を介して他の装置から伝送されたプログラム等のデータ
を、通信制御部50を介して受信し、そのデータをハー
ドディスク装置45の記録媒体(磁気ディスク)に格納
する。
Data such as a program transmitted from another device via a communication line such as a LAN or the Internet is received via the communication control unit 50, and the data is recorded on the recording medium (magnetic disk) of the hard disk device 45. To store.

【0068】(付記)前記の説明に対し、次の構成を付
記する。
(Supplementary Note) The following configuration is supplementary to the above description.

【0069】(付記1)アプリケーションプログラムの
特徴を保持したまま、命令数を縮小する縮小プログラム
自動作成装置であって、縮小対象のアプリケーションプ
ログラムに対し、高頻度処理部分の抽出を行う高頻度処
理部分抽出部と、繰り返し回数の制御を行う繰り返し回
数制御部と、データ量の削減制御を行うデータ量削減制
御部を備え、入力と出力と各処理部の出力のファイル形
式を等しくし、各処理部で処理を中断可能とし、途中の
処理部から処理を継続可能にする機能と、前記高頻度処
理部分抽出部で高頻度処理関数を含む最外ループ箇所を
検出し、そのプログラム箇所を抽出する機能と、前記繰
り返し回数制御部でハードウェア内部のカウンタ値から
繰り返し回数による処理の変化を調査し、変化がない場
合は繰り返し回数を一回に削減し、繰り返しの途中で処
理が単純に繰り返し回数を一回に削減不可能な場合で
も、変化の前後の処理を混在させることで繰り返し回数
を一回に削減可能とする機能を備えていることを特徴と
する縮小プログラム自動作成装置。
(Supplementary Note 1) An apparatus for automatically creating a reduced program for reducing the number of instructions while retaining the characteristics of the application program, which is a high-frequency processing portion for extracting a high-frequency processing portion from the application program to be reduced. An extraction unit, a repetition number control unit that controls the number of repetitions, and a data amount reduction control unit that performs data amount reduction control are provided, and the file formats of the input and output and the output of each processing unit are made equal to each other. A function that enables the processing to be interrupted by the processing unit and that the processing can be continued from the processing unit in the middle, and a function that the outermost loop portion including the high-frequency processing function is detected by the high-frequency processing portion extraction unit and the program portion is extracted. Then, the repeat count control unit checks the change in processing depending on the repeat count from the counter value inside the hardware, and if there is no change, repeat count Even if it is not possible to reduce the number of iterations to one once in the middle of the iteration, it is possible to reduce the number of iterations to one by mixing the processing before and after the change. A reduction program automatic creation device characterized in that

【0070】(付記2)前記データ削減制御部は、変数
のアクセスパターンを認識し、縮小可能な変数を選択す
る制御手段を備えていることを特徴とする(付記1)記
載の縮小プログラム自動作成装置。
(Supplementary Note 2) The data reduction control unit includes control means for recognizing an access pattern of a variable and selecting a variable that can be reduced. apparatus.

【0071】(付記3)前記データ量削減制御部は、キ
ャッシュの容量を認識し、データ量の削減サイズを決定
する決定手段を備えていることを特徴とする(付記1)
記載の縮小プログラム自動作成装置。
(Supplementary Note 3) The data amount reduction control unit is provided with a determining means for recognizing the capacity of the cache and determining a reduction amount of the data amount (Supplementary Note 1).
Automatic reduction program creation device described.

【0072】(付記4)前記データ量削減制御部は、キ
ャッシュの容量性ミスを再現するため、アクセス変数の
アドレスを変えて再現する制御手段を備えていることを
特徴とする(付記1)記載の縮小プログラム自動作成装
置。
(Supplementary Note 4) The data amount reduction control unit is provided with control means for reproducing by changing the address of the access variable in order to reproduce the cache capacity miss (Supplementary Note 1). Automatic reduction program creation device.

【0073】(付記5)オリジナルプログラムと縮小プ
ログラムの類似度をキャッシュミス率で判断する機能を
備えていることを特徴とする(付記1)記載の縮小プロ
グラム自動作成装置。
(Supplementary note 5) The reduced program automatic creation apparatus according to (Supplementary note 1), which is provided with a function of determining the similarity between the original program and the reduced program based on the cache miss rate.

【0074】(付記6)コンピュータに、入力と出力と
各処理部の出力のファイル形式を等しくし、各処理部で
処理を中断可能とし、途中の処理部から処理を継続可能
にする機能と、高頻度処理部分抽出部で高頻度処理関数
を含む最外ループ箇所を検出し、そのプログラム箇所を
抽出する機能と、繰り返し回数制御部でハードウェア内
部のカウンタ値から繰り返し回数による処理の変化を調
査し、変化がない場合は繰り返し回数を一回に削減し、
繰り返しの途中で処理が単純に繰り返し回数を一回に削
減不可能な場合でも、変化の前後の処理を混在させるこ
とで繰り返し回数を一回に削減可能とする機能を実現す
るためのプログラムを記録したコンピュータ読み取り可
能な記録媒体。
(Supplementary Note 6) A function of making the input and output and the output of each processing unit have the same file format in the computer so that the processing can be interrupted in each processing unit and the processing can be continued from an intermediate processing unit, The high-frequency processing part extraction unit detects the outermost loop location containing the high-frequency processing function and extracts the program location, and the repeat count control unit investigates the change in processing due to the number of repeats from the internal counter value of the hardware. However, if there is no change, reduce the number of repetitions to one,
Even if it is not possible to reduce the number of repetitions to one in the middle of the repetition, record the program to realize the function that can reduce the number of repetitions to one by mixing the processing before and after the change. Computer readable recording medium.

【0075】(付記7)コンピュータに、入力と出力と
各処理部の出力のファイル形式を等しくし、各処理部で
処理を中断可能とし、途中の処理部から処理を継続可能
にする機能と、高頻度処理部分抽出部で高頻度処理関数
を含む最外ループ箇所を検出し、そのプログラム箇所を
抽出する機能と、繰り返し回数制御部でハードウェア内
部のカウンタ値から繰り返し回数による処理の変化を調
査し、変化がない場合は繰り返し回数を一回に削減し、
繰り返しの途中で処理が単純に繰り返し回数を一回に削
減不可能な場合でも、変化の前後の処理を混在させるこ
とで繰り返し回数を一回に削減可能とする機能を実現す
るためのプログラム。
(Supplementary Note 7) A function of making the input and output and the output of each processing unit have the same file format in the computer so that the processing can be interrupted in each processing unit and the processing can be continued from an intermediate processing unit, The high-frequency processing part extraction unit detects the outermost loop location containing the high-frequency processing function and extracts the program location, and the repeat count control unit investigates the change in processing due to the number of repeats from the internal counter value of the hardware. However, if there is no change, reduce the number of repetitions to one,
A program that realizes a function that can reduce the number of repetitions to one by mixing the processing before and after the change even if the number of repetitions cannot be reduced to one during the repetition.

【0076】[0076]

【発明の効果】以上説明したように、本発明によれば次
のような効果がある。
As described above, the present invention has the following effects.

【0077】(1) :請求項1では、縮小対象のアプリケ
ーションプログラムに対し、高頻度処理部分抽出部が高
頻度処理部分を抽出し、繰り返し回数制御部が繰り返し
回数の制御を行い、データ量削減制御部がデータ量の削
減処理を行うことで、縮小対象アプリケーションプログ
ラムの特徴を保持したまま命令数を縮小する処理を行
う。
(1): In claim 1, the high-frequency processing part extraction unit extracts the high-frequency processing part from the application program to be reduced, and the repetition number control unit controls the repetition number to reduce the data amount. The control unit performs a data amount reduction process, thereby performing a process of reducing the number of instructions while retaining the characteristics of the reduction target application program.

【0078】この場合、入力と出力と各処理部の出力の
ファイル形式を等しくし、各処理部で処理を中断可能と
し、途中の処理部から処理を継続可能にする。また、高
頻度処理部分抽出部は高頻度処理関数を含む最外ループ
箇所を検出し、そのプログラム箇所を抽出する。
In this case, the file formats of the input and output and the output of each processing unit are made equal, the processing can be interrupted in each processing unit, and the processing can be continued from the processing unit in the middle. Further, the high-frequency processing portion extraction unit detects the outermost loop location including the high-frequency processing function and extracts the program location.

【0079】また、繰り返し回数制御部はハードウェア
内部のカウンタ値から繰り返し回数による処理の変化を
調査し、変化がない場合は繰り返し回数を一回に削減
し、繰り返しの途中で処理が単純に繰り返し回数を一回
に削減不可能な場合でも、変化の前後の処理を混在させ
ることで繰り返し回数を一回に削減可能とする。
Further, the repeat count control unit investigates the change in the process depending on the repeat count from the internal counter value of the hardware, reduces the repeat count to one when there is no change, and simply repeats the process in the middle of the repeat. Even if the number of times cannot be reduced to once, the number of repetitions can be reduced to one by mixing the processes before and after the change.

【0080】このようにすれば、3種類の処理部(高頻
度処理部分抽出部、繰り返し回数制御部、及びデータ量
削減制御部)で出力する中間ファイルは、入力する縮小
対象プログラムや実行モジュールとファイル形式が等し
いため、途中で処理を中断し中間ファイルとして保存
し、中間ファイルを入力として各処理部の途中から処理
を継続することができる。すなわち、処理の途中で終了
し、処理の途中から処理を開始することが簡単にできる
ので、オペレータ等が時間を自由に使えるし、作業効率
も極めて良い。
In this way, the intermediate files output by the three types of processing units (the high-frequency processing portion extraction unit, the repeat count control unit, and the data amount reduction control unit) are the same as the input reduction target program and execution module. Since the file formats are the same, the processing can be interrupted halfway and saved as an intermediate file, and the processing can be continued from the middle of each processing unit using the intermediate file as an input. That is, since it is possible to easily end the process in the middle of the process and start the process in the middle of the process, the operator or the like can freely use the time and the work efficiency is extremely good.

【0081】更に、ベンチマークプログラム(縮小対象
のアプリケーションプログラム)の特性を保持したま
ま、ベンチマークプログラムと同レベルの性能評価が可
能となる。そして、縮小プログラム自動生成装置によっ
て作成された縮小プログラムを論理シミュレータで実行
すれば、現実的な時間でベンチマークプログラムの性能
予測や検証ができ、開発プロセッサの設計開発の期間短
縮化や再チューニングに寄与するところが大きい。
Further, it is possible to evaluate the performance at the same level as the benchmark program while maintaining the characteristics of the benchmark program (reduction target application program). By executing the reduced program created by the reduced program automatic generator with a logic simulator, the performance of the benchmark program can be predicted and verified in a realistic time, which contributes to shortening the period of design and development of the development processor and retuning. There is a lot to do.

【0082】(2) :請求項2では、データ削減制御部の
制御処理は、変数のアクセスパターンを認識し、縮小可
能な変数を選択する。
(2): In claim 2, the control process of the data reduction control unit recognizes the access pattern of the variable and selects the variable that can be reduced.

【0083】このようにすれば、ベンチマークプログラ
ムの特性を保持したまま、ベンチマークプログラムと同
レベルの性能評価が可能となる。そして、縮小プログラ
ム自動生成装置によって作成された縮小プログラムを論
理シミュレータで実行すれば、現実的な時間でベンチマ
ークプログラムの性能予測や検証ができ、開発プロセッ
サの設計開発の期間短縮化や再チューニングに寄与する
ところが大きい。
In this way, it is possible to evaluate the performance at the same level as the benchmark program while maintaining the characteristics of the benchmark program. By executing the reduced program created by the reduced program automatic generator with a logic simulator, the performance of the benchmark program can be predicted and verified in a realistic time, which contributes to shortening the period of design and development of the development processor and retuning. There is a lot to do.

【0084】(3) :請求項3では、データ量削減制御部
の決定手段は、キャッシュの容量を認識し、データ量の
削減サイズを決定する。このようにすれば、ベンチマー
クプログラムの特性を保持したまま、ベンチマークプロ
グラムと同レベルの性能評価が可能となる。そして、縮
小プログラム自動生成装置によって作成された縮小プロ
グラムを論理シミュレータで実行すれば、現実的な時間
でベンチマークプログラムの性能予測や検証ができ、開
発プロセッサの設計開発の期間短縮化や再チューニング
に寄与するところが大きい。
(3): In claim 3, the determining means of the data amount reduction control unit recognizes the capacity of the cache and determines the reduction size of the data amount. This makes it possible to perform performance evaluation at the same level as the benchmark program while maintaining the characteristics of the benchmark program. By executing the reduced program created by the reduced program automatic generator with a logic simulator, the performance of the benchmark program can be predicted and verified in a realistic time, which contributes to shortening the period of design and development of the development processor and retuning. There is a lot to do.

【0085】(4) :請求項4では、データ量削減制御部
の制御手段は、キャッシュの容量性ミスを再現するた
め、アクセス変数のアドレスを変えて再現する。
(4): In claim 4, the control means of the data amount reduction control unit reproduces the cache capacity miss by changing the address of the access variable.

【0086】このようにすれば、データ量を削減して
も、キャッシュミス率を同等にすることができる。ま
た、ベンチマークプログラムの特性を保持したまま、ベ
ンチマークプログラムと同レベルの性能評価が可能とな
る。そして、縮小プログラム自動生成装置によって作成
された縮小プログラムを論理シミュレータで実行すれ
ば、現実的な時間でベンチマークプログラムの性能予測
や検証ができ、開発プロセッサの設計開発の期間短縮化
や再チューニングに寄与するところが大きい。
By doing so, the cache miss rate can be made equal even if the data amount is reduced. In addition, it is possible to perform performance evaluation at the same level as the benchmark program while maintaining the characteristics of the benchmark program. By executing the reduced program created by the reduced program automatic generator with a logic simulator, the performance of the benchmark program can be predicted and verified in a realistic time, which contributes to shortening the period of design and development of the development processor and retuning. There is a lot to do.

【0087】(5) :請求項5では、縮小プログラム自動
作成装置がオリジナルプログラムと縮小プログラムの類
似度(特徴の保持性)をキャッシュミス率で判断する。
このようにすれば、ベンチマークプログラムの特性を保
持したまま、ベンチマークプログラムと同レベルの性能
評価が可能となる。そして、縮小プログラム自動生成装
置によって作成された縮小プログラムを論理シミュレー
タで実行すれば、現実的な時間でベンチマークプログラ
ムの性能予測や検証ができ、開発プロセッサの設計開発
の期間短縮化や再チューニングに寄与するところが大き
い。
(5): In claim 5, the reduced program automatic creation apparatus judges the degree of similarity between the original program and the reduced program (feature retention) by the cache miss rate.
This makes it possible to perform performance evaluation at the same level as the benchmark program while maintaining the characteristics of the benchmark program. By executing the reduced program created by the reduced program automatic generator with a logic simulator, the performance of the benchmark program can be predicted and verified in a realistic time, which contributes to shortening the period of design and development of the development processor and retuning. There is a lot to do.

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

【図1】本発明の実施の形態における縮小プログラム自
動作成装置の説明図である。
FIG. 1 is an explanatory diagram of a reduction program automatic creation device according to an embodiment of the present invention.

【図2】本発明の実施の形態における高頻度処理部分抽
出部の説明図である。
FIG. 2 is an explanatory diagram of a high frequency processing part extraction unit according to the embodiment of the present invention.

【図3】本発明の実施の形態における繰り返し回数制御
部の説明図である。
FIG. 3 is an explanatory diagram of a repeat count control unit according to the embodiment of the present invention.

【図4】本発明の実施の形態におけるループ回転数縮小
部における挙動変化の説明図であり、A図は挙動が変化
しないもの(繰り返し回数1回に削減可能)、B図は挙
動が変化するもの(単純に繰り返し回数1回に削減不可
能)、C図は繰り返し回数削減によるプログラム生成部
の説明図(C−1:オリジナルプログラムコード、C−
2:ループ削減プログラムコード)である。
FIG. 4 is an explanatory diagram of behavior change in the loop rotation speed reduction unit according to the embodiment of the present invention, in which FIG. A does not change the behavior (the number of repetitions can be reduced to 1), and FIG. B changes the behavior. (It is simply impossible to reduce the number of iterations to one), and FIG. C is an explanatory diagram of the program generation unit by reducing the number of iterations (C-1: original program code, C
2: Loop reduction program code).

【図5】本発明の実施の形態におけるデータ量削減制御
部の説明図である。
FIG. 5 is an explanatory diagram of a data amount reduction control unit according to the embodiment of the present invention.

【図6】本発明の実施の形態の縮小変数選択部における
変数アクセス解析図及びデータ量削減におけるプログラ
ム生成部の説明図であり、A図は縮小変数選択部におけ
る変数アクセス解析図、B図はデータ量削減におけるプ
ログラム生成部の説明図((a) :オリジナルプログラム
コード、(b) :データ削減プログラムコード)である。
6A and 6B are a variable access analysis diagram in the reduced variable selection unit and an explanatory diagram of the program generation unit in the data amount reduction according to the embodiment of the present invention. FIG. 6A is a variable access analysis diagram in the reduced variable selection unit, and FIG. It is explanatory drawing ((a): original program code, (b): data reduction program code) of the program generation part in data amount reduction.

【図7】本発明の実施の形態におけるデータ量削減にお
けるキャッシュミス率再現方法の説明図であり、(a) は
オリジナルプログラムコード、(b) はキャッシュミスが
発生しないコード、(c) はキャッシュミスが発生するコ
ードを示す。
7A and 7B are explanatory diagrams of a cache miss rate reproduction method in data amount reduction according to the embodiment of the present invention, where FIG. 7A is an original program code, FIG. 7B is a code in which no cache miss occurs, and FIG. Indicates the code that makes the mistake.

【図8】本発明の実施の形態における具体的な装置例を
示す図である。
FIG. 8 is a diagram showing a specific device example in the embodiment of the present invention.

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

1 高頻度処理部分抽出部 2 繰り返し回数制御部 3 データ量削減制御部 11 最外ループ検出部 12、24、33 プログラム生成部 13 実行モジュール生成部 14 プロファイラ 15、27、37 コンパイラ 21 ループ回数による挙動調査部 22 ループ回転数縮小部 23 挙動変化箇所調査部 25 実行モジュール生成部 26 ハードウェアカウンタ 31 縮小変数選択部 32 縮小サイズ決定部 34 実行モジュール生成部 35 キャッシュミス率調査部 36 キャッシュ挙動再生部 38 キャッシュシミュレータ 41 コンピュータ本体 42 ディスプレイ装置 43 入力装置 44 リムーバブルディスクドライブ(RDD) 45 ハードディスク装置(HDD) 46 CPU(中央演算処理装置) 47 ROM(リード・オンリ・メモリ) 48 メモリ 49 インタフェース制御部(I/F制御部) 50 通信制御部 1 High frequency processing part extraction unit 2 Repeat count controller 3 Data amount reduction control unit 11 Outermost loop detector 12, 24, 33 Program generator 13 Execution module generator 14 Profiler 15, 27, 37 compiler 21 Behavior Research Department based on the number of loops 22 Loop speed reduction unit 23 Behavior change point investigation department 25 Execution module generator 26 Hardware Counter 31 Reduced variable selection section 32 Reduced size determination unit 34 Execution module generation unit 35 Cash Miss Rate Research Department 36 Cache Behavior Replay Unit 38 Cash Simulator 41 computer 42 display device 43 Input device 44 Removable Disk Drive (RDD) 45 Hard Disk Drive (HDD) 46 CPU (central processing unit) 47 ROM (Read Only Memory) 48 memory 49 Interface control unit (I / F control unit) 50 Communication control unit

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 アプリケーションプログラムの特徴を保
持したまま、命令数を縮小する縮小プログラム自動作成
装置であって、 縮小対象のアプリケーションプログラムに対し、高頻度
処理部分の抽出を行う高頻度処理部分抽出部と、繰り返
し回数の制御を行う繰り返し回数制御部と、データ量の
削減制御を行うデータ量削減制御部を備え、 入力と出力と各処理部の出力のファイル形式を等しく
し、各処理部で処理を中断可能とし、途中の処理部から
処理を継続可能にする機能と、 前記高頻度処理部分抽出部で高頻度処理関数を含む最外
ループ箇所を検出し、そのプログラム箇所を抽出する機
能と、 前記繰り返し回数制御部でハードウェア内部のカウンタ
値から繰り返し回数による処理の変化を調査し、変化が
ない場合は繰り返し回数を一回に削減し、繰り返しの途
中で処理が単純に繰り返し回数を一回に削減不可能な場
合でも、変化の前後の処理を混在させることで繰り返し
回数を一回に削減可能とする機能を備えていることを特
徴とする縮小プログラム自動作成装置。
1. A reduced program automatic creation apparatus for reducing the number of instructions while retaining the characteristics of an application program, wherein a high frequency processed portion extraction unit extracts a high frequency processed portion from an application program to be reduced. It also has a repeat count control unit that controls the number of repeats and a data amount reduction control unit that controls the amount of data, and makes the file formats of input and output equal to the output of each processing unit, and processes each processing unit. And a function that allows processing to be continued from an intermediate processing unit, a function that detects the outermost loop location including the high-frequency processing function in the high-frequency processing portion extraction unit, and extracts the program location, The repeat count control unit investigates the change in processing depending on the repeat count from the counter value inside the hardware, and if there is no change, the repeat count is once. Even if it is not possible to reduce the number of iterations to one in the middle of the iterations by reducing the number of iterations, it is possible to reduce the number of iterations to one by mixing the processing before and after the change. Automatic reduction program creation device characterized by.
【請求項2】 前記データ削減制御部は、変数のアクセ
スパターンを認識し、縮小可能な変数を選択する制御手
段を備えていることを特徴とする請求項1記載の縮小プ
ログラム自動作成装置。
2. The reduction program automatic creation apparatus according to claim 1, wherein the data reduction control unit includes control means for recognizing an access pattern of a variable and selecting a variable that can be reduced.
【請求項3】 前記データ量削減制御部は、キャッシュ
の容量を認識し、データ量の削減サイズを決定する決定
手段を備えていることを特徴とする請求項1記載の縮小
プログラム自動作成装置。
3. The reduction program automatic creation apparatus according to claim 1, wherein the data amount reduction control unit includes a determination unit that recognizes a cache capacity and determines a reduction amount of the data amount.
【請求項4】 前記データ量削減制御部は、キャッシュ
の容量性ミスを再現するため、アクセス変数のアドレス
を変えて再現する制御手段を備えていることを特徴とす
る請求項1記載の縮小プログラム自動作成装置。
4. The reduction program according to claim 1, wherein the data amount reduction control unit includes a control unit that reproduces a cache capacity miss by changing an address of an access variable. Automatic creation device.
【請求項5】 オリジナルプログラムと縮小プログラム
の類似度をキャッシュミス率で判断する機能を備えてい
ることを特徴とする請求項1記載の縮小プログラム自動
作成装置。
5. The reduced program automatic creation apparatus according to claim 1, further comprising a function of determining a similarity between the original program and the reduced program based on a cache miss rate.
JP2002123318A 2002-04-25 2002-04-25 Device for automatically preparing reduction program Pending JP2003316612A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002123318A JP2003316612A (en) 2002-04-25 2002-04-25 Device for automatically preparing reduction program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002123318A JP2003316612A (en) 2002-04-25 2002-04-25 Device for automatically preparing reduction program

Publications (1)

Publication Number Publication Date
JP2003316612A true JP2003316612A (en) 2003-11-07

Family

ID=29538644

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002123318A Pending JP2003316612A (en) 2002-04-25 2002-04-25 Device for automatically preparing reduction program

Country Status (1)

Country Link
JP (1) JP2003316612A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2921962A1 (en) 2014-03-19 2015-09-23 Fujitsu Limited Operation processing apparatus and operation processing method
WO2018158846A1 (en) * 2017-02-28 2018-09-07 三菱電機株式会社 Simulation device, simulation method, and simulation program
DE112018006331B4 (en) 2018-01-17 2022-05-05 Mitsubishi Electric Corporation Test case generation device, test case generation method and test case generation program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2921962A1 (en) 2014-03-19 2015-09-23 Fujitsu Limited Operation processing apparatus and operation processing method
WO2018158846A1 (en) * 2017-02-28 2018-09-07 三菱電機株式会社 Simulation device, simulation method, and simulation program
DE112018006331B4 (en) 2018-01-17 2022-05-05 Mitsubishi Electric Corporation Test case generation device, test case generation method and test case generation program
US11347628B2 (en) 2018-01-17 2022-05-31 Mitsubishi Electric Corporation Test case generation apparatus, test case generation method, and computer readable medium

Similar Documents

Publication Publication Date Title
US6421815B1 (en) Method and apparatus for optimized partitioning of finite state machines synthesized from hierarchical high-level descriptions
US6308323B1 (en) Apparatus and method for compiling a plurality of instruction sets for a processor and a media for recording the compiling method
CN109739755B (en) Fuzzy test system based on program tracking and mixed execution
US7958470B1 (en) Method and system for false path analysis
US8046738B2 (en) Efficiently developing encoded instructions by tracking multiple unverified instances of repetitive code segments
US7421671B2 (en) Graph pruning scheme for sensitivity analysis with partitions
US20100138820A1 (en) Framework for Control Flow-Aware Processes
US20030120603A1 (en) Access right contradiction detection apparatus and analysis rule creation apparatus
JP5779077B2 (en) Apparatus and method for supporting program generation
JP2005302028A (en) Method and system for probe optimization for instrumenting program
CN111831564A (en) Regression testing method and device and computing equipment
JPH02217926A (en) Compiler
JP3924256B2 (en) COMPILER DEVICE, COMPILER PROGRAM, RECORDING MEDIUM, COMPILING METHOD, RUNTIME INFORMATION GENERATION DEVICE, AND RUNTIME INFORMATION GENERATION PROGRAM
US6360360B1 (en) Object-oriented compiler mechanism for automatically selecting among multiple implementations of objects
JP3992102B2 (en) Compiler device, compilation method, compiler program, and recording medium
CN111639470B (en) Simulation test method and system for processor cooperative chip and related components
US7926053B1 (en) Methods and apparatus for optimizing installation location of software
JP2003316612A (en) Device for automatically preparing reduction program
US20030145307A1 (en) Software development tool with embedded cache analysis
US20160357655A1 (en) Performance information generating method, information processing apparatus and computer-readable storage medium storing performance information generation program
US8032876B2 (en) Method and apparatus for restructuring a software program hierarchy
Halambi et al. Automatic software toolkit generation for embedded systems-on-chip
JP2004287844A (en) Compiler device, compiler program, recording medium and compilation method
US20110154304A1 (en) Determining compiler efficiency
Tsuji et al. Scalable communication performance prediction using auto-generated pseudo mpi event trace

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041224

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070821

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070904

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071029

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071127

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080122

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20080122

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20080122

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20080122

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080408