JP2003044289A - Compilation method, compiler, recording medium storing the compiler, storage device storing object code prepared by compilation method and processor provided with the storage device - Google Patents

Compilation method, compiler, recording medium storing the compiler, storage device storing object code prepared by compilation method and processor provided with the storage device

Info

Publication number
JP2003044289A
JP2003044289A JP2001226244A JP2001226244A JP2003044289A JP 2003044289 A JP2003044289 A JP 2003044289A JP 2001226244 A JP2001226244 A JP 2001226244A JP 2001226244 A JP2001226244 A JP 2001226244A JP 2003044289 A JP2003044289 A JP 2003044289A
Authority
JP
Japan
Prior art keywords
heat generation
generation amount
instruction
object code
compiler
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.)
Granted
Application number
JP2001226244A
Other languages
Japanese (ja)
Other versions
JP4131909B2 (en
Inventor
Takashi Fujiwara
原 崇 藤
Itaru Yamazaki
崎 到 山
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2001226244A priority Critical patent/JP4131909B2/en
Publication of JP2003044289A publication Critical patent/JP2003044289A/en
Application granted granted Critical
Publication of JP4131909B2 publication Critical patent/JP4131909B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a compilation method and a compiler for converting a user program so as to control the heat generation of a target system to a stipulated value or less. SOLUTION: A normal assembler string is prepared for a user program SC by using various kinds of parameters and a provisional object code OC2 is outputted to the SC. By temporarily executing the provisional object code OC2 while referring to the table of the heat generation vs. an order or the like, a profile PF is prepared and outputted. Then, whether or not the prepared assembler string satisfies the temperature condition of hardware is determined on the basis of the profile PF, and if not satisfying the temperature condition, an optimization object part is found inside the provisional object code OC2 on the basis of the profile PF and an optimization processing for which the heat generation is taken into consideration is performed.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、コンパイル方法、
コンパイラ、このコンパイラを格納した記録媒体、コン
パイル方法により作成されたオブジェクトコードを格納
した記憶装置およびこの記憶装置を備えるプロセッサに
関し、特にプロセッサの発熱量が規定値を超えないよう
にユーザプログラムをオブジェクトコードに変換するコ
ンパイラの機能を対象とする。
The present invention relates to a compiling method,
The present invention relates to a compiler, a recording medium that stores the compiler, a storage device that stores an object code created by a compiling method, and a processor that includes the storage device. Targets the function of the compiler that converts to.

【0002】[0002]

【従来の技術】マイクロプロセッサ等の半導体機器は、
近年の高周波数化に伴い、素子から発生する熱の量が増
大する傾向にある。素子の温度が上昇すると、半導体機
器に対して一時的な動作不良や半永久的な故障を引き起
こす場合がある。このような問題を回避するため、従来
は、一般的に以下のような対策が講じられてきた。
2. Description of the Related Art Semiconductor devices such as microprocessors are
With the recent increase in frequency, the amount of heat generated from the element tends to increase. When the temperature of the element rises, the semiconductor device may cause a temporary malfunction or semi-permanent failure. In order to avoid such a problem, conventionally, the following measures have generally been taken.

【0003】(1)半導体機器に十分な法熱処理を施し
たり放熱装置を設けることにより、素子からの発熱量が
最大になったときにも、素子の温度が規定温度を超えな
いようにする。 (2)機器の放熱量が一定であるという制約の下で、素
子の動作周波数を下げる。 (3)素子の温度上昇を監視し、規定温度以上にまで上
昇した場合に機器の動作周波数をダイナミックに低減す
る。
(1) The temperature of an element is prevented from exceeding a specified temperature even when the amount of heat generated from the element is maximized by subjecting a semiconductor device to sufficient heat treatment and providing a heat dissipation device. (2) The operating frequency of the device is lowered under the constraint that the heat radiation amount of the device is constant. (3) The temperature rise of the element is monitored, and the operating frequency of the equipment is dynamically reduced when the temperature rises above the specified temperature.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、上述し
た対策にはそれぞれ以下のような問題があった。即ち、
対策(1)では、一般的にコストの上昇を伴うため、一
般消費者向きの機器、特に家庭用ゲーム機に採用するこ
とは困難である。
However, the above-mentioned countermeasures have the following problems, respectively. That is,
Since the measure (1) generally involves an increase in cost, it is difficult to adopt it in a device for general consumers, especially in a home game machine.

【0005】また、(2)、(3)の対策については、
これを実現するハードウェアは従来から存在するもの
の、放熱量に応じた動作周波数をOSで管理しようとす
ると、その自由度が低下する一方、明示的に温度を制御
するプログラムをユーザが作成することは過大な負担を
強いることになるという問題点があった。
Regarding measures (2) and (3),
Although hardware that realizes this has existed in the past, when the operating frequency according to the amount of heat radiation is managed by the OS, the degree of freedom decreases, while the user must create a program that explicitly controls the temperature. Had the problem that it would impose an excessive burden.

【0006】本発明は上記事情に鑑みてなされたもので
あり、その目的は、素子または機器の発熱量が規定値以
下となるようにユーザプログラムをオブジェクトコード
に変換するコンパイル方法、コンパイラ、このコンパイ
ラを格納した記録媒体、コンパイル方法により作成され
たオブジェクトコードを格納した記憶装置およびこの記
憶装置を備えるプロセッサを提供することにある。
The present invention has been made in view of the above circumstances, and an object thereof is to compile a user program into an object code so that the amount of heat generated by an element or a device becomes a specified value or less, a compiler, and this compiler. Another object of the present invention is to provide a recording medium in which is stored, a storage device in which an object code created by a compiling method is stored, and a processor including the storage device.

【0007】[0007]

【課題を解決するための手段】本発明は、プロセッサお
よびこれを含むシステムの発熱をソフトウェアにより静
的に制御することにより上記課題の解決を図る。
SUMMARY OF THE INVENTION The present invention solves the above problems by statically controlling heat generation of a processor and a system including the processor by software.

【0008】即ち、本発明によれば、ユーザプログラム
を受けてターゲットとなるハードウェアが解釈可能なオ
ブジェクトコードを暫定的に生成する手順と、上記暫定
的なオブジェクトコードを上記ハードウェアが実行した
場合に上記ハードウェアから生じる発熱量を算出する手
順と、算出された上記発熱量が上記ハードウェアの温度
条件を満たすかどうかを判定する手順と、上記発熱量が
上記温度条件を満たさない場合に、上記暫定的なオブジ
ェクトコード内で相対的に大きな発熱量をもたらす最適
化対象部分を発見する手順と、上記最適化対象部分に対
して上記発熱量を抑制するための最適化処理を行う手順
と、を備えるコンパイル方法が提供される。
That is, according to the present invention, a procedure for receiving a user program to tentatively generate an object code that can be interpreted by the target hardware, and a case where the hardware executes the tentative object code In the procedure of calculating the heat generation amount generated from the hardware, a step of determining whether the calculated heat generation amount satisfies the temperature condition of the hardware, and if the heat generation amount does not satisfy the temperature condition, A procedure of finding an optimization target portion that produces a relatively large heat generation amount in the provisional object code, and a procedure of performing an optimization process for suppressing the heat generation amount with respect to the optimization target portion; A compiling method comprising is provided.

【0009】上記コンパイル方法によれば、上記最適化
対象部分に対して上記発熱量を抑制するための最適化処
理を行う手順を備えるので、上記ハードウェアからの発
熱を自動的に制御するコンパイル方法が提供される。
According to the compiling method, a procedure for performing optimization processing for suppressing the heat generation amount on the optimization target portion is provided, so the compilation method for automatically controlling the heat generation from the hardware. Will be provided.

【0010】また、本発明によれば、上述した本発明に
かかるコンパイル方法をコンピュータに実行させるコン
パイラが提供される。
Further, according to the present invention, there is provided a compiler for causing a computer to execute the above-described compiling method according to the present invention.

【0011】また、本発明によれば、上記コンパイラを
格納した記録媒体が提供される。
According to the present invention, there is also provided a recording medium storing the above compiler.

【0012】また、本発明によれば、コンパイル方法に
より生成され上記最適化処理が行なわれたオブジェクト
コードを記憶する記憶装置が提供される。
Further, according to the present invention, there is provided a storage device for storing the object code generated by the compiling method and subjected to the optimization processing.

【0013】さらに、本発明によれば、上記記憶装置を
備えるプロセッサが提供される。
Further, according to the present invention, there is provided a processor including the above storage device.

【0014】[0014]

【発明の実施の形態】以下、本発明の実施の形態のいく
つかについて図面を参照しながら説明する。まず、本発
明にかかるコンパイル方法の適用対象となる半導体機器
の発熱態様の一例について図面を参照しながら説明す
る。
DETAILED DESCRIPTION OF THE INVENTION Some embodiments of the present invention will be described below with reference to the drawings. First, an example of a heat generation mode of a semiconductor device to which the compiling method according to the present invention is applied will be described with reference to the drawings.

【0015】図1は、あるゲーム機器に用いられる一半
導体チップの単位サイクルごとの発熱量を示すグラフで
ある。この半導体チップについては、同図に示すよう
に、各タイムインターバルで許容される総発熱量H1と
限界ピーク発熱量H2が設定されている。この半導体チ
ップの場合、タイムインターバルTI0においては総発
熱量が許容量H1を超過しており、また、タイムインタ
ーバルTI1内のある時間帯では発熱量が限界ピーク発
熱量H2を超過している。このような状態を放置すれ
ば、ゲーム機に一時的な動作不良が発生するおそれがあ
り、ひいては機器の故障の要因となる可能性があるた
め、チップの発熱を抑制する必要がある。本発明の一特
徴は、ユーザプログラム内の命令または命令列(以下、
命令等という)のそれぞれについて処理時間の裕度を判
断し、その処理が時間的に余裕があり、かつ温度を抑制
したい場合、例えば発熱を抑制する機能を起動する命令
を追加し、また、例えば発熱量が少ないサブルーチンを
選択する点にある。これにより、処理がクリティカルな
部分では最高のパフォーマンスを得ると同時に、仕様に
適合した範囲内となるように機器の温度を制御するもの
である。
FIG. 1 is a graph showing the heat generation amount per unit cycle of one semiconductor chip used in a certain game machine. For this semiconductor chip, the total heat generation amount H1 and the limit peak heat generation amount H2 allowed at each time interval are set as shown in FIG. In the case of this semiconductor chip, the total heat generation amount exceeds the allowable amount H1 in the time interval TI0, and the heat generation amount exceeds the limit peak heat generation amount H2 in a certain time zone within the time interval TI1. If such a state is left as it is, there is a possibility that a temporary malfunction of the game machine may occur, which may cause a failure of the game machine, so it is necessary to suppress the heat generation of the chip. One feature of the present invention is that an instruction or an instruction sequence (hereinafter,
(For example, an instruction), the margin of the processing time is determined, and when the processing has a leeway in time and the temperature is to be suppressed, for example, an instruction to activate the function of suppressing heat generation is added, and, for example, The point is to select a subroutine that generates less heat. As a result, the best performance is obtained in the critical part of the process, and at the same time, the temperature of the equipment is controlled so that it is within the range that meets the specifications.

【0016】(1)コンパイラの実施形態 まず、本発明にかかるコンパイラの実施の一形態につい
て図2を参照しながら説明する。図2は、本発明にかか
るコンパイラの一実施形態の概略機能を説明する模式図
である。本実施形態のコンパイラ2は、補助記憶装置を
備える図示しないコンピュータにより実行される。この
コンピュータには、ライブラリL2〜L8が接続され
る。ライブラリL2は、コンパイル時に必要な各種のパ
ラメータが格納されている。これらのパラメータは、タ
ーゲットとするシステムの限界温度やプログラム実行時
の期待温度を含む。ライブラリL4は、命令等を実行し
た場合にチップ内のプロセッサに発生する発熱量をCA
Dツールやシミュレーションにより予め設計時に算出し
て得られた、発熱量対命令等のテーブルが格納される。
ライブラリL6には、低電力のサブルーチンが格納さ
れ、また、ライブラリL8には、高速動作用のサブルー
チンが格納される。高速動作用サブルーチンとしては、
例えば画像処理において高品質の画像を提供するが発熱
量が大きくなってしまう関数が挙げられる。低電力のサ
ブルーチンとしては、例えば画像処理において画像の質
は少々劣るが発熱量を抑えられる関数が挙げられる。ま
た、プロセッサ自体がハードウェア上の機能を備える場
合は、低電力用サブルーチンに、プロセッサの周波数や
電源電圧を下げるような特殊命令や処理パイプの本数を
少なくするような特殊命令を予め用意しても良い。これ
らのサブルーチンの取り扱いについては後に詳述する。
(1) Embodiment of Compiler First, an embodiment of a compiler according to the present invention will be described with reference to FIG. FIG. 2 is a schematic diagram for explaining the general function of one embodiment of the compiler according to the present invention. The compiler 2 of this embodiment is executed by a computer (not shown) including an auxiliary storage device. The libraries L2 to L8 are connected to this computer. The library L2 stores various parameters necessary for compilation. These parameters include the target system's critical temperature and the expected temperature during program execution. The library L4 calculates the amount of heat generated by the processor in the chip when the instruction or the like is executed.
A table of heat generation amount vs. instruction, etc., which is calculated and obtained in advance by the D tool or simulation at the time of design is stored.
The library L6 stores a low-power subroutine, and the library L8 stores a subroutine for high-speed operation. As a subroutine for high speed operation,
For example, there is a function that provides a high-quality image in image processing but generates a large amount of heat. As a low-power subroutine, for example, there is a function capable of suppressing the heat generation amount although the image quality is slightly inferior in image processing. In addition, if the processor itself has a hardware function, prepare a special instruction for lowering the frequency and power supply voltage of the processor or a special instruction for reducing the number of processing pipes in advance in the low power subroutine. Is also good. The handling of these subroutines will be described in detail later.

【0017】コンパイラ2は、各種パラメータをライブ
ラリL2から取り込み、ソースコードとしてのユーザプ
ログラムSCに対して通常のアセンブラ列を作成し、暫
定オブジェクトコードOC2として出力する。次に、コ
ンパイラ2は、この暫定オブジェクトコードOC2を仮
実行し、ライブラリL4の発熱量対命令等のテーブルを
参照しながら、各命令に対応して発熱量を記述したプロ
ファイルPFを作成する。このプロファイルPFに基づ
いてコンパイラ2は、暫定オブジェクトコードOC2内
で、限界ピーク発熱量を超えて発熱する部分と、各イン
ターバルで総発熱量を超えて発熱するコード部分(以
下、最適化対象部分という)を発見する。プログラム内
で処理速度よりも発熱量を重視することをユーザが予め
明示的に指定している場合は、コンパイラ2は、最適化
対象部分に対する最適化処理をユーザに促す。ユーザに
よる明示的な指定がない場合は、コンパイラ2は、ライ
ブラリL6およびL8から各種のサブルーチンを取り出
し、これらのサブルーチンを利用しながら最適化対象部
分について発熱量を考慮した温度最適化処理を実行す
る。コンパイラ2は、以上の処理を暫定オブジェクトコ
ードがターゲットとする素子等の温度条件を満たすまで
繰り返し、温度条件を満たす暫定オブジェクトコードを
最終的なオブジェクトコードOC4として出力する。図
2に示すコンパイラ2のより具体的な機能について本発
明にかかるコンパイル方法の実施の形態のいくつかとし
て以下に説明する。
The compiler 2 takes in various parameters from the library L2, creates a normal assembler string for the user program SC as a source code, and outputs it as a temporary object code OC2. Next, the compiler 2 tentatively executes the provisional object code OC2 and creates a profile PF in which the heat generation amount is described corresponding to each instruction while referring to the table of the heat generation amount vs. instruction of the library L4. Based on this profile PF, the compiler 2 causes the temporary object code OC2 to generate heat in excess of the limit peak heat generation amount, and a code part in which heat exceeds the total heat generation amount in each interval (hereinafter referred to as an optimization target portion). ) To discover. When the user explicitly specifies in advance that the amount of heat generation is more important than the processing speed in the program, the compiler 2 prompts the user to perform optimization processing on the optimization target portion. If there is no explicit designation by the user, the compiler 2 fetches various subroutines from the libraries L6 and L8, and executes temperature optimization processing considering the heat generation amount for the optimization target portion while utilizing these subroutines. . The compiler 2 repeats the above processing until the provisional object code satisfies the temperature condition of the target element or the like, and outputs the provisional object code satisfying the temperature condition as the final object code OC4. More specific functions of the compiler 2 shown in FIG. 2 will be described below as some of the embodiments of the compiling method according to the present invention.

【0018】(2)コンパイル方法の第1の実施形態 まず、本発明にかかるコンパイル方法の第1の実施の形
態について図3〜図6を参照しながら説明する。図3
は、本実施形態のコンパイル方法の概略手順を示すフロ
ーチャートである。まず、コンパイラ2は、ライブラリ
L2およびL4から各種パラメータを取り込む(ステッ
プS1)。つぎに、コンパイラ2は、ユーザプログラム
SCに対して通常のアセンブラ列を作成して暫定オブジ
ェクトコードOC2として出力する(ステップS2)。
次に、コンパイラ2は、上述した発熱量対命令等のテー
ブルを参照しながら、暫定オブジェクトコードOC2を
仮実行することにより、プロファイルPFを作成して出
力する(ステップS3)。このプロファイルPFには、
仮実行時に各サブルーチンに関連づけられた予測ピーク
発熱量のデータや総発熱量のデータが記述されている。
続いて、コンパイラ2は、このプロファイルPFに基づ
いて、作成したアセンブラ列が温度条件を満たすか否か
を判定する(ステップS4)。温度条件を満たす場合
は、オブジェクトコードの最適化処理を行う必要がない
ので、作成したアセンブラ列による処理が所定時間内に
終了することを確認して(ステップS11)、このアセ
ンブラ列を最終的なオブジェクトコードOC4として出
力し、コンパイル動作を終了する。
(2) First Embodiment of Compiling Method First, a first embodiment of the compiling method according to the present invention will be described with reference to FIGS. Figure 3
3 is a flowchart showing a schematic procedure of a compiling method of the present embodiment. First, the compiler 2 fetches various parameters from the libraries L2 and L4 (step S1). Next, the compiler 2 creates a normal assembler string for the user program SC and outputs it as the provisional object code OC2 (step S2).
Next, the compiler 2 creates and outputs the profile PF by tentatively executing the provisional object code OC2 while referring to the above-described table of heat generation amount vs. instruction (step S3). This profile PF contains
The data of the predicted peak calorific value and the data of the total calorific value associated with each subroutine at the time of temporary execution are described.
Then, the compiler 2 determines whether the created assembler string satisfies the temperature condition based on the profile PF (step S4). If the temperature condition is satisfied, it is not necessary to optimize the object code, so it is confirmed that the processing by the created assembler string is completed within a predetermined time (step S11), and this assembler string is finally processed. The object code OC4 is output and the compiling operation is completed.

【0019】作成したアセンブラ列が温度条件を満たさ
ない場合、コンパイラ2は、プロファイルPFに基づい
て、暫定オブジェクトコードOC2内で最適化対象部分
を発見する(ステップS5)。前述したとおり、ユーザ
が最適化対象部分を予め明示的に指定している場合は
(ステップS6)、コンパイラ2がその最適化対象部分
を指示し(ステップS7)、ユーザに最適化処理を促す
(ステップS8)。ユーザにより指定された最適化対象
部分の一具体例を図4に示す。同図に示すプログラム
中、“begin low_power”と“end low_power”は、コ
ンパイラディレクティブ(指示子)であり、これらに囲
まれたプログラム部分“bar();”は、処理速度よりも温
度を優先して最適化することを示す。最適化対象部分が
ユーザにより予め指定されていない場合にコンパイラ2
が該当部分を発見する手法の一例を図5に示す。同図
(a)は、ユーザプログラム中のmain関数の一例を示
し、同図(b)は、プロファイルPF中で(a)に示す
main関数中の各関数ごとに関連づけられた各インターバ
ルでの総発熱量の最高値を示す。図5(b)に示すよう
に、bar関数の総発熱量の最高値は100、barbar関数
の総発熱量の最高値は10、barbarbar関数の総発熱量
の最高値は20と記述されている。ここで、例えば総発
熱量100がプロセッサの許容総発熱量H1(図1参
照)を越えている場合は、bar関数について処理速度よ
りも温度、即ち、発熱量の低さを優先するように命令を
最適化することになる。
When the created assembler string does not satisfy the temperature condition, the compiler 2 finds the optimization target part in the temporary object code OC2 based on the profile PF (step S5). As described above, when the user explicitly specifies the optimization target part in advance (step S6), the compiler 2 instructs the optimization target part (step S7) and prompts the user to perform optimization processing ( Step S8). FIG. 4 shows a specific example of the optimization target portion designated by the user. In the program shown in the figure, "begin low_power" and "end low_power" are compiler directives (directives), and the program part "bar ();" enclosed between them gives priority to temperature over processing speed. It shows that it optimizes. Compiler 2 if the optimization target part is not specified by the user in advance
FIG. 5 shows an example of a method for finding the relevant portion. 9A shows an example of the main function in the user program, and FIG. 8B shows it in the profile PF as shown in FIG.
Shows the maximum value of total calorific value in each interval associated with each function in the main function. As shown in FIG. 5B, the maximum total calorific value of the bar function is 100, the maximum total calorific value of the barbar function is 10, and the maximum total calorific value of the barbarbar function is 20. . Here, for example, when the total heat generation amount 100 exceeds the allowable total heat generation amount H1 (see FIG. 1) of the processor, the bar function is instructed to give priority to the temperature, that is, the low heat generation amount over the processing speed. Will be optimized.

【0020】図3を再び参照し、最適化対象部分がユー
ザにより予め明示的に指定されていない場合は(ステッ
プS6)、コンパイラ2は、最適化対象部分についてそ
の部分による温度上昇を考慮した最適化処理を実行す
る。即ち、コンパイラ2は、ステップS5で発見した最
適化対象部分に対して、プロファイルPFに記述された
サブルーチンごとの予測ピーク発熱量および総発熱量の
データを参照し、ライブラリL6(図2参照)に格納さ
れた複数の低電力サブルーチンから最適のサブルーチン
を選択する(ステップS9)。続いて、コンパイラ2
は、各サブルーチンを、選択した低電力サブルーチンに
置換することにより命令列を組み替える(ステップS1
0)。図6は、最適のサブルーチンを選択するための一
具体例を説明する模式図である。本例は、プロセッサが
sqrt(√)のような複雑な演算を処理する演算器を含む場
合の例である。低電力用のライブラリL6(図2参照)
には、演算精度を気にしない場合に用いられる単精度バ
ージョンのサブルーチンが格納され、この一方、ライブ
ラリL8(図2参照)には、演算精度を優先する場合の
倍精度バージョンのサブルーチンが格納されている。コ
ンパイラ2は、同図に示すように、状況に応じて最適の
ライブラリやサブルーチンを割り当てる。このようなマ
ッピング処理は、グラフィックプロセッサの場合で、発
熱量が許容値からみて厳しいが画像が少々粗くなっても
良いような演算の場合に、特に有利である。
Referring again to FIG. 3, when the optimization target part is not explicitly designated in advance by the user (step S6), the compiler 2 optimizes the optimization target part in consideration of the temperature rise by the part. Execute the conversion process. That is, the compiler 2 refers to the data of the predicted peak heat generation amount and the total heat generation amount for each subroutine described in the profile PF for the optimization target portion found in step S5, and stores the data in the library L6 (see FIG. 2). The optimum subroutine is selected from the stored plurality of low power subroutines (step S9). Next, compiler 2
Replaces each subroutine with the selected low-power subroutine to rearrange the instruction sequence (step S1).
0). FIG. 6 is a schematic diagram for explaining a specific example for selecting the optimum subroutine. In this example, the processor
This is an example of the case where an arithmetic unit for processing a complicated arithmetic operation such as sqrt (√) is included. Low power library L6 (see Figure 2)
In the library L8 (see FIG. 2), a single precision version of the subroutine used when the calculation precision is not taken into consideration is stored. On the other hand, in the library L8, the double precision version of the subroutine when the calculation precision is prioritized is stored. ing. As shown in the figure, the compiler 2 allocates the optimum library or subroutine according to the situation. Such a mapping process is particularly advantageous in the case of a graphic processor, in the case of an operation in which the heat generation amount is severe from the allowable value, but the image may be slightly rough.

【0021】図3に戻り、コンパイラ2は、組み替えた
命令列に対して再度仮実行を行い、温度条件が満たされ
るまで上述した手順を繰り返す(ステップS3〜S1
0)。これらの手順により、温度条件が満たされるよう
になると(ステップS4)、コンパイラ2は、最後に組
み替えた命令列による処理が所定時間内に終了すること
を確認する(ステップS11)。所定時間内に終了する
場合は、処理速度と発熱の双方がプロセッサの仕様に合
致するので、最後の命令列を最終のオブジェクトコード
OC4として出力し、コンパイル動作を終了する。所定
時間内に終了しない場合は、処理速度と発熱の双方がプ
ロセッサの仕様を満足していないので、コンパイラ2
は、最適化対象部分を指示してエラーを出力し(ステッ
プS12)、動作を終了する。このように、処理速度お
よび発熱量の双方でプロセッサの仕様を満足するオブジ
ェクトコードが得られない場合であっても、問題となる
最適化対象部分がユーザに示されるので、ユーザは、改
めて問題部分を探索する必要なく、ユーザプログラムの
見直しに着手することができる。なお、本実施形態で
は、サブルーチンによる最適化処理を実行する形態につ
いて説明したが、これに限ることなく、例えばサブルー
チンよりも細かい粒度を用いて最適化しても良い。この
点は、以下に述べる第2〜第4の実施形態についても同
様である。
Returning to FIG. 3, the compiler 2 executes the temporary execution again on the rearranged instruction sequence, and repeats the above procedure until the temperature condition is satisfied (steps S3 to S1).
0). When the temperature condition is satisfied by these procedures (step S4), the compiler 2 confirms that the process by the last rearranged instruction sequence is completed within a predetermined time (step S11). If the processing is completed within a predetermined time, both the processing speed and the heat generation match the specifications of the processor, so the final instruction string is output as the final object code OC4, and the compilation operation is terminated. If the processing is not completed within the predetermined time, both the processing speed and heat generation do not satisfy the processor specifications.
Indicates an optimization target portion, outputs an error (step S12), and ends the operation. In this way, even if the object code that satisfies the specifications of the processor in both the processing speed and the heat generation amount cannot be obtained, the problematic optimization target part is shown to the user. It is possible to start reviewing the user program without having to search for. In the present embodiment, the mode in which the optimization process is executed by the subroutine has been described, but the present invention is not limited to this, and optimization may be performed using a finer grain size than that of the subroutine, for example. This point is the same for the second to fourth embodiments described below.

【0022】(3)コンパイル方法の第2の実施形態 次に、本発明にかかるコンパイル方法の第2の実施の形
態について図7および図8を参照しながら説明する。本
実施形態は、オブジェクトコードを実行するプロセッサ
またはこれを含むシステムに、周波数や電源電圧を低減
させる機能が備えられている場合に好適な形態である。
図7は、本実施形態のコンパイル方法の概略手順を説明
するフローチャートである。図3との対比において明ら
かなように、本実施形態の特徴は、プログラムの最適化
処理手順を表わすステップS26にある。従って、以下
ではステップS26を中心に説明する。
(3) Second Embodiment of Compilation Method Next, a second embodiment of the compilation method according to the present invention will be described with reference to FIGS. 7 and 8. The present embodiment is a suitable mode when the processor that executes the object code or the system including the processor has a function of reducing the frequency and the power supply voltage.
FIG. 7 is a flowchart for explaining the general procedure of the compiling method of this embodiment. As is clear from the comparison with FIG. 3, the feature of this embodiment lies in step S26 representing the procedure for optimizing the program. Therefore, in the following, the description will focus on step S26.

【0023】即ち、第1の実施形態と同様に、各種パラ
メータを取り込み(ステップS11)、ユーザプログラ
ムSCに対して通常のアセンブラ列を作成して暫定オブ
ジェクトコードOC2を出力する(ステップS22)。
次に、コンパイラ2は、発熱量対命令等のテーブルを参
照しながら、暫定オブジェクトコードOC2を仮実行す
ることにより、プロファイルPFを作成して出力する
(ステップS23)。続いて、コンパイラ2は、このプ
ロファイルPFに基づいて、作成したアセンブラ列が温
度条件を満たすか否かを判定する(ステップS24)。
作成したアセンブラ列が温度条件を満たさない場合、コ
ンパイラ2は、出力したプロファイルPFに基づいて暫
定オブジェクトコードOC2内で最適化対象部分を発見
する(ステップS25)。
That is, similar to the first embodiment, various parameters are fetched (step S11), a normal assembler string is created for the user program SC, and the provisional object code OC2 is output (step S22).
Next, the compiler 2 creates and outputs the profile PF by tentatively executing the provisional object code OC2 while referring to the table of heat generation amount vs. instruction and the like (step S23). Subsequently, the compiler 2 determines whether the created assembler string satisfies the temperature condition based on this profile PF (step S24).
When the created assembler string does not satisfy the temperature condition, the compiler 2 finds the optimization target part in the temporary object code OC2 based on the output profile PF (step S25).

【0024】本実施形態においては、発熱量を抑える命
令等をコンパイラ2が自動的に挿入する(ステップS2
6)。図8は、コンパイラ2が発熱量を抑える命令等を
挿入する一具体例を示す。同図の上部に示すブロックB
L2は、bar関数内で発熱が問題となるブロックであ
り、コンパイラ2により発見された最適化対象部分の一
例である。図8の下部に示すように、本実施形態におい
て、コンパイラ2は、ブロックBL2のbar関数の入り
口と出口に特殊命令lowpwr, normalを追加する。ここ
でlowpwr命令は、周波数や電源電圧を低減させるための
命令であり、また、normal命令は、変更した周波数、電
源電圧を元に戻す命令である。このように、本実施形態
によれば、プロセッサまたはシステムが、周波数や電源
電圧を低減させる機能を備える場合は、発熱量を抑える
命令等をアセンブラ列内に挿入するので、機器の発熱を
容易に抑制することができる。
In this embodiment, the compiler 2 automatically inserts an instruction or the like for suppressing the heat generation amount (step S2).
6). FIG. 8 shows a specific example in which the compiler 2 inserts an instruction or the like for suppressing the heat generation amount. Block B shown at the top of the figure
L2 is a block in which heat generation becomes a problem in the bar function, and is an example of an optimization target portion discovered by the compiler 2. As shown in the lower part of FIG. 8, in this embodiment, the compiler 2 adds the special instructions lowpwr and normal to the entry and exit of the bar function of the block BL2. Here, the lowpwr instruction is an instruction for reducing the frequency and the power supply voltage, and the normal instruction is an instruction for restoring the changed frequency and power supply voltage. As described above, according to the present embodiment, when the processor or the system has the function of reducing the frequency or the power supply voltage, the instruction or the like for suppressing the heat generation amount is inserted in the assembler string, so that the heat generation of the device is facilitated. Can be suppressed.

【0025】(4)コンパイル方法の第3の実施形態 次に、本発明にかかるコンパイル方法の第3の実施の形
態について図9〜図11を参照しながら説明する。本実
施形態は、複数のパイプラインであって、かつ、使用を
停止した場合の発熱量が、使用した場合の発熱量と比較
して小さくなるように設定されているパイプラインを備
えるプロセッサに好適な形態である。このようなプロセ
ッサとしては、典型的にはスーパスカラプロセッサやV
LIWプロセッサが挙げられる。図9は、本実施形態の
コンパイル方法の概略手順を説明するフローチャートで
ある。前述した第3の実施形態と同様に、本実施形態の
特徴は、プログラムの最適化処理手順を表わすステップ
S46にある。本実施形態のその他の手順は、図7に示
す第2の実施形態と実質的に同一であるので、以下では
ステップS46を中心に説明する。
(4) Third Embodiment of Compiling Method Next, a third embodiment of the compiling method according to the present invention will be described with reference to FIGS. 9 to 11. The present embodiment is suitable for a processor having a plurality of pipelines and a pipeline in which the heat generation amount when the use is stopped is set to be smaller than the heat generation amount when the use is performed. It is a form. Such processors are typically superscalar processors or V
An example is a LIW processor. FIG. 9 is a flowchart for explaining the general procedure of the compiling method of this embodiment. Similar to the above-described third embodiment, the feature of this embodiment lies in step S46 representing the optimization processing procedure of the program. Since the other procedures of this embodiment are substantially the same as those of the second embodiment shown in FIG. 7, step S46 will be mainly described below.

【0026】まず、第2の実施形態と同様に、コンパイ
ラ2は、各種パラメータを取り込み(ステップS4
1)、ユーザプログラムSCに対して通常のアセンブラ
列を作成して暫定オブジェクトコードOC2を出力した
後に(ステップS42)、発熱量対命令等のテーブルを
参照しながら、暫定オブジェクトコードOC2を仮実行
し、プロファイルPFを作成して出力する(ステップS
43)。続いて、コンパイラ2は、このプロファイルP
Fに基づいて、作成したアセンブラ列が温度条件を満た
すか否かを判定する(ステップS44)。作成したアセ
ンブラ列が温度条件を満たさない場合、コンパイラ2
は、出力したプロファイルPFに基づいて暫定オブジェ
クトコードOC2内で最適化対象部分を発見する(ステ
ップS45)。この結果、あるインターバルで発熱量が
制限値を超えていることが判明した場合、コンパイラ2
は、複数のパイプラインのうち一部のパイプラインへの
命令発行を停止し、さらに、発熱を抑制する命令等を追
加する(ステップS46)。図10および図11は、こ
のステップ46の手順を具体的に説明するための模式図
である。図10は、nop命令等を受けて発熱を抑制する
機能を備えるプロセッサが有する2本のパイプライン
(パイプ0およびパイプ1)の動作モードを表わし、こ
れらのうち、パイプ1での処理により、タイムインター
バルT2,T3で発熱量が制限値を超えていることがプ
ロファイルPFの情報から判明すると、コンパイラ2
は、パイプライン1への命令発行を停止して発熱を抑制
する命令等を追加する。同図に示す具体例においては、
コンパイラ2は、2つのパイプをそれぞれ独立に動作さ
せる命令等を発行するデュアル・イシュー・モードから
単一のパイプのみ動作させる命令等を発行するシングル
・イシュー・モードへ命令を変更する。図11は、図1
0に示すパイプライン0,1の動作を示し、(a)はデ
ュアル・イシュー・モードでの動作を表わし、(b)は
シングル・イシュー・モードでの動作を表わし、さら
に、(c)は、コンパイラ2によりnop命令が挿入され
た状態を表わす。
First, as in the second embodiment, the compiler 2 takes in various parameters (step S4).
1) After creating a normal assembler string for the user program SC and outputting the provisional object code OC2 (step S42), the provisional object code OC2 is provisionally executed while referring to the table of heat generation amount vs. instruction. , A profile PF is created and output (step S
43). Then, the compiler 2 uses the profile P
Based on F, it is determined whether the created assembler string satisfies the temperature condition (step S44). If the created assembler string does not meet the temperature conditions, the compiler 2
Finds an optimization target part in the provisional object code OC2 based on the output profile PF (step S45). As a result, if the calorific value exceeds the limit value at a certain interval, the compiler 2
Stops issuing instructions to some of the plurality of pipelines, and further adds instructions for suppressing heat generation (step S46). 10 and 11 are schematic diagrams for specifically explaining the procedure of step 46. FIG. 10 shows operation modes of two pipelines (a pipe 0 and a pipe 1) included in a processor having a function of suppressing heat generation by receiving a nop instruction or the like. If it is found from the information of the profile PF that the heat generation amount exceeds the limit value at intervals T2 and T3, the compiler 2
Adds an instruction or the like that stops issuing instructions to the pipeline 1 to suppress heat generation. In the concrete example shown in FIG.
The compiler 2 changes the instruction from the dual issue mode for issuing an instruction or the like for operating the two pipes independently to the single issue mode for issuing an instruction or the like for operating only a single pipe. FIG. 11 shows FIG.
0 shows an operation of pipelines 0 and 1, (a) shows an operation in a dual issue mode, (b) shows an operation in a single issue mode, and (c) shows Shows a state in which the nop instruction is inserted by the compiler 2.

【0027】このように、本実施形態のコンパイル方法
によれば、使用停止中は通常使用時よりも発熱量が抑制
されるパイプラインをターゲットのハードウェアが備え
る場合に、動作モードを変更する命令等を挿入するの
で、機器の発熱量を抑制するオブジェクトコードを容易
に生成することができる。
As described above, according to the compiling method of this embodiment, when the target hardware has a pipeline in which the amount of heat generation is suppressed during the suspension of use, the instruction for changing the operation mode is provided. Since, for example, is inserted, the object code that suppresses the heat generation amount of the device can be easily generated.

【0028】(5)コンパイル方法の第4の実施形態 次に、本発明にかかるコンパイル方法の第4の実施の形
態について図12を参照しながら説明する。本実施形態
は、図1に示す手順をマルチプロセッサシステムに適用
した場合のコンパイル方法である。従って、その概略手
順全体の説明は省略し、以下では最適化方法(図1のス
テップS9)を中心に説明する。
(5) Fourth Embodiment of Compiling Method Next, a fourth embodiment of the compiling method according to the present invention will be described with reference to FIG. The present embodiment is a compiling method when the procedure shown in FIG. 1 is applied to a multiprocessor system. Therefore, the description of the general procedure is omitted, and the optimization method (step S9 in FIG. 1) will be mainly described below.

【0029】通常、マルチプロセッサシステムでは、各
プロセッサ毎に処理が異なり、このためプログラムの部
分々々においてプロッセサ同士で同期を取る必要があ
る。従って、ある同期時点と次の同期時点との間に挟ま
れたプログラム部分では、処理の軽い(処理時間が短
い)プロセッサは、同一のプログラム部分において処理
が重い(処理時間が長い)プロセッサの動作が終了する
まで待機しなければならない。このとき、処理の軽いプ
ロセッサにおいて機器全体の正常動作に影響を及ぼすほ
ど発熱量が大きい場合は、処理速度を重視する命令等よ
りも発熱量の小ささを重視するような命令等やサブルー
チンを選択させることが望ましい。本実施形態のコンパ
イル方法の特徴は、最適化対象部分が同期待ちの部分に
該当し、かつ、処理速度を落としても問題がない場合
に、その部分の命令等を、発熱量を重視する命令等また
はサブルーチンに置換する点にある。
Normally, in a multiprocessor system, the processing is different for each processor, so that it is necessary to synchronize the processors in each part of the program. Therefore, in a program part sandwiched between a certain synchronization time point and the next synchronization time point, a processor with light processing (short processing time) operates as a processor with heavy processing (long processing time) in the same program portion. Have to wait until the end. At this time, if the amount of heat generated is large enough to affect the normal operation of the entire device in a processor with light processing, select an instruction or subroutine that emphasizes the amount of heat generated rather than an instruction that emphasizes processing speed. It is desirable to let The feature of the compiling method of the present embodiment is that, when the optimization target part corresponds to the part waiting for synchronization and there is no problem even if the processing speed is reduced, the command of the part is an instruction that emphasizes the heat generation amount. Etc. or in the point of substituting a subroutine

【0030】図12は、プロセッサA,B,Cを含むマ
ルチプロセッサに、あるオブジェクトコードを実行させ
た場合に生ずる発熱量を最適化処理前と最適化処理後に
対比させて表わす模式図である。同図左側に示すよう
に、この例に示すマルチプロセッサではプロセッサB,
Cは、プロセッサAと比較して処理が軽いために、プロ
セッサAの処理が終了するまで同期待ちしている。この
一方、プロセッサB,Cの同期点間の発熱量は、同期待
ちを含めてそれぞれ100,130となっており、これ
が機器全体の正常動作に影響を及ぼすものとする。
FIG. 12 is a schematic diagram showing the heat generation amount generated when a certain object code is executed by a multiprocessor including processors A, B and C, in comparison with that before and after the optimization processing. As shown on the left side of the figure, in the multiprocessor shown in this example, the processors B,
Since the processing of C is lighter than that of processor A, C waits for synchronization until the processing of processor A ends. On the other hand, the heat generation amounts between the synchronization points of the processors B and C are 100 and 130, including the synchronization waiting state, which affects the normal operation of the entire device.

【0031】コンパイラ2は、これらのプロセッサB,
C用のユーザプログラムに対し、処理速度を犠牲にして
発熱量が小さくなるように命令列を生成する。このよう
な最適化処理後の発熱量を図12の右側に示す。最適化
処理により、プロセッサB,Cの処理速度は遅くなった
が、同期点間の発熱量は、それぞれ50,60となり、
機器全体の発熱量が大幅に低減することが分かる。
The compiler 2 uses the processors B,
An instruction sequence is generated for the C user program so that the heat generation amount is reduced at the expense of the processing speed. The heat generation amount after such optimization processing is shown on the right side of FIG. Due to the optimization processing, the processing speeds of the processors B and C became slower, but the heat generation amounts between the synchronization points were 50 and 60, respectively.
It can be seen that the heat generation amount of the entire device is significantly reduced.

【0032】このように、本実施形態によれば、余計な
同期待ちのプログラム部分に対し、処理速度よりも発熱
量の小ささを優先してオブジェクトコードを生成するの
で、ハードウェア資源を有効に活用しながら発熱量を抑
制するコンパイル方法が提供される。
As described above, according to the present embodiment, since the object code is generated by giving priority to the smaller heat generation amount than the processing speed for the extra synchronization waiting program portion, the hardware resources are effectively used. A compile method for suppressing the amount of heat generation while utilizing it is provided.

【0033】(6)記録媒体 上述したコンパイラは、フロッピー(登録商標)ディス
クやCD−ROM等の記憶媒体に収納し、コンピュータ
に読込ませて実行させても良い。これにより、本発明に
かかるコンパイル方法を汎用コンピュータを用いて実現
することができる。記録媒体は、磁気ディスクや光ディ
スク等の携帯可能なものに限定されず、ハードディスク
装置やメモリなどの固定型の記憶媒体でも良い。また、
上述したコンパイラをインターネット等の通信回線(無
線通信を含む)を介して頒布しても良い。さらに、上述
したコンパイラを暗号化したり、変調をかけたり、圧縮
した状態で、インターネット等の有線回線や無線回線を
介して、あるいは記憶媒体に収納して頒布しても良い。
(6) Recording Medium The compiler described above may be stored in a storage medium such as a floppy (registered trademark) disk or a CD-ROM, and may be read by a computer and executed. As a result, the compiling method according to the present invention can be realized using a general-purpose computer. The recording medium is not limited to a portable medium such as a magnetic disk or an optical disk, and may be a fixed storage medium such as a hard disk device or a memory. Also,
The compiler described above may be distributed via a communication line (including wireless communication) such as the Internet. Further, the above-described compiler may be distributed in a state of being encrypted, modulated, or compressed via a wired line or a wireless line such as the Internet or stored in a storage medium.

【0034】(7)記憶装置およびプロセッサ 上述したコンパイル方法またはコンパイラにより生成さ
れたオブジェクトコードは、記憶装置に格納してプロセ
ッサに実行させても良い。また、プロセッサが記憶装置
を内蔵する場合は、この内部記憶装置に上述したコンパ
イル方法またはコンパイラにより生成されたオブジェク
トコードを格納してプロセッサに実行させても良い。こ
れにより、ハードウェア資源を有効に活用しながら発熱
量を抑制できる記憶装置またはプロセッサが提供され
る。
(7) Storage Device and Processor The object code generated by the above-mentioned compilation method or compiler may be stored in a storage device and executed by the processor. When the processor has a built-in storage device, the object code generated by the above-described compilation method or compiler may be stored in this internal storage device and executed by the processor. As a result, a storage device or processor that can suppress the amount of heat generation while effectively utilizing hardware resources is provided.

【0035】[0035]

【発明の効果】以上詳述したとおり、本発明は、以下の
効果を奏する。即ち、本発明によれば、ハードウェアか
らの発熱を抑制できるコンパイル方法、このコンパイル
方法をコンピュータに実行させるコンパイラ、およびこ
れを格納した記録媒体が提供される。
As described above in detail, the present invention has the following effects. That is, according to the present invention, there are provided a compiling method capable of suppressing heat generation from hardware, a compiler causing a computer to execute the compiling method, and a recording medium storing the compiling method.

【0036】また、本発明によれば、上述したコンパイ
ル方法により生成され最適化処理がされたオブジェクト
コードを記憶するので、ハードウェアの発熱量をその仕
様範囲内に抑制できる記憶装置が提供される。
Further, according to the present invention, since the object code generated by the above-described compiling method and subjected to the optimization processing is stored, a storage device capable of suppressing the heat generation amount of hardware within its specification range is provided. .

【0037】さらに、本発明によれば、上述した記憶装
置を備えるので、仕様範囲を超えて発熱することなく安
定して動作するプロセッサが提供される。
Further, according to the present invention, since the above-described storage device is provided, a processor that operates stably without generating heat beyond the specification range is provided.

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

【図1】あるゲーム機器に用いられる一半導体チップの
単位サイクルごとの発熱量を示すグラフである。
FIG. 1 is a graph showing a heat generation amount per unit cycle of one semiconductor chip used in a game machine.

【図2】本発明にかかるコンパイラの一実施形態の概略
機能を説明する模式図である。
FIG. 2 is a schematic diagram illustrating general functions of an embodiment of a compiler according to the present invention.

【図3】本発明にかかるコンパイル方法の第1の実施の
形態の概略手順を示すフローチャートである。
FIG. 3 is a flowchart showing a schematic procedure of a first embodiment of a compiling method according to the present invention.

【図4】ユーザにより指定された最適化対象部分の一具
体例を示す図である。
FIG. 4 is a diagram showing a specific example of an optimization target portion designated by a user.

【図5】(a)は、ユーザプログラム中のmain関数の一
例を示し、(b)は、(a)に示すmain関数中の各関数
ごとに関連づけられた各インターバルでの総発熱量の最
高値を示す。
5A shows an example of a main function in a user program, and FIG. 5B shows the maximum total heat generation amount in each interval associated with each function in the main function shown in FIG. Indicates a value.

【図6】最適のサブルーチンを選択するための一具体例
を説明する模式図である。
FIG. 6 is a schematic diagram illustrating a specific example for selecting an optimum subroutine.

【図7】本発明にかかるコンパイル方法の第2の実施の
形態の概略手順を説明するフローチャートである。
FIG. 7 is a flowchart illustrating a schematic procedure of a second embodiment of a compiling method according to the present invention.

【図8】図7に示すフローのうち、発熱量を抑える命令
等を挿入するフローを具体的に説明する図である。
8 is a diagram specifically illustrating a flow of inserting an instruction or the like for suppressing the heat generation amount in the flow shown in FIG. 7. FIG.

【図9】本発明にかかるコンパイル方法の第3の実施の
形態の概略手順を説明するフローチャートである。
FIG. 9 is a flowchart illustrating a schematic procedure of a third embodiment of a compiling method according to the present invention.

【図10】図9に示すコンパイル方法の要部を説明する
模式図である。
10 is a schematic diagram illustrating a main part of the compiling method illustrated in FIG.

【図11】図9に示すコンパイル方法の要部を説明する
模式図である。
FIG. 11 is a schematic diagram for explaining an essential part of the compiling method shown in FIG.

【図12】本発明にかかるコンパイル方法の第4の実施
の形態を説明する模式図である。
FIG. 12 is a schematic diagram illustrating a fourth embodiment of a compiling method according to the present invention.

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

2 コンパイラ BL2 ブロック L2,L4,L6,L8 ライブラリ OC2,OC4 オブジェクトコード PF プロファイル SC ユーザプログラム T0,T1,T2,T3 タイムインターバル 2 compiler BL2 block L2, L4, L6, L8 library OC2, OC4 object code PF profile SC user program T0, T1, T2, T3 time interval

フロントページの続き (72)発明者 山 崎 到 神奈川県川崎市幸区小向東芝町1番地 株 式会社東芝マイクロエレクトロニクスセン ター内 Fターム(参考) 5B081 CC24 CC30 Continued front page    (72) Inventor Yu Yamazaki             1st Komukai Toshiba-cho, Sachi-ku, Kawasaki-shi, Kanagawa             Ceremony Company Toshiba Microelectronics Sen             Inside F-term (reference) 5B081 CC24 CC30

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】ユーザプログラムを受けてターゲットとな
るハードウェアが解釈可能なオブジェクトコードを暫定
的に生成する手順と、 前記暫定的なオブジェクトコードを前記ハードウェアが
実行した場合に前記ハードウェアから生じる発熱量を算
出する手順と、 算出された前記発熱量が前記ハードウェアの温度条件を
満たすかどうかを判定する手順と、 前記発熱量が前記温度条件を満たさない場合に、前記暫
定的なオブジェクトコード内で相対的に大きな発熱量を
もたらす最適化対象部分を発見する手順と、 前記最適化対象部分に対して前記発熱量を抑制するため
の最適化処理を行う手順と、を備えるコンパイル方法。
1. A procedure for tentatively generating an object code interpretable by a target hardware in response to a user program, and resulting from the hardware when the tentative object code is executed by the hardware. A step of calculating a heat generation amount, a step of determining whether or not the calculated heat generation amount satisfies the temperature condition of the hardware, and the provisional object code when the heat generation amount does not satisfy the temperature condition A compiling method comprising: a step of finding an optimization target portion that produces a relatively large amount of heat generation in the inside; and a step of performing an optimization process for suppressing the heat generation amount on the optimization target portion.
【請求項2】前記温度条件を満たすかどうかを判定する
手順は、 前記発熱量を前記ハードウェアの限界発熱量および許容
総発熱量のうち少なくともいずれかと比較する手順を含
むことを特徴とする請求項1に記載のコンパイル方法。
2. The step of determining whether or not the temperature condition is satisfied includes a step of comparing the heat generation amount with at least one of a limit heat generation amount and an allowable total heat generation amount of the hardware. The compiling method according to Item 1.
【請求項3】前記ユーザプログラムを構成する命令また
は命令列ごとに発熱量を対応づけた発熱量対命令のテー
ブルを予め作成する手順をさらに備え、 前記発熱量を算出する手順は、前記発熱量対命令のテー
ブルを参照して前記暫定的なオブジェクトコードから前
記発熱量を算出する手順であることを特徴とする請求項
1または2に記載のコンパイル方法。
3. The method further comprises the step of previously creating a table of heat generation amount vs. instruction in which the heat generation amount is associated with each instruction or instruction sequence constituting the user program, and the step of calculating the heat generation amount is the heat generation amount. 3. The compiling method according to claim 1, which is a procedure for calculating the heat generation amount from the provisional object code with reference to a paired instruction table.
【請求項4】前記発熱量対命令のテーブルを参照し、前
記暫定的なオブジェクトコードを構成する命令または命
令列ごとに発熱量が記述されて前記暫定的なオブジェク
トコードの発熱特性を表わすプロファイルを作成する手
順をさらに備え、 前記発熱量を算出する手順は、前記プロファイルに基づ
いて前記ハードウェアから生じる前記発熱量を算出する
手順であり、 前記最適化対象部分を発見する手順は、前記プロファイ
ルに基づいて前記暫定のオブジェクトコード内で実行処
理速度よりも発熱量を優先できる部分を発見する手順を
含むことを特徴とする請求項3に記載のコンパイル方
法。
4. A profile representing heat generation characteristics of the temporary object code in which a heat generation amount is described for each of the instructions or instruction strings forming the temporary object code by referring to the table of heat generation amount vs. instruction. Further comprising a procedure for creating, the step of calculating the heat generation amount is a step of calculating the heat generation amount generated from the hardware based on the profile, the step of discovering the optimization target portion, in the profile 4. The compiling method according to claim 3, further comprising a step of finding a portion in which the heat generation amount can be prioritized over the execution processing speed in the provisional object code based on the basis.
【請求項5】前記暫定的なオブジェクトコードを構成す
る命令または命令列に代替可能な命令または命令列を予
め発熱量の大きさに応じて分類して準備する手順をさら
に備え、 前記最適化処理を行う手順は、前記代替可能な命令また
は命令列から前記発熱量の抑制に寄与する命令または命
令列を選択し、選択した命令または命令列に前記最適化
対象部分を置換する手順を含むことを特徴とする請求項
1乃至4のいずれかに記載のコンパイル方法。
5. The optimizing process further comprising a step of preliminarily classifying and preparing an instruction or an instruction sequence that can be replaced with an instruction or an instruction sequence forming the provisional object code according to the amount of heat generation. The procedure of performing includes the step of selecting an instruction or an instruction sequence that contributes to the suppression of the heat generation amount from the substitutable instruction or instruction sequence, and replacing the optimization target part with the selected instruction or instruction sequence. The compiling method according to any one of claims 1 to 4, which is characterized in that:
【請求項6】前記ハードウェアは、発熱量を低減する機
能を備え、 前記最適化処理を行う手順は、前記ハードウェアに前記
機能を実行させるための命令または命令列を前記最適化
対象部分の前後に挿入する手順を含むことを特徴とする
請求項1乃至5のいずれかに記載のコンパイル方法。
6. The hardware has a function of reducing a heat generation amount, and in the procedure of performing the optimization processing, an instruction or an instruction sequence for causing the hardware to execute the function is stored in the optimization target portion. The compiling method according to any one of claims 1 to 5, characterized in that the compiling method includes a procedure of inserting before and after.
【請求項7】前記ユーザプログラムは、コンパイル時に
実行速度よりも発熱量を優先することを表わす指示子が
予めユーザにより付加された前記命令または前記命令列
を含み、 前記最適化処理を行う手順は、前記指示子が付加された
命令または命令列に対する最適化処理をユーザに促す手
順を含むことを特徴とする請求項1乃至4のいずれかに
記載のコンパイル方法。
7. The user program includes the instruction or the instruction string to which a directive indicating that the heat generation amount is prioritized over the execution speed at the time of compilation is added by the user in advance. 5. The compiling method according to claim 1, further comprising a step of prompting a user to perform an optimization process on an instruction or an instruction string to which the directive is added.
【請求項8】前記最適化対象部分を発見する手順と、前
記最適化処理を行う手順と、前記発熱量を算出する手順
とは、前記温度条件が満たされるまで繰り返されること
を特徴とする請求項1乃至7のいずれかに記載のコンパ
イル方法。
8. The step of finding the optimization target portion, the step of performing the optimization process, and the step of calculating the heat generation amount are repeated until the temperature condition is satisfied. 8. The compiling method according to any one of Items 1 to 7.
【請求項9】請求項1乃至8のいずれかに記載のコンパ
イル方法をコンピュータに実行させるコンパイラ。
9. A compiler that causes a computer to execute the compiling method according to claim 1. Description:
【請求項10】請求項1乃至8のいずれかに記載のコン
パイル方法をコンピュータに実行させるコンパイラを格
納した記録媒体。
10. A recording medium in which a compiler for causing a computer to execute the compiling method according to claim 1 is stored.
【請求項11】請求項1乃至8のいずれかに記載のコン
パイル方法により生成され前記最適化処理が行なわれた
オブジェクトコードを記憶する記憶装置。
11. A storage device for storing an object code generated by the compiling method according to claim 1 and subjected to the optimization processing.
【請求項12】請求項1乃至8のいずれかに記載のコン
パイル方法により生成され前記最適化処理が行なわれた
オブジェクトコードを記憶する記憶装置を備えるプロセ
ッサ。
12. A processor comprising a storage device for storing an object code generated by the compiling method according to claim 1 and subjected to the optimization processing.
JP2001226244A 2001-07-26 2001-07-26 Compile method Expired - Fee Related JP4131909B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001226244A JP4131909B2 (en) 2001-07-26 2001-07-26 Compile method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001226244A JP4131909B2 (en) 2001-07-26 2001-07-26 Compile method

Publications (2)

Publication Number Publication Date
JP2003044289A true JP2003044289A (en) 2003-02-14
JP4131909B2 JP4131909B2 (en) 2008-08-13

Family

ID=19059095

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001226244A Expired - Fee Related JP4131909B2 (en) 2001-07-26 2001-07-26 Compile method

Country Status (1)

Country Link
JP (1) JP4131909B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009081473A1 (en) * 2007-12-21 2009-07-02 Fujitsu Limited Image processing apparatus, image processing method, and image processing program
US7739530B2 (en) 2006-08-04 2010-06-15 Hitachi, Ltd. Method and program for generating execution code for performing parallel processing
JP2019040317A (en) * 2017-08-23 2019-03-14 富士通株式会社 Information processing apparatus, compilation method and compilation program
US11842182B2 (en) 2021-02-08 2023-12-12 Fujitsu Limited Method of determining processing block to be optimized and information processing apparatus
JP7515489B2 (en) 2019-02-06 2024-07-12 マジック リープ, インコーポレイテッド Target-Intent-Based Clock Speed Determination and Adjustment to Limit Total Heat Generated by Multiple Processors - Patent application

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7739530B2 (en) 2006-08-04 2010-06-15 Hitachi, Ltd. Method and program for generating execution code for performing parallel processing
WO2009081473A1 (en) * 2007-12-21 2009-07-02 Fujitsu Limited Image processing apparatus, image processing method, and image processing program
JP2019040317A (en) * 2017-08-23 2019-03-14 富士通株式会社 Information processing apparatus, compilation method and compilation program
JP7515489B2 (en) 2019-02-06 2024-07-12 マジック リープ, インコーポレイテッド Target-Intent-Based Clock Speed Determination and Adjustment to Limit Total Heat Generated by Multiple Processors - Patent application
US11842182B2 (en) 2021-02-08 2023-12-12 Fujitsu Limited Method of determining processing block to be optimized and information processing apparatus

Also Published As

Publication number Publication date
JP4131909B2 (en) 2008-08-13

Similar Documents

Publication Publication Date Title
JP4339907B2 (en) Optimal code generation method and compiling device for multiprocessor
US7926046B2 (en) Compiler method for extracting and accelerator template program
US8375374B2 (en) Partitioning programs between a general purpose core and one or more accelerators
EP1728155B1 (en) Method and system for performing link-time code optimization without additional code analysis
JP4635082B2 (en) Multiprocessor system and grouping method
US20090077545A1 (en) Pipelined parallelization of multi-dimensional loops with multiple data dependencies
US5812854A (en) Mechanism for integrating user-defined instructions with compiler-generated instructions and for optimizing the integrated instruction stream
JPH0922318A (en) Processor and control method therefor
JP2008040734A (en) Execution code generation method and program
WO2001090887A1 (en) Method fir processing program for high-speed processing by using dynamically reconfigurable hardware and program for executing the processing method
US7827542B2 (en) Compiler apparatus
JP2001167060A (en) Task paralleling method
Nagarajan et al. Static placement, dynamic issue (SPDI) scheduling for EDGE architectures
JPH06290056A (en) Method and equipment for optimizing execution of software on different computers
JP2003108386A (en) Method for prefetching indirect reference data
JP2003044289A (en) Compilation method, compiler, recording medium storing the compiler, storage device storing object code prepared by compilation method and processor provided with the storage device
WO2018192479A1 (en) Adaptive code generation with a cost model for jit compiled execution in a database system
JP5576605B2 (en) Program conversion apparatus and program conversion method
JP4462676B2 (en) Program conversion device, compiler device, and computer-readable recording medium recording program conversion program
US20050125783A1 (en) Program optimization with intermediate code
Gomez et al. Optimizing the memory bandwidth with loop morphing
JP4846226B2 (en) Information processing apparatus, information processing method, and program
JP2005190302A (en) Information processing system and code generation method
CN112579091A (en) Instruction compiling method and device, compiler and computing equipment
JP2002268877A (en) Clock control method and information processor using the same

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050309

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20071113

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071130

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080129

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080229

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080424

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080523

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080529

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

Free format text: PAYMENT UNTIL: 20110606

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110606

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees