JP2010244205A - Compiler program and compiler device - Google Patents
Compiler program and compiler device Download PDFInfo
- Publication number
- JP2010244205A JP2010244205A JP2009090480A JP2009090480A JP2010244205A JP 2010244205 A JP2010244205 A JP 2010244205A JP 2009090480 A JP2009090480 A JP 2009090480A JP 2009090480 A JP2009090480 A JP 2009090480A JP 2010244205 A JP2010244205 A JP 2010244205A
- Authority
- JP
- Japan
- Prior art keywords
- sector
- data
- determined
- division ratio
- loop
- 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
Links
Images
Abstract
Description
この発明は、コンパイラプログラムおよびコンパイラ装置に関する。 The present invention relates to a compiler program and a compiler apparatus.
従来より、CPU(Central Processing Unit)およびメインメモリ間に発生するデータ遅延を解消してプログラムの実行処理を向上するために、記憶容量が小さいが高速アクセスが可能なキャッシュメモリが利用されている(例えば、特許文献1〜5参照)。
Conventionally, a cache memory having a small storage capacity but capable of high-speed access has been used in order to eliminate a data delay occurring between a CPU (Central Processing Unit) and a main memory and improve program execution processing ( For example, see
ここで、以下に説明するように、特定のデータをできるだけ、あるいは、特定のデータを必ずキャッシュメモリ上に残すことで、プログラムの実行処理を向上させる技術が知られている。 Here, as will be described below, there is known a technique for improving program execution processing by leaving specific data as much as possible or leaving certain data on a cache memory as much as possible.
第一の技術は、最弱ウェイ方式である。最弱ウェイ方式は、メモリアクセス命令によってデータをキャッシュメモリに転送する際に、同一インデクス内(同一ウェイ内)で最初に追い出すべきデータを指示することができる方式である。最弱ウェイ方式では、ストリームデータのような再利用性の無いデータとそれ以外のデータとを同じLRU方式により追出し(置換)するのではなく、再利用性の無いデータを優先的に追い出すことで、再利用性のあるデータがキャッシュ上に残り易くなる。なお、LRU(Least Recently Used)方式では、使われてから最も長い時間が経っているウェイのデータが選択され、選択されたデータが新たなデータと置換される。また、ウェイとは、セットアソシエイティブ方式により、キャッシュラインを複数に分割した場合の単位である。 The first technique is the weakest way method. The weakest way method is a method in which when data is transferred to a cache memory by a memory access instruction, the data to be evicted first in the same index (in the same way) can be indicated. In the weakest way method, non-reusable data such as stream data and other data are not ejected (replaced) by the same LRU method, but non-reusable data is preferentially ejected. This makes it easy for reusable data to remain in the cache. In the LRU (Least Recently Used) method, the data of the way that has been used for the longest time is selected, and the selected data is replaced with new data. The way is a unit when the cache line is divided into a plurality of by the set associative method.
第二の技術は、ローカルメモリ方式である(例えば、特許文献6、7参照)。ローカルメモリ方式では、キャッシュメモリ領域が通常のキャッシュメモリ領域とローカルメモリ(またはスクラッチパッド)領域とに分割される。そして、ローカルメモリ方式では、ローカルメモリ領域に再利用性のあるデータが配置される。したがって、ローカルメモリ方式では、ストリームデータのような再利用性の無いデータによって再利用性のあるデータがキャッシュメモリから追い出されることを防ぐことができる。 The second technique is a local memory system (see, for example, Patent Documents 6 and 7). In the local memory system, the cache memory area is divided into a normal cache memory area and a local memory (or scratch pad) area. In the local memory method, reusable data is arranged in the local memory area. Therefore, in the local memory method, reusable data can be prevented from being evicted from the cache memory by non-reusable data such as stream data.
第三の技術は、キャッシュラインロック方式またはキャッシュウェイロック方式である。キャッシュラインロック方式では、特定のキャッシュラインがロックされ、キャッシュウェイロック方式では、特定のキャッシュウェイがロックされる。そして、キャッシュラインロック方式またはキャッシュウェイロック方式では、ローカルメモリ方式と同様に、再利用性のあるデータを書き込んだキャッシュラインやキャッシュウェイがロックされることで、ストリームデータのような再利用性の無いデータによって再利用性のあるデータがキャッシュメモリから追い出されることを防ぐことができる。 The third technique is a cache line lock method or a cache way lock method. In the cache line lock method, a specific cache line is locked, and in the cache way lock method, a specific cache way is locked. Then, in the cache line lock method or the cache way lock method, similar to the local memory method, the cache line or the cache way in which reusable data is written is locked, so that reusability such as stream data can be achieved. It is possible to prevent reusable data from being evicted from the cache memory due to missing data.
ところで、上記したローカルメモリ方式では、通常のキャッシュメモリ領域およびメインメモリとは異なるローカルメモリ領域に対する特別なストア命令が必要となる。また、上記したローカルメモリ方式では、通常のキャッシュ領域およびスクラッチパッド領域と、メインメモリとの間でデータの一貫性を維持するための制御が必要になる。また、上記したローカルメモリ方式では、プログラム実行中に、ローカルメモリの領域サイズを変更する場合、大きなオーバーヘッドが必要となる。 By the way, the above-mentioned local memory system requires a special store instruction for a local memory area different from the normal cache memory area and the main memory. In the above-mentioned local memory system, it is necessary to perform control for maintaining data consistency between the normal cache area and scratch pad area and the main memory. In the local memory system described above, a large overhead is required when changing the area size of the local memory during program execution.
また、上記したキャッシュラインロック方式またはキャッシュウェイロック方式では、プログラマがロック解除(アンロック)を忘れたり、誤って全てのキャッシュ領域をロックしてしまったりした場合、キャッシュシステムが正常動作しなくなる可能性がある。また、上記したキャッシュラインロック方式またはキャッシュウェイロック方式では、アンロックのための専用ハードウェア機構が必要となり、追加コストが大きくなってしまう。 Also, with the above cache line lock method or cache way lock method, if the programmer forgets to unlock (unlock) or locks all the cache areas by mistake, the cache system may not operate normally. There is sex. In addition, the above-described cache line lock method or cache way lock method requires a dedicated hardware mechanism for unlocking, which increases the additional cost.
また、上記した最弱ウェイ方式は、あくまでも優先的な追出しであり、ローカルメモリ方式やキャッシュラインロック方式またはキャッシュウェイロック方式と比べると、再利用性のあるデータがキャッシュメモリに残る確率が低くなる。また、上記した最弱ウェイ方式は、ローカルメモリ方式と同時に実装できない。 In addition, the weakest way method described above is a priority eviction, and the probability that reusable data remains in the cache memory is lower than the local memory method, the cache line lock method, or the cache way lock method. . The weakest way method described above cannot be implemented simultaneously with the local memory method.
すなわち、上記した従来の技術は、必ずしもキャッシュメモリを有効的に利用することができないため、プログラムの実行性能が低下してしまう場合があるという課題があった。 That is, the above-described conventional technique has a problem that the execution performance of the program may be deteriorated because the cache memory cannot always be effectively used.
そこで、開示の技術は、上述した従来技術の課題を解決するためになされたものであり、キャッシュメモリを有効的に利用することによりプログラムの実行性能を向上することが可能となるコンパイラプログラムおよびコンパイラ装置を提供することを目的とする。 Therefore, the disclosed technique has been made to solve the above-described problems of the prior art, and a compiler program and a compiler that can improve the execution performance of a program by effectively using a cache memory An object is to provide an apparatus.
上述した課題を解決し、目的を達成するため、本願の開示するプログラムは、一つの様態において、セクタ機能付きのキャッシュメモリを搭載する情報処理装置にて実行されるソースプログラムを解析することで、当該ソースプログラムの各ループにおいて処理されるデータ配列の集合であるデータ集合のループ処理実行時における再利用性の有無を判定し、当該再利用性の有無を判定したデータ集合を格納するために要する容量と前記キャッシュメモリの容量とから、前記キャッシュメモリにおけるセクタ分割比と、当該データ集合を格納するセクタを特定するためのセクタ番号とを決定する決定手順と、前記決定手順によって前記セクタ分割比および前記セクタ番号が決定されたループにおいて、当該セクタ分割比および当該セクタ番号に基づく命令制御文を前記ソースプログラムに挿入する挿入手順と、前記挿入手順によって前記命令制御文が挿入されたソースプログラムからオブジェクトファイルを生成するファイル生成手順と、をコンピュータに実行させることを要件とする。 In order to solve the above-described problems and achieve the object, the program disclosed in the present application is, in one aspect, by analyzing a source program executed by an information processing apparatus equipped with a cache memory with a sector function. Necessary for determining whether or not the data set, which is a set of data arrays processed in each loop of the source program, is reusable when loop processing is executed, and storing the data set for which the reusability is determined A determination procedure for determining a sector division ratio in the cache memory and a sector number for specifying a sector storing the data set from the capacity and the capacity of the cache memory, and the sector division ratio and In the loop in which the sector number is determined, the sector division ratio and the sector number It is a requirement that the computer execute an insertion procedure for inserting an instruction control statement based on the source program and a file generation procedure for generating an object file from the source program in which the instruction control statement is inserted by the insertion procedure. .
また、本願の開示するプログラムは、他の様態において、セクタ機能付きのキャッシュメモリに格納する際のセクタ分割比が作成者によりループ内にて指定されたソースプログラムを受け付ける受け付け手順と、前記受け付け手順によって受け付けられた前記ソースプログラムから、当該ソースプログラムにて前記作成者により前記セクタ分割比が指定されたループにて用いられる配列データを抽出する抽出手順と、前記抽出手順によって抽出された前記配列データの再利用性の有無と、前記セクタ分割比に基づいて、当該配列データを前記キャッシュメモリに格納する際のセクタ番号を決定する決定手順と、前記決定手順によって前記セクタ番号が決定されたループにおいて、当該決定されたセクタ番号および前記作成者から指定されたセクタ分割比に基づく命令制御文を前記ソースプログラムに挿入する挿入手順と、前記挿入手順によって前記命令制御文が挿入されたソースプログラムからオブジェクトファイルを生成するファイル生成手順と、をコンピュータに実行させることを要件とする。 In another aspect, the program disclosed in the present application is a reception procedure for receiving a source program in which a sector division ratio is specified in a loop by a creator when stored in a cache memory with a sector function, and the reception procedure An extraction procedure for extracting sequence data used in a loop in which the sector division ratio is specified by the creator in the source program from the source program accepted by the source program, and the sequence data extracted by the extraction procedure In the loop in which the sector number is determined by the determination procedure, and a determination procedure for determining a sector number for storing the array data in the cache memory based on the presence or absence of reusability and the sector division ratio The determined sector number and the cell specified by the creator. And causing a computer to execute an insertion procedure for inserting an instruction control statement based on a data division ratio into the source program and a file generation procedure for generating an object file from the source program into which the instruction control statement has been inserted by the insertion procedure. Is a requirement.
開示のプログラムによれば、キャッシュメモリを有効的に利用することによりプログラムの実行性能を向上することが可能となる。 According to the disclosed program, it is possible to improve the execution performance of the program by effectively using the cache memory.
以下に添付図面を参照して、本願の開示するコンパイラプログラムおよびコンパイラ装置の実施例を詳細に説明する。なお、以下では、本願の開示するコンパイラプログラムを実行するコンパイラ装置を実施例として説明する。 Exemplary embodiments of a compiler program and a compiler apparatus disclosed in the present application will be described below in detail with reference to the accompanying drawings. In the following, a compiler apparatus that executes a compiler program disclosed in the present application will be described as an embodiment.
まず最初に、本実施例で用いる主要な用語を説明する。本実施例で用いる「セクタ機能付きキャッシュメモリシステム」とは、セット・アソシアティブ方式によりキャッシュラインが複数のウェイに分割されたキャッシュメモリを、プログラム実行中でも、複数のセクタに分割することを指示できるシステムのことである。 First, main terms used in this embodiment will be described. The “cache memory system with a sector function” used in the present embodiment is a system that can instruct a cache memory in which a cache line is divided into a plurality of ways by a set associative method to be divided into a plurality of sectors even during program execution. That's it.
具体的には、「セクタ機能付きキャッシュメモリシステム」においては、キャッシュメモリをセクタに分割する際に、セクタの分割比(以下、セクタ分割比と記す)を指示することができる。さらに、「セクタ機能付きキャッシュメモリシステム」においては、後続する各メモリアクセス命令の使用セクタ(具体的には、分割された各セクタを特定するセクタ番号)を指示することができる。これにより、「セクタ機能付きキャッシュメモリシステム」においては、間接的(または、直接的)に各セクタの使用用途を指示できる。 Specifically, in the “cache memory system with sector function”, when the cache memory is divided into sectors, a sector division ratio (hereinafter referred to as a sector division ratio) can be designated. Further, in the “cache memory system with a sector function”, it is possible to indicate a sector to be used for each subsequent memory access instruction (specifically, a sector number that identifies each divided sector). As a result, in the “cache memory system with sector function”, the usage of each sector can be instructed indirectly (or directly).
また、「LRU方式」とは、使われてから最も長い時間が経っている(LRU:Least Recently Used)データを順次キャッシュメモリから除去し、新たなデータを取り込む方式のことである。また、「最弱ウェイ方式」とは、メモリアクセス命令によってデータをキャッシュメモリに転送する際に、同一インデクス内(同一ウェイ内)で最初に追い出すべきデータを指示する方式のことである。また、「ローカルメモリ方式」とは、キャッシュメモリ領域を通常のキャッシュメモリ領域とローカルメモリ(またはスクラッチパッド)領域とに分割し、ローカルメモリ領域に再利用性のあるデータが配置される方式のことである。 In addition, the “LRU method” is a method in which data that has been used for the longest time (LRU: Last Recently Used) is sequentially removed from the cache memory and new data is taken in. The “weakest way method” is a method for instructing data to be first ejected in the same index (in the same way) when data is transferred to the cache memory by a memory access instruction. The “local memory method” is a method in which the cache memory area is divided into a normal cache memory area and a local memory (or scratch pad) area, and reusable data is arranged in the local memory area. It is.
さらに、「セクタ機能付きキャッシュメモリシステムにおける最弱ウェイ方式」とは、例えば、2つのセクタ(セクタ0およびセクタ1)に分割されたキャッシュメモリを用いてプログラムを実行する際に、最弱ウェイ方式を採用したシステムのことである。以下、「セクタ機能付きキャッシュメモリシステムにおける最弱ウェイ方式」について、図1を用いて説明する。なお、図1は、セクタ機能付きキャッシュシステムにおける最弱ウェイ方式を説明するための図である。
Further, the “weakest way method in a cache memory system with a sector function” is, for example, the weakest way method when executing a program using a cache memory divided into two sectors (
「セクタ機能付きキャッシュメモリシステムにおける最弱ウェイ方式」においては、図1の(A)に示すように、セクタ0とセクタ1との最大ウェイ数の合計が、システムの最大ウェイ数より大きな値になるようにセクタ分割比が指定される。例えば、図1の(B)に示すように、1ウェイが512KBであるシステム(キャッシュメモリ)の最大ウェイ数が「10」である場合、セクタ0の最大ウェイ数は、システムの最大ウェイ数と同じ「10」とされ、セクタ1の最大ウェイ数は、「5」とされる。
In the “weakest way method in a cache memory system with a sector function”, as shown in FIG. 1A, the sum of the maximum number of ways of
そして、例えば、図1の(C)に示すソースプログラムを実行する際、隣接領域を順次アクセスする連続性のあるデータであるストリームデータの配列aおよび配列bは、セクタ1に割り当てられる。そして、図1の(C)に示すように、doループにおいて、再利用性のあるデータである配列cは、セクタ0に割り当てられる。これにより、「セクタ機能付きキャッシュメモリシステム」にて「最弱ウェイ方式」が実行された場合、配列aおよび配列bのデータが別のセクタにストアされることで、配列cのデータがキャッシュメモリから追い出される確率を低減することができる。
For example, when the source program shown in FIG. 1C is executed, stream data array a and array b, which are continuous data for sequentially accessing adjacent areas, are allocated to
また、「セクタ機能付きキャッシュメモリシステムにおけるローカルメモリ方式」とは、再利用性のある配列が予定外のキャッシュコンフリクトを起こしてキャッシュメモリから追い出されることを防止するローカルメモリ方式を、セクタ機能にて実現する方式のことである。一般的には、ローカルメモリは、通常のキャッシュメモリとは別の高速メモリを使うことが多いが、セクタ機能付きキャッシュメモリシステムでは、キャッシュ制御だけで、ローカルメモリ方式と同じ動きを実現する。以下、「セクタ機能付きキャッシュメモリシステムにおけるローカルメモリ方式」について、図2を用いて説明する。なお、図2は、セクタ機能付きキャッシュシステムにおけるローカルメモリ方式を説明するための図である。 The “local memory system in a cache memory system with a sector function” is a local memory system that prevents a reusable array from causing an unplanned cache conflict and being evicted from the cache memory. It is a method to realize. In general, the local memory often uses a high-speed memory different from the normal cache memory. However, in the cache memory system with a sector function, the same operation as the local memory system is realized only by the cache control. The “local memory system in the cache memory system with a sector function” will be described below with reference to FIG. FIG. 2 is a diagram for explaining a local memory system in a cache system with a sector function.
「セクタ機能付きキャッシュメモリシステムにおけるローカルメモリ方式」では、セクタ機能付きキャッシュメモリをローカルメモリとして利用する場合、図2の(A)に示すように、セクタ0とセクタ1との最大ウェイ数の合計が、システムの最大ウェイ数と同じ値になるようにセクタ分割比が指定される。例えば、図2の(B)に示すように、1ウェイが512KBであるシステム(キャッシュメモリ)の最大ウェイ数が「10」である場合、セクタ0の最大ウェイ数は、「9」とされ、セクタ1の最大ウェイ数は、「10」から「9」を差し引いた「1」とされる。
In the “local memory system in the cache memory system with sector function”, when the cache memory with sector function is used as the local memory, as shown in FIG. However, the sector division ratio is specified so that it becomes the same value as the maximum number of ways of the system. For example, as shown in FIG. 2B, when the maximum number of ways in a system (cache memory) where 1 way is 512 KB is “10”, the maximum number of ways in
そして、例えば、図2の(C)に示すソースプログラムを実行する際、再利用性のある配列cは、セクタ1に割当て、ストリームデータの配列aおよび配列bは、セクタ0に割り当てられる。なお、図1の(C)に示すソースプログラムでは、配列cの宣言サイズが動的(do i=1,m)であるのに対し、図2の(C)に示すソースプログラムでは、配列cの宣言サイズが静的に「do i=1,1000」として示されている。
For example, when the source program shown in FIG. 2C is executed, the reusable array c is allocated to the
ここで、配列cのアクセス幅(サイズ)がセクタ1のサイズ512KB以下である場合、セクタ1を利用するデータは配列cのみであるため、配列cがキャッシュコンフリクトを起こしてセクタ1から追い出される確率は、0%となる。このように、「セクタ機能付きキャッシュメモリシステム」にて、セクタ1をローカルメモリとして扱うことにより、再利用性のある配列cがキャッシュから追い出されることを防ぐことができる。なお、図2の(C)に示すソースプログラムのように、ループの回転数が明確でない場合であっても、配列cの宣言サイズが静的に明示されていれば、「セクタ機能付きキャッシュメモリシステムにおけるローカルメモリ方式」は、実行可能である。
Here, when the access width (size) of the array c is less than or equal to the size 512 KB of the
また、「セクタ機能付きキャッシュメモリシステムにおける準ローカルメモリ方式」とは、ローカルメモリとするセクタ番号のキャッシュメモリに割り当てる再利用性のある配列のアクセスサイズが不明の場合に用いられる方式のことである。「セクタ機能付きキャッシュメモリシステムにおける準ローカルメモリ方式」では、「セクタ機能付きキャッシュメモリシステムにおけるローカルメモリ方式」と同様に、セクタ0とセクタ1の最大ウェイ数の和がシステムの最大ウェイ数となる分割比が指定される。
The “quasi-local memory method in the cache memory system with a sector function” is a method used when the access size of the reusable array allocated to the cache memory having the sector number as the local memory is unknown. . In the “quasi-local memory system in the cache memory system with the sector function”, the sum of the maximum number of ways of the
例えば、図1の(A)に示すソースプログラムでは、配列cのアクセスサイズも宣言サイズも不明である。「セクタ機能付きキャッシュメモリシステムにおける準ローカルメモリ方式」を用いる場合に、例えば、図2の(C)に示すようなセクタ分割を行う。すなわち、再利用性のある配列cのアクセスサイズが不明の場合、例えば、図2の(C)に示すように、システムの最大ウェイ数が「10」である場合、セクタ0の最大ウェイ数は、「6」とされ、セクタ1の最大ウェイ数は、「10」から「6」を差し引いた「4」とされる。すなわち、図2の(C)に示すセクタ分割比は、配列cのアクセスサイズが不明のため、図2の(B)に示すローカルメモリ方式と比較して、セクタ1の最大ウェイ数に余裕を持たせるように指定されている。
For example, in the source program shown in FIG. 1A, the access size and declaration size of the array c are unknown. When the “quasi-local memory method in the cache memory system with a sector function” is used, for example, sector division as shown in FIG. That is, when the access size of the reusable array c is unknown, for example, as shown in FIG. 2C, when the maximum number of ways of the system is “10”, the maximum number of ways of
しかしながら、「セクタ機能付きキャッシュメモリシステムにおける準ローカルメモリ方式」では、以下に示す2つの課題がある。第一の課題は、再利用性のある配列のアクセス幅が不明なため、再利用性のある配列を割り当てたセクタ1内にてLRU方式により、キャッシュコンフリクトを起こす可能性があることである。また、第二の課題は、キャッシュコンフリクトを懸念して、セクタ1の最大ウェイ数を増やすと、セクタ0の最大ウェイ数が減るため、ストリームデータのオンキャッシュ率が低下することである。
However, the “semi-local memory system in the cache memory system with a sector function” has the following two problems. The first problem is that, since the access width of a reusable array is unknown, there is a possibility of causing a cache conflict in the
このような2つの課題があるため、「セクタ機能付きキャッシュメモリシステムにおける準ローカルメモリ方式」では、例えば、PA(パフォーマンス・アナライザ)ツールによって収集したPA情報に基づいて、セクタ分割比を決定する必要がある。このため、プログラマは、デフォルトではなくオプショナルの動作とするなどの工夫が必要となり、「セクタ機能付きキャッシュメモリシステム」を容易に用いることができない場合がある。すなわち、自動的にセクタ分割比と有効範囲(開始位置と終了位置)とを決め、メモリアクセスデータごとのセクタ番号を設定できるコンパイラ装置が無いため、プログラマは、セクタ機能付きキャッシュメモリを有効に活用することができない。 Because of these two problems, in the “semi-local memory method in the cache memory system with sector function”, for example, it is necessary to determine the sector division ratio based on PA information collected by a PA (performance analyzer) tool. There is. For this reason, the programmer needs to devise such as an optional operation instead of the default, and the “cache memory system with sector function” may not be easily used. In other words, since there is no compiler device that can automatically determine the sector division ratio and effective range (start position and end position) and set the sector number for each memory access data, programmers can effectively use the cache memory with sector function Can not do it.
そこで、本実施例におけるコンパイラ装置は、以下、図3を用いて説明するようなセクタ分割処理を実行する。なお、図3は、実施例1におけるコンパイラ装置によるセクタ分割処理の概念を説明するための図である。 Therefore, the compiler apparatus according to the present embodiment executes sector division processing as described below with reference to FIG. FIG. 3 is a diagram for explaining the concept of sector division processing by the compiler apparatus according to the first embodiment.
図3に示すように、本実施例におけるコンパイラ装置は、ループ内のデータのアクセス方法、ループ内で用いられるデータ配列のサイズ、キャッシュメモリのウェイ数、キャッシュメモリのサイズなど様々な要因(要因1〜n)を解析する。そして、本実施例におけるコンパイラ装置は、図3に示すように、解析結果である各要因をパラメタとして、セクタ分割比、セクタ分割比有効範囲(開始位置および終了位置)および各データのセクタ番号を決定する決定関数に入力する。 As shown in FIG. 3, the compiler apparatus according to the present embodiment has various factors (factor 1) such as the data access method in the loop, the size of the data array used in the loop, the number of ways of the cache memory, the size of the cache memory ~ N) is analyzed. Then, as shown in FIG. 3, the compiler apparatus according to the present embodiment uses the respective factors as analysis results as parameters to set the sector division ratio, the effective range of the sector division ratio (start position and end position), and the sector number of each data. Enter the decision function to be determined.
決定関数の出力結果から、本実施例におけるコンパイラ装置は、図3に示すように、セクタ分割比、セクタ分割比有効範囲および各データのセクタ番号を決定し、ソースプログラムにセクタ分割命令の挿入およびメモリアクセス命令へのセクタ番号付加の最適化処理を実行する。なお、本実施例におけるコンパイラ装置は、ソースプログラムごとに解析した新しい要因に応じて、決定関数を変更する。 From the output result of the decision function, the compiler apparatus according to the present embodiment determines the sector division ratio, the sector division ratio effective range, and the sector number of each data, as shown in FIG. An optimization process for adding a sector number to a memory access instruction is executed. Note that the compiler apparatus according to the present embodiment changes the decision function according to a new factor analyzed for each source program.
次に、本実施例におけるコンパイラ装置の構成について、図4を用いて説明する。図4は、実施例1におけるコンパイラ装置の構成を示すブロック図である。 Next, the configuration of the compiler apparatus in this embodiment will be described with reference to FIG. FIG. 4 is a block diagram illustrating the configuration of the compiler apparatus according to the first embodiment.
図4に示すように、実施例1におけるコンパイラ装置10は、ソースプログラム入力部11と、オブジェクトファイル出力部12と、通信部13と、入出力制御I/F部14と、記憶部20と、処理部30とを有する。また、本実施例におけるコンパイラ装置10は、図2に示すように、情報処理装置40と接続される。
As shown in FIG. 4, the
情報処理装置40は、「セクタ機能付きキャッシュメモリ」を搭載し、コンパイラ装置10から出力されたオブジェクトファイルを実行する計算機である。なお、本実施例では、コンパイラ装置10と情報処理装置40とが独立した装置である場合について説明するが、本実施例はこれに限定されるものではなく、コンパイラ装置10が情報処理装置40に組み込まれている場合であってもよい。
The information processing apparatus 40 is a computer that has a “cache memory with sector function” and executes the object file output from the
ソースプログラム入力部11は、プログラマが作成したソースプログラムを受け付け、オブジェクトファイル出力部12は、処理部30により生成されたオブジェクトファイルを、情報処理装置40に出力する。通信部13は、情報処理装置40から後述するアーキデータを受信する。
The source
通信部13は、情報処理装置40から後述するアーキデータを受信する。 The communication unit 13 receives archedata described later from the information processing apparatus 40.
入出力部I/F部14は、ソースプログラム入力部11、オブジェクトファイル出力部12および通信部13と、記憶部20および処理部30との間におけるデータ転送を制御する。
The input / output unit I / F unit 14 controls data transfer among the source
記憶部20は、ソースプログラム入力部11が受け付けたソースプログラムや後述する処理部15による各種処理結果を記憶する。ここで、記憶部20は、特に本実施例に密接に関連するものとして、図4に示すように、ソースプログラム記憶部21と、ソース解析結果記憶部22と、アーキデータ記憶部23と、最適化結果報記憶部24とを有する。
The
ソースプログラム記憶部21は、ソースプログラム入力部11が受け付けたソースプログラムを記憶する。例えば、ソースプログラム記憶部21は、図5の(A)、(B)および(C)に示すようなソースプログラムを記憶する。図5は、実施例1におけるソースプログラム記憶部を説明するための図である。
The source program storage unit 21 stores the source program received by the source
なお、図5に示す3種類のソースプログラムについては、後に詳細に説明する。 Note that the three types of source programs shown in FIG. 5 will be described in detail later.
ソース解析結果記憶部22は、後述するソース解析部31がソースプログラムをコンパイラ装置10が扱うことが可能となる言語表現に変換した中間言語テキストを記憶する。
The source analysis
アーキデータ記憶部23は、通信部13が受信した情報処理装置40のハードウェア情報としてのアーキデータを記憶する。アーキデータは、情報処理装置40に搭載されるキャッシュメモリのサイズ、キャッシュウェイ数およびキャッシュセクタ数の情報のことである。例えば、アーキデータ記憶部23は、図6に示すように、情報処理装置40の2次キャッシュメモリのアーキデータとして、キャッシュサイズが「5MB」であり、キャッシュウェイ数が「10WAY」であり、キャッシュセクタ数が「2」であるとする情報を記憶する。なお、キャッシュウェイ数は、システムの最大ウェイ数であり、キャッシュセクタ数は、セクタ分割数である。
The archi
最適化結果記憶部24は、後述する最適化部32の処理結果を記憶する。なお、最適化結果記憶部24が記憶する内容については、後に詳述する。
The optimization
処理部30は、入出力部I/F部14から転送されたソースプログラムがソースプログラム記憶部21に格納された際に、各種処理を実行する。ここで、処理部30は、特に本実施例に密接に関連するものとして、図4に示すように、ソース解析部31と、最適化部32と、ファイル生成部33とを有する。
The
ここで、実施例1におけるコンパイラ装置10が、図4に示すソース解析部31と、最適化部32と、ファイル生成部33とを用いて実行する処理全体の大まかな流れについて、図7を用いて説明する。なお、図7は、実施例1におけるコンパイラ装置の全体処理を説明するためのフローチャートである。
Here, FIG. 7 is used as a rough flow of the entire processing executed by the
図7に示すように、ソース解析部31は、ソースプログラムが入力されると(ステップS101肯定)、ソースプログラム記憶部21が記憶するソースプログラムを中間言語ファイルに変換するソース解析を行なう(ステップS102)。 As shown in FIG. 7, when a source program is input (Yes in step S101), the source analysis unit 31 performs source analysis for converting the source program stored in the source program storage unit 21 into an intermediate language file (step S102). ).
そして、最適化部32は、中間言語ファイルとアーキデータとに基づいて、図3を用いて説明したセクタ分割処理により最適化処理を行なう(ステップS103)。
Then, the
そののち、ファイル生成部33は、最適化部32が最適化処理を行なった中間言語ファイルからオブジェクトファイルを生成してオブジェクトファイル出力部12に出力し(ステップS104)、実施例1におけるコンパイラ装置10は、処理を終了する。
After that, the
ここで、図7に示した最適化部32によるステップS103の処理について、図8〜図12のフローチャートを用いて詳細に説明する。なお、図8は、図7に示した最適化部の全体処理を説明するためのフローチャートであり、図9は、図8に示したセクタ分割比、セクタ分割比有効範囲およびセクタ番号の決定処理を説明するためのフローチャートである。また、図10は、図9に示したセクタ分割比有効範囲の決定処理を説明するためのフローチャートであり、図11は、図9に示した再利用性のあるメモリアクセスデータとして扱うデータ集合および必要ウェイ数の決定処理を説明するためのフローチャートである。また、図12は、図9に示したストリームデータとして扱うデータ集合および必要ウェイ数の決定処理を説明するためのフローチャートである。
Here, the process of step S103 performed by the
図8に示すように、実施例1における最適化部32は、アーキデータおよび中間言語テキストが格納されると(ステップS201肯定)、セクタ分割比、セクタ分割比有効範囲および各データのセクタ番号を決定する(ステップS202)。ここで、プログラム内のループには複雑な多重ループもあるので、最適化部32は、プログラム内の各ループに対して、ループ制御変数に依存した配列があるかどうかと、ユーザ手続きがあるかどうかとを判別して、キャッシュ分割命令を挿入するループを最初に決定する。
As shown in FIG. 8, the
具体的には、図9に示すように、最適化部32は、まず、セクタ分割比有効範囲(ループ集合LSET)の決定を行なう(ステップS301)。
Specifically, as shown in FIG. 9, the
より具体的には、図10に示すように、最適化部32は、中間言語テキスト内の全ループを検索し(ステップS401)、処理対象のループL内にループ制御変数に依存する配列がないか、または、ユーザ手続き(関数)があるかを判定する(ステップS402)。
More specifically, as shown in FIG. 10, the
ループL内において、ループ制御変数に依存する配列があり、かつ、ユーザ手続き(関数)がない場合(ステップS402否定)、最適化部32は、セクタ分割比有効範囲(ループ集合LSET)にループLを登録する(ステップS403)。
If there is an array that depends on the loop control variable in the loop L and there is no user procedure (function) (No in step S402), the
一方、ループL内においてループ制御変数に依存する配列がない場合、または、ループL内においてユーザ手続き(関数)がある場合(ステップS402肯定)、最適化部32は、ループLを処理対象外とする。
On the other hand, when there is no array that depends on the loop control variable in the loop L, or when there is a user procedure (function) in the loop L (Yes in step S402), the
そして、最適化部32は、ステップS401にて検索した全ループを処理したか否かを判定し(ステップS404)、未処理のループがある場合(ステップS404否定)、ステップS402に戻って、次のループに対する処理を行なう。
Then, the
一方、ステップS401にて検索した全ループを処理していた場合(ステップS404肯定)、登録されたループの集合であるセクタ分割比有効範囲(ループ集合LSET)を決定し(ステップS405)、図9のステップS302の処理に移行する。 On the other hand, if all loops searched in step S401 have been processed (Yes in step S404), a sector division ratio effective range (loop set LSET) that is a set of registered loops is determined (step S405), and FIG. The process proceeds to step S302.
図9に戻って、最適化部32は、決定したループ集合LSET内のループに対して、1つずつ処理を開始し(ステップS302)、ループ内のすべての配列サイズが静的に分かり、キャッシュサイズより小さいか否かを判定する(ステップS303)。
Returning to FIG. 9, the optimizing
ループ内のすべての配列サイズが静的に分かり、かつ、すべての配列サイズがキャッシュサイズより小さい場合(ステップS303肯定)、最適化部32は、セクタ利用なしと判定して、LRU方式を採用すると決定する(ステップS310)。
When all the array sizes in the loop are statically known and all the array sizes are smaller than the cache size (Yes at Step S303), the
一方、配列サイズが静的に分からない配列がある、または、配列サイズがキャッシュサイズ以上である配列がある場合(ステップS303否定)、最適化部32は、再利用性のあるメモリアクセスデータとして扱うデータ集合(S)および必要ウェイ数(SW)の決定を行なう(ステップS304)。
On the other hand, when there is an array whose array size is not known statically or there is an array whose array size is equal to or larger than the cache size (No at Step S303), the
具体的には、図11に示すように、最適化部32は、ループ内の各データ(各データ配列)に対する処理を開始し(ステップS501)、再利用性のあるデータが「1」以上であるか否かを判定する(ステップS502)。
Specifically, as shown in FIG. 11, the
ループ内の再利用性のあるデータが「0」の場合(ステップS502否定)、最適化部32は、「S=NULL」および「SW=0」と決定する(ステップS511)。
When the reusable data in the loop is “0” (No at Step S502), the
一方、ループ内の再利用性のあるデータが「1」以上である場合(ステップS502肯定)、最適化部32は、ループ内の再利用性のあるデータが「1」であるか否かを判定する(ステップS503)。
On the other hand, when the reusable data in the loop is “1” or more (Yes in step S502), the
ループ内の再利用性のあるデータが「1」である場合(ステップS503肯定)、最適化部32は、「S」を決定し、SWを決定するためのSBを決定する(ステップS504)。すなわち、最適化部32は、1つの再利用性のあるデータを「S」として決定し、再利用性のあるデータのサイズが、アクセスサイズまたは宣言サイズで静的に分かるほうを「SB、単位:バイト」と決定する。ここで、最適化部32は、再利用性のあるデータのサイズが、アクセスサイズおよび宣言サイズの両方で静的に分かる場合、小さい値をSBとする。
If the reusable data in the loop is “1” (Yes at Step S503), the
一方、ループ内の再利用性のあるデータが「2」以上である場合(ステップS503否定)、最適化部32は、再利用性のある配列が連続領域に割付可能か否かを判定する(ステップ505)。例えば、最適化部32は、再利用性のある配列1および配列2の間に、別の再利用性の無い配列3が割り込まれるか否かを判定する。
On the other hand, when the reusable data in the loop is “2” or more (No in step S503), the
ここで、再利用性のある配列が連続領域に割付不可である場合(ステップ505否定)、最適化部32は、「S=NULL」および「SW=0」と決定する(ステップS511)。
Here, when a reusable array cannot be assigned to a continuous area (No at Step 505), the
一方、再利用性のある配列が連続領域に割付可能である場合(ステップ505肯定)、最適化部32は、再利用性のある2つ以上の配列の集合である「S」を決定し、SWを決定するためのSBを決定する(ステップS506)。なお、最適化部32は、再利用性のある配列のデータの宣言サイズを合計(SUM)することで、SBを決定する。
On the other hand, when a reusable array can be assigned to a continuous region (Yes in step 505), the
ステップS504およびステップS506により、SおよびSBが決定されると、最適化部32は、決定したSBが予め設定された下限閾値から上限閾値の範囲内にあるか否かを判定する(ステップS507)。
When S and SB are determined in steps S504 and S506, the
ここで、決定したSBが予め設定された下限閾値から上限閾値の範囲内にない場合(ステップS507否定)、最適化部32は、決定した集合Sを以降の処理に用いないとして、「S=NULL」および「SW=0」と決定する(ステップS511)。
Here, when the determined SB is not within the range from the preset lower limit threshold to the upper limit threshold (No at Step S507), the
一方、決定したSBが予め設定された下限閾値から上限閾値の範囲内にある場合(ステップS507肯定)、SBバイトが入るウェイ数をSWとして決定する(ステップS508)。 On the other hand, when the determined SB is within the range between the preset lower limit threshold value and the upper limit threshold value (Yes at Step S507), the number of ways into which the SB byte enters is determined as SW (Step S508).
さらに、最適化部32は、再利用性のあるデータ数比率(AR)を再利用性のあるデータ数を全データ数にて除することで算出し(ステップS509)、算出したARが予め設定された下限閾値から上限閾値の範囲内にあるか否かを判定する(ステップS510)。なお、ARに対して設定される閾値と、上述したSBに対して設定される閾値とは、異なる値である。
Further, the
ここで、算出したARが予め設定された下限閾値から上限閾値の範囲内にない場合(ステップS510否定)、最適化部32は、決定した集合Sを以降の処理に用いないとして、「S=NULL」および「SW=0」と決定する(ステップS511)。
Here, when the calculated AR is not within the range between the preset lower limit threshold value and the upper limit threshold value (No in step S510), the
一方、算出したARが予め設定された下限閾値から上限閾値の範囲内にある場合(ステップS510肯定)、最適化部32は、ステップS504またはステップS506で決定した集合SおよびステップS508で決定したSWを確定する(ステップS512)。
On the other hand, when the calculated AR is within the range from the preset lower limit threshold to the upper limit threshold (Yes at Step S510), the
そして、最適化部32は、ステップS511およびステップS512によりSおよびSWが確定したのち、ステップS305に移行する。
The
図9に戻って、最適化部32は、ステップS304(図11)の処理により決定された再利用性のあるメモリアクセスデータのデータ集合Sが空(NULL)であるか否かを判定する(ステップS305)。
Returning to FIG. 9, the optimizing
ここで、データ集合Sが空でない場合(ステップS305否定)、最適化部32は、ローカルメモリ方式の新アルゴリズムを生成すると決定する(ステップS307)。すなわち、最適化部32は、再利用性のあるデータを連続領域に割当てることができるので、ローカルメモリ方式を採用できると判断する。
If the data set S is not empty (No at Step S305), the
具体的には、最適化部32は、セクタ分割比有効範囲であるループLに対して、図6に示したキャッシュウェイ数「10」から、セクタ分割比を「セクタ番号0:セクタ番号1=10−SW:SW」と決定する。また、最適化部32は、データ集合Sに登録されたデータ配列をセクタ番号1に格納し、ループL内でデータ集合Sに含まれないデータ配列をセクタ番号0に格納すると決定する。なお、最適化部32は、各セクタに格納されたデータをLRU方式により順次新たなデータにより置換すると決定する。
Specifically, the optimizing
一方、データ集合Sが空である場合(ステップS305肯定)、最適化部32は、ストリームデータ(連続する隣接アクセスデータ)として扱うデータ集合(T)および必要ウェイ数(TW)の決定を行なう(ステップS306)。
On the other hand, when the data set S is empty (Yes at step S305), the
具体的には、図12に示すように、最適化部32は、ループ内の各データ(各データ配列)に対する処理を開始し(ステップS601)、ストリームデータがあるか否かを判定する(ステップS602)。
Specifically, as shown in FIG. 12, the
ループ内にストリームデータがない場合(ステップS602否定)、最適化部32は、「T=NULL」および「TW=0」と決定する(ステップS610)。
When there is no stream data in the loop (No at Step S602), the
一方、ループ内にストリームデータがある場合(ステップS602肯定)、最適化部32は、ループ内にストリームデータ以外のデータがあるか否かを判定する(ステップS603)。
On the other hand, when there is stream data in the loop (Yes in step S602), the
ここで、ループ内にストリームデータしかない場合(ステップS603否定)、最適化部32は、「T=NULL」および「TW=0」と決定する(ステップS610)。
If there is only stream data in the loop (No at step S603), the
一方、ループ内にストリームデータとストリームデータ以外のデータとが混在する場合(ステップS603肯定)、最適化部32は、「T」を決定し、TWを決定するためのTBを決定する(ステップS604)。すなわち、最適化部32は、ストリームデータの集合を「T」として決定し、ストリームデータの総アクセスサイズを回転数、または宣言サイズから最大アクセス幅を算出することで、TB(単位:バイト)を計算する。
On the other hand, when stream data and data other than stream data are mixed in the loop (Yes in step S603), the
ここで、TBが計算され、明らかとなった場合(ステップS605否定)、TBが予め設定された下限閾値から上限閾値の範囲内にあるか否かを判定する(ステップS606)。なお、TBに対して設定される閾値と、上述したSBに対して設定される閾値とは、異なる値であってもよいし、同一の値であってもよい。 Here, when TB is calculated and clarified (No in step S605), it is determined whether or not TB is within a range from a preset lower limit threshold to an upper limit threshold (step S606). The threshold value set for TB and the threshold value set for SB described above may be different values or the same value.
そして、TBが予め設定された下限閾値から上限閾値の範囲内にない場合(ステップS606否定)、最適化部32は、「T=NULL」および「TW=0」と決定する(ステップS610)。
If TB is not within the range from the preset lower limit threshold to the upper limit threshold (No at Step S606), the
一方、TBが計算されず、不明である場合(ステップS605肯定)、および、計算されたTBが予め設定された下限閾値から上限閾値の範囲内にある場合(ステップS606肯定)、最適化部32は、ストリームデータ数比率を算出する(ステップS607)。すなわち、最適化部32は、ストリームデータ数を全データ数にて除することでBRを算出する。
On the other hand, when the TB is not calculated and is unknown (Yes at Step S605), and when the calculated TB is within the range from the preset lower limit threshold to the upper limit threshold (Yes at Step S606), the
そして、最適化部32は、算出したBRが予め設定された下限閾値から上限閾値の範囲内にあるか否かを判定する(ステップS608)。なお、BRに対して設定される閾値と、上述したTBに対して設定される閾値とは、異なる値である。
Then, the
ここで、BRが予め設定された下限閾値から上限閾値の範囲内にない場合(ステップS608否定)、最適化部32は、決定した集合Tを以降の処理に用いないとして、「S=NULL」および「SW=0」と決定する(ステップS610)。
Here, when BR is not within the range from the preset lower limit threshold to the upper limit threshold (No at Step S608), the
一方、BRが予め設定された下限閾値から上限閾値の範囲内にある場合(ステップS608肯定)、最適化部32は、キャッシュメモリの総ウェイ数にARおよび予め設定した閾値を乗算することで、TWを算出する(ステップS609)。なお、TWを算出するために用いられる閾値は、プログラマにより任意に設定される。
On the other hand, when BR is within the range from the preset lower threshold to the upper threshold (Yes at Step S608), the
そして、最適化部32は、ステップS604で決定したTおよびステップS609で算出したTWを確定する(ステップS611)。
Then, the
続いて、最適化部32は、ステップS610およびステップS611によりTおよびTWが確定したのち、ステップS308に移行する。
Subsequently, the
図9に戻って、最適化部32は、ステップS306(図12)の処理により決定されたストリームデータとして扱うデータ集合Tが空(NULL)であるか否かを判定する(ステップS308)。
Returning to FIG. 9, the optimizing
ここで、データ集合Tが空であった場合(ステップS308肯定)、最適化部32は、セクタ利用なしと判定して、LRU方式を採用すると決定する(ステップS310)。
Here, when the data set T is empty (Yes at Step S308), the
一方、データ集合Tが空でない場合(ステップS308否定)、最適化部32は、最弱ウェイ方式の新アルゴリズムを生成すると決定する(ステップS309)。
On the other hand, when the data set T is not empty (No at Step S308), the
具体的には、最適化部32は、セクタ分割比有効範囲であるループLに対して、図6に示したキャッシュウェイ数「10」から、セクタ分割比を「セクタ番号0:セクタ番号1=10:TW」と決定する。また、最適化部32は、データ集合Tに登録されたデータ配列をセクタ番号1に格納し、ループL内でデータ集合Tに含まれないデータ配列をセクタ番号0に格納すると決定する。なお、最適化部32は、各セクタに格納されたデータをLRU方式により順次新たなデータにより置換すると決定する。
Specifically, the optimizing
そして、ステップS307、ステップS309、または、ステップS310のいずれかの決定を行なったのち、最適化部32は、図8に示すステップS203の処理に移行する。
Then, after making any determination of step S307, step S309, or step S310, the
ここで、図9において決定された3種類のパターンについて、図13を用いて具体的に説明する。図13は、図9に示した3種類の決定パターンを説明するための図である。 Here, the three types of patterns determined in FIG. 9 will be specifically described with reference to FIG. FIG. 13 is a diagram for explaining the three types of determination patterns shown in FIG.
図5の(A)に示すソースプログラムが格納された場合、最適化部32は、図13の(A)に示すように、セクタ分割比有効範囲を「do J」と決定し、データ集合Sの要素を配列cと決定する。また、最適化部32は、配列cの宣言サイズから算出されたSBが閾値範囲内にあり、ARが閾値範囲内にあることから、SBバイトを1ウェイのバイト数で除することで、例えば、「SW=1」と決定する。そして、図6に示したキャッシュウェイ数「10」から、最適化部32は、図13の(A)に示すように、ローカルメモリ方式により、セクタ分割比を「セクタ番号0:セクタ番号1=9:1」と決定する。また、最適化部32は、データ集合Sに登録された配列cをセクタ番号1に格納し、ループL内でデータ集合Sに含まれない配列aおよびbをセクタ番号0に格納すると決定する。
When the source program shown in FIG. 5A is stored, the
図5の(B)に示すソースプログラムが格納された場合、最適化部32は、図13の(B)に示すように、セクタ分割比有効範囲を「do J」と決定し、データ集合Sが空であると決定する。さらに、最適化部32は、連続する隣接アクセスデータである配列aを要素とするデータ集合Tを決定する。また、最適化部32は、TBが不明である配列aのBRが閾値範囲内であることから、総ウェイ数(キャッシュウェイ数)とBRと閾値とを乗算することで、「TW=5」と決定する。そして、図6に示したキャッシュウェイ数「10」から、最適化部32は、図13の(B)に示すように、最弱ウェイ方式により、セクタ分割比を「セクタ番号0:セクタ番号1=10:5」と決定する。また、最適化部32は、データ集合Tに登録された配列aをセクタ番号1に格納し、ループL内でデータ集合Tに含まれない配列cおよびbをセクタ番号0に格納すると決定する。
When the source program shown in FIG. 5B is stored, the
図5の(C)に示すソースプログラムが格納された場合、最適化部32は、ループ内のすべての配列サイズが明らかであり、キャッシュサイズより小さいことから、図13の(C)に示すように、「セクタ分割データはなし」として、LRU方式を採用すると決定する。
When the source program shown in (C) of FIG. 5 is stored, the
図8に戻って、最適化部32は、図9の処理ののち、決定したセクタ分割処理に応じて、セクタ分割命令の挿入およびメモリアクセス命令へのセクタ番号付加を行ない(ステップS203)、最適化処理を終了する。
Returning to FIG. 8, the
すなわち、最適化部32は、決定したセクタ分割比制御範囲、セクタ分割比、データごとのセクタ番号にしたがって、セクタ分割命令の挿入やセクタ番号の付加を行なって、例えば、図14に示すような処理結果を最適化結果記憶部24に格納する。図14は、最適化結果記憶部を説明するための図である。
That is, the
例えば、最適化部32は、図14の左側に示すループL1の前後がセクタ分割比有効範囲である場合、ローカルメモリ方式のセクタ分割比(9:1)で分割を指示する命令を挿入する。さらに、最適化部32は、図14に示すように、ループL1の後ろで、通常のLRU方式に戻す命令を挿入する。また、最適化部32は、図14に示すように、セクタ分割比有効範囲内の「load, store 」命令に対して、使用するセクタ番号(sector0, sector1)を指定する。そして、最適化部32は、図14の右側に示すデータを、最適化結果記憶部24に格納する。なお、セクタ番号を指定する命令は、プリフェッチ命令である「prefetch」である場合であってもよい。
For example, when the loop division L1 shown on the left side of FIG. 14 is within the effective range of the sector division ratio, the
そして、ステップS203(図8)にて最適化部32の処理が終了すると、ファイル生成部33は、ステップS104(図7)にて、オブジェクトファイルを生成する。
Then, when the process of the
上述してきたように、実施例1によれば、最適化部32は、セクタ機能付きのキャッシュメモリを搭載する情報処理装置40にて実行されるソースプログラムからソース解析部31が変換した中間言語テキストを解析する。具体的には、最適化部32は、各ループにおいて処理されるデータ配列の集合であるデータ集合のループ処理実行時における再利用性の有無を判定する。そして、最適化部32は、再利用性の有無を判定したデータ集合を格納するために要するウェイ数とシステムの最大ウェイ数とから、セクタ分割比と、セクタ番号とを決定する。そして、最適化部32は、セクタ分割比およびセクタ番号が決定されたループにおいて、セクタ分割命令およびメモリアクセス命令へのセクタ番号を付加した命令文を挿入する。そして、ファイル生成部33は、命令文が挿入された中間言語テキストからオブジェクトファイルを生成する。
As described above, according to the first embodiment, the
したがって、コンパイラ装置10において自動的にセクタ分割比とセクタ分割比有効範囲とセクタ番号と決定することができ、キャッシュメモリ、特にセクタ機能付きキャッシュメモリを有効的に利用することによりプログラムの実行性能を向上することが可能となる。また、再利用性のあるデータのアクセスサイズが分からない場合であっても、自動的にセクタ分割比およびセクタ番号を自動的に決定することができ、プログラマの負担を軽減して、セクタ機能付きキャッシュメモリを有効的に利用することが可能となる。
Therefore, the
また、実施例1では、最適化部32は、再利用性有りであり連続割り付け可能として判定したデータ集合について、ローカルメモリ方式によりセクタ分割比とセクタ番号とを決定する。これにより、再利用性のあるデータが、再利用性のあるデータ以外のデータによりLRU方式によりキャッシュメモリから追い出されることを防止でき、セクタ機能付きキャッシュメモリをより有効的に利用することが可能となる。
In the first embodiment, the
また、実施例1では、最適化部32は、再利用性有りのデータ配列がなかったループにて再利用性の無いストリームデータ(連続する隣接アクセスデータ)として判定されるデータ集合が存在する場合、ストリームデータとして判定したデータ集合について、最弱ウェイ方式によりセクタ分割比とセクタ番号とを決定する。これにより、再利用性のあるデータがキャッシュラインのコンフリクトにより、予定外にキャッシュメモリから追い出されることを防ぐことができ、セクタ機能付きキャッシュメモリをさらに有効的に利用することが可能となる。
Further, in the first embodiment, the
なお、本実施例では、図11に示したように、再利用性のあるデータ配列が連続領域に割り付け不可であった場合、Sを「NULL」と決定する場合について説明したが、本実施例はこれに限定されるものではない。例えば、最適化部32は、再利用性のあるデータ配列1、2および3のうち、データ配列1および2が連続領域に割り付け可能であった場合、データ配列1および2をSとしてステップS506以降の処理を実行してもよい。
In the present embodiment, as shown in FIG. 11, the case where S is determined to be “NULL” when a reusable data array cannot be allocated to a continuous area has been described. Is not limited to this. For example, if the
上述した実施例1では、セクタ分割比がコンパイラ装置10により自動的に決定される場合について説明したが、実施例2では、セクタ分割比がプログラマにより指定される場合について説明する。
In the first embodiment described above, the case where the sector division ratio is automatically determined by the
実施例2におけるコンパイラ装置10は、図4を用いて説明した実施例1におけるコンパイラ装置10と同様の構成となる。しかし、実施例2においては、ソースプログラム入力部11が受け付けるソースプログラムの内容と、ソース解析部31および最適化部32の処理内容とが実施例1と異なる。以下、これらを中心に説明する。
The
実施例2においては、キャッシュメモリのセクタ分割をアセンブラ表記レベルでなく、ソースプログラムの表記レベルでプログラマが指定でき、かつ、コンパイラ装置10が理解できるキャッシュ制御文が用いられる。実施例2において用いられるキャッシュ制御文の一例について、図15を用いて説明する。なお、以下に説明するキャッシュ制御文は、あくまでも一例であり、プログラマが指定したセクタ分割比をコンパイラ装置10が解読可能な形式であるならば、如何なる形式であってもよい。
In the second embodiment, a cache control statement that allows the programmer to specify the sector division of the cache memory not at the assembler notation level but at the source program notation level and that can be understood by the
まず、キャッシュ制御文では、「!ocl sector_cache_begin」が、セクタ制御の開始を意味する制御文として用いられる(図15の(1)参照)。なお、「!ocl」という表記は、一般的に最適化制御行と呼ばれるコンパイラに指示を与える制御文であり、多くのベンダでサポートされている。すなわち、図15に示すキャッシュ制御文では、「!ocl」により、セクタ指定が行なわれている。 First, in the cache control statement, “! Ocl sector_cache_begin” is used as a control statement meaning the start of sector control (see (1) in FIG. 15). The notation “! Ocl” is a control statement that gives instructions to the compiler, generally called an optimization control line, and is supported by many vendors. That is, in the cache control statement shown in FIG. 15, the sector is specified by “! Ocl”.
また、キャッシュ制御文では、「!ocl sector0_max(m), sector1_max(n)」により、セクタ分割比が、セクタ番号とともに指示される(図15の(2)参照)。ここで、図15の(2)では、セクタ0の最大ウェイ数がm個であり、セクタ1の最大ウェイ数がn個であることが指定されている。ここで、実施例2におけるコンパイラ装置10は、キャッシュ方式判定ルールとして、「m+n」がシステムの最大ウェイ数と同じであるならば、ローカルメモリ方式をプログラマが指定していると判定する。また、実施例2におけるコンパイラ装置10は、キャッシュ方式判定ルールとして、「m+n」がシステムの最大ウェイ数より大きいならば最弱ウェイ方式をプログラマが指定していると判定する。
In the cache control statement, the sector division ratio is indicated together with the sector number by “! Ocl sector0_max (m), sector1_max (n)” (see (2) in FIG. 15). Here, in (2) of FIG. 15, it is specified that the maximum number of ways in
また、キャッシュ制御文では、「!ocl sector0(array1), sector1(array2, array3)」により、セクタ番号ごとに格納されるデータの配列名が指定される(図15の(3)参照)。ここで、図15の(3)では、array1がセクタ0に割り当てる配列であり、array2およびarray3がセクタ1に割り当てる配列であるとして指定されている。
In the cache control statement, “! Ocl sector0 (array1), sector1 (array2, array3)” designates the array name of data stored for each sector number (see (3) in FIG. 15). Here, in (3) of FIG. 15, array1 is designated as an array assigned to
なお、図15の(3)に示すように、配列指定は、コンパイラ(コンパイル装置10)に委ねることも可能である。ここで、コンパイラは、キャッシュ方式が最弱ウェイ方式と判定されたならば、セクタ1にストリームデータを割り当て、セクタ0にループ内のストリームデータ以外のデータを割り当てると判断する。また、コンパイラは、キャッシュ方式がローカルメモリ方式と判定されたならば、セクタ1に再利用性のあるデータを割り当て、セクタ0にループ内の再利用性のあるデータ以外のデータを割り当てると判断する。なお、再利用性のあるデータおよびストリームデータの判定は、実施例1で説明した方法と同様に行なう。
As shown in (3) of FIG. 15, it is possible to leave the array designation to the compiler (compile device 10). Here, if it is determined that the cache method is the weakest way method, the compiler determines that stream data is allocated to
また、キャッシュ制御文では、「!ocl sector_cache_end」が、セクタ制御の終了を意味する制御文として用いられる(図15の(4)参照)。すなわち、「!ocl sector_cache_begin」および「!ocl sector_cache_end」により、実施例1で説明したセクタ分割比有効範囲の指定が、プログラマにより決定される。なお、以下では、実施例1で用いたセクタ分割比有効範囲に代わりに、制御開始位置から制御終了位置までを制御エリアと呼ぶ。 In the cache control statement, “! Ocl sector_cache_end” is used as a control statement meaning the end of sector control (see (4) in FIG. 15). That is, the designation of the sector division ratio effective range described in the first embodiment is determined by the programmer based on “! Ocl sector_cache_begin” and “! Ocl sector_cache_end”. In the following description, the area from the control start position to the control end position is referred to as a control area instead of the sector division ratio effective range used in the first embodiment.
また、キャッシュ制御文では、「!ocl loop sector_cache」が、「!ocl sector_cache_begin」および「!ocl sector_cache_end」による制御エリア指定の代わりに、後続するループに対して指示できる制御文として用いられてもよい(図15の(5)参照)。 Also, in the cache control statement, “! Ocl loop sector_cache” may be used as a control statement that can be instructed to the subsequent loop instead of specifying the control area by “! Ocl sector_cache_begin” and “! Ocl sector_cache_end”. (See (5) in FIG. 15).
また、キャッシュ制御文では、上記したルールの他に、図15に示すように、「セクタの入れ子は許さない」とするルールや、「sector_cache_beginからsector_cache_endに必ず到達する」とするルールが採用される。 In addition to the rules described above, in the cache control statement, as shown in FIG. 15, a rule that “nesting of sectors is not allowed” or a rule that “sector_cache_end must be reached from sector_cache_begin” is adopted. .
ここで、図16〜図20を用いて、図15に示したキャッシュ制御文による様々なセクタ分割の指定例について説明する。なお、図16は、最弱ウェイ方式によるセクタ分割の指定例を説明するための図であり、図17は、ローカルメモリ方式によるセクタ分割の指定例を説明するための図である。また、図18は、最弱ウェイ方式およびローカルメモリ方式によるセクタ分割の指定例を説明するための図であり、図19は、制御エリア指定の変形例を説明するための図である。また、図20は、準ローカルメモリ方式によるセクタ分割の指定例を説明するための図である。 Here, various sector division designation examples by the cache control statement shown in FIG. 15 will be described with reference to FIGS. FIG. 16 is a diagram for explaining an example of designation of sector division by the weakest way method, and FIG. 17 is a diagram for explaining an example of designation of sector division by the local memory method. FIG. 18 is a diagram for explaining a specification example of sector division by the weakest way method and the local memory method, and FIG. 19 is a diagram for explaining a modification example of control area specification. FIG. 20 is a diagram for explaining an example of designation of sector division by the quasi-local memory method.
また、図16以降に示す指定例では、セクタ数が「2」であり、システムの最大ウェイ数が「10」であるとして説明する。 In the designation examples shown in FIG. 16 and subsequent figures, it is assumed that the number of sectors is “2” and the maximum number of ways of the system is “10”.
図16に示すキャッシュ制御文では、再利用性のないストリームデータ(配列aおよびb)を5ウェイのセクタ1に格納し、ストリームデータ以外の再利用性があるデータを含むデータ(配列c)を10ウェイのセクタ0に格納することが指定されている。ここで、コンパイラ装置10は、「10+5>10」であることから、最弱ウェイ方式が指定されていると判定する。すなわち、プログラマは、再利用性のあるデータ(配列c)がキャッシュメモリから追い出される確率を低くするように指定している。
In the cache control statement shown in FIG. 16, non-reusable stream data (arrays a and b) is stored in the 5-
次に、図17に示すキャッシュ制御文では、再利用性のあるデータ(配列c)を1ウェイのセクタ1に格納し、再利用性のあるデータ以外のデータ(配列aおよびb)を9ウェイのセクタ0に格納することが指定されている。ここで、コンパイラ装置10は、「1+9=10」であることから、ローカルメモリ方式が指定されていると判定する。すなわち、プログラマは、再利用性のあるデータ(配列c)がキャッシュラインのコンフリクトにより、予定外にキャッシュメモリから追い出されることを完璧に防ぐことができる。
Next, in the cache control statement shown in FIG. 17, reusable data (array c) is stored in
次に、図18に示すキャッシュ制御文では、セクタ機能付きキャッシュメモリシステムの特性を活用するために、ループごとにセクタ分割比を指定して、最弱ウェイ方式とローカルメモリ方式とが併用されている。 Next, in the cache control statement shown in FIG. 18, in order to utilize the characteristics of the cache memory system with the sector function, the sector division ratio is designated for each loop, and the weakest way method and the local memory method are used together. Yes.
すなわち、図18に示すように、あるループでは、再利用性のあるデータ(配列c)を1ウェイのセクタ1に格納し、再利用性のあるデータ以外のデータ(配列aおよびb)を9ウェイのセクタ0に格納するローカルウェイ方式が指定されている。また、図18に示すように、別のループでは、ストリームデータ(配列d)を5ウェイのセクタ1に格納する最弱ウェイ方式が指定されている。
That is, as shown in FIG. 18, in a certain loop, reusable data (array c) is stored in
次に、図19に示すキャッシュ制御文では、上述した制御エリア指定の変形例を示している。すなわち、図19に示す例では、「!ocl sector_cache_begin」および「!ocl sector_cache_end」の代わりに、「!ocl loop sector_cache」を用いてループごとにセクタ分割比とセクタ番号を指示している。一般的に、データの再利用性の有無は、ループのDO制御変数を判定対象とすることが多い。つまり、プログラマにとっては、ループに着目した制御エリア指定が簡易にできる方が使い勝手が良いため、本実施例では、「!ocl loop sector_cache」という指定も可能としている。 Next, the cache control statement shown in FIG. 19 shows a modified example of the control area designation described above. That is, in the example shown in FIG. 19, “! Ocl loop sector_cache” is used instead of “! Ocl sector_cache_begin” and “! Ocl sector_cache_end” to indicate the sector division ratio and sector number for each loop. In general, the presence or absence of data reusability is often determined based on the DO control variable of the loop. That is, for the programmer, it is easier to specify a control area that focuses on the loop, so that it is easier to use. In this embodiment, it is possible to specify “! Ocl loop sector_cache”.
なお、ローカルメモリ方式を指定する場合、図17および図18に示すように、ローカルメモリ方式を指定する先頭の最内ループの回転数が静的に判明していることは、必須ではない。例えば、回転数が変数であってもプログラマが、変数の取りうる最大値を知っているのであれば、ローカルメモリ方式によるセクタ分割は、可能である。例えば、プリグラマは、実際の実行モジュールに対してPA(パフォーマンス・アナライザ)ツールを使うことにより、変数の取りうる最大値を取得する。 When the local memory system is designated, it is not essential that the rotation speed of the innermost loop for designating the local memory system is statically known as shown in FIGS. For example, even if the rotational speed is a variable, if the programmer knows the maximum value that the variable can take, sector division by the local memory method is possible. For example, the grammar uses the PA (performance analyzer) tool for the actual execution module to obtain the maximum possible value of the variable.
ここで、図20に示すキャッシュ制御文は、再利用性のある配列のサイズが不明な配列cに対して、「6:4」と、セクタ分割比としてはローカルメモリ方式を適用した準ローカルメモリ方式の指定例を示している。しかし、準ローカルメモリ方式では、サイズが不明な配列cに関しては、セクタ1のキャッシュラインのコンフリクトを完全に防ぐことはできない可能性がある。また、準ローカルメモリ方式では、サイズの不明な配列cに対して、セクタ1のウェイ数を余分に取り過ぎてしまう可能性があるため、残りのデータを格納するウェイ数が減り、プログラムの実行性能が低下してしまう場合もある。
Here, the cache control statement shown in FIG. 20 is “6: 4” for the array c whose reusable array size is unknown, and a quasi-local memory to which the local memory method is applied as the sector division ratio. A method specification example is shown. However, in the quasi-local memory method, there is a possibility that the conflict of the cache line of
したがって、セクタ機能付きキャッシュメモリシステムに準ローカルメモリ方式を指定する場合、プログラマは、例えば、実行モジュールを一度実行させ、PA(パフォーマンス・アナライザ)ツールでキャッシュ情報を把握した上で、キャッシュ制御文を入れる。 Therefore, when specifying the quasi-local memory system for a cache memory system with a sector function, for example, the programmer executes the execution module once, grasps the cache information with a PA (performance analyzer) tool, and then executes the cache control statement. Put in.
以下、キャッシュ制御文が挿入されたソースプログラムが入力された場合の実施例2におけるコンパイラ装置10の処理について説明する。
Hereinafter, processing of the
実施例2におけるソース解析部31は、入力されたソースプログラムに記述されているキャッシュ制御文を解析し、解析結果をキャッシュ制御文データとして、上述した中間言語テキストとともにソース解析結果記憶部22に格納する。
The source analysis unit 31 in the second embodiment analyzes a cache control statement described in the input source program, and stores the analysis result as cache control statement data in the source analysis
例えば、ソース解析部31は、図16に示すソースプログラムのキャッシュ制御文を解析して、図21に示すように、「sector0_max」に「10」、「sector1_max」に「5」、「制御開始位置」に「10」を登録する。なお、図21は、実施例2におけるソース解析部を説明するための図である。 For example, the source analysis unit 31 analyzes the cache control statement of the source program shown in FIG. 16 and, as shown in FIG. 21, “10” for “sector0_max”, “5” for “sector1_max”, “control start position” "10" is registered. FIG. 21 is a diagram for explaining the source analysis unit according to the second embodiment.
さらに、ソース解析部31は、図21に示すように、セクタ0が指定された配列が1つであり、「sector0[0]」に「c」を登録する。また、ソース解析部31は、図21に示すように、セクタ1が指定された配列が2つであり、「sector1[0]」に「a」を、「sector1[1]」に「b」を登録する。さらに、ソース解析部31は、図21には示さないが、「制御終了位置」にも解析した値を登録する。
Furthermore, as illustrated in FIG. 21, the source analysis unit 31 has one array in which the
そして、実施例2における最適化部32は、キャッシュ制御文データを読込んで、制御開始位置にキャッシュ分割命令を挿入する。具体的には、実施例1で説明した図13のように、キャッシュ分割命令を挿入する。
Then, the
具体的には、最適化部32は、キャッシュ制御文データを読込んで、データの再利用性の解析を行って、セクタにおけるウェイの重複を許すか否かを判定する。そして、最適化部32は、制御エリア内のすべてのメモリアクセス命令(load, store, prefetch命令)に対し、各メモリアクセスのセクタ番号を決定する。ただし、最適化部32は、キャッシュ制御文データに既にセクタ指定が明示されている場合、セクタ指定に従う。
Specifically, the
より具体的には、実施例2における最適化部32は、図22に示す手順により、セクタ決定処理を実行する。なお、図22は、実施例2における最適化部のセクタ決定処理を説明するためのフローチャートである。
More specifically, the
図22に示すように、実施例2における最適化部32は、各データに対する処理を開始し(ステップS701)、キャッシュ制御文における「m+n」がシステムの最大ウェイ数以上であるか否かを判定する(ステップS702)。なお、最適化部32は、例えば、図21に示す「sector0_max」と「sector1_max」とを足しあわすとこで「m+n」を取得する。
As illustrated in FIG. 22, the
ここで、「m+n」がシステムの最大ウェイ数より小さい場合(ステップS702否定)、最適化部32は、セクタを指定しないと判定し(ステップS703)、処理を終了する。すなわち、最適化部32は、セクタに分割せずに、LRU方式にてデータの格納処理を実行すると判定する。
Here, when “m + n” is smaller than the maximum number of ways of the system (No at Step S702), the
一方、「m+n」がシステムの最大ウェイ数以上である場合(ステップS702肯定)、最適化部32は、キャッシュ制御文データにおいて、データのセクタ番号指定があるか否かを判定する(ステップS704)。すなわち、最適化部32は、キャッシュ制御文のデータ構造内で、セクタが指定された配列があるか否かを判定する。
On the other hand, when “m + n” is equal to or greater than the maximum number of ways of the system (Yes at Step S702), the
ここで、データのセクタ番号指定がある場合(ステップS704肯定)、最適化部32は、制御エリア内の全メモリアクセスに対し、セクタ番号を設定し、一部のデータ配列でセクタ番号指定がないものがあった場合、セクタ0に設定し(ステップS705)、処理を終了する。
If the data sector number is specified (Yes at step S704), the
一方、データのセクタ番号指定がない場合(ステップS704否定)、最適化部32は、メモリアクセスごとの添字解析による再利用性判定の結果、すべて再利用性のないストリームデータか否かを判定する(ステップS706)。具体的には、最適化部32は、添字を解析することで、ループ内のメモリアクセスがすべてDO制御変数に依存して隣接データを連続アクセスするストリームデータであるか否かを判定する。
On the other hand, when the sector number of the data is not specified (No in step S704), the
ここで、すべて再利用性のないストリームデータである場合(ステップS706肯定)、最適化部32は、セクタに分割せずに、LRU方式にてデータの格納処理を実行すると判定して、処理を終了する。
Here, when all the stream data is not reusable (Yes in step S706), the
一方、すべてのデータが、再利用性のないストリームデータでない場合(ステップS706否定)、最適化部32は、「m+n」がシステムの最大ウェイ数より大きいか否かを判定する(ステップS707)。
On the other hand, when all the data is not stream data having no reusability (No at Step S706), the
ここで、「m+n」がシステムの最大ウェイ数と同じ値である場合(ステップS707否定)、最適化部32は、再利用性のあるメモリアクセスをセクタ番号「1」とし、それ以外をセクタ番号「0」と指定して(ステップS708)、処理を終了する。すなわち、最適化部32は、ローカルメモリ方式にてセクタを分割すると判定する。
Here, when “m + n” is the same value as the maximum number of ways of the system (No in step S707), the
一方、「m+n」がシステムの最大ウェイ数より大きい場合(ステップS707肯定)、最適化部32は、再利用性の無いストリームデータのメモリアクセスをセクタ番号「1」とし、それ以外をセクタ番号「0」と指定して(ステップS709)、処理を終了する。すなわち、最適化部32は、最弱ウェイ方式にてセクタを分割すると判定する。なお、最適化部32は、データ配列の再利用性の有無およびデータ配列がストリームデータであるか否かの判定を、実施例1で説明した処理により、実行する。
On the other hand, when “m + n” is larger than the maximum number of ways of the system (Yes in step S707), the
これにより、実施例2における最適化部32は、制御開始位置にキャッシュ分割命令を挿入して、キャッシュ分割命令が挿入された中間言語テキストを、最適化結果記憶部24に格納する。ファイル生成部33は、キャッシュ分割命令が挿入された中間言語テキストからオブジェクトファイルを生成して、情報処理装置40に出力する。これにより、キャッシュ制御文が実行モジュールに反映され、情報処理装置40は、プログラマが意図した通りのキャッシュ制御を実行する。
Thereby, the
上述してきたように、実施例2によれば、最適化部32は、セクタ機能付きのキャッシュメモリに格納する際のセクタ分割比がプログラマによりキャッシュ制御文にてソースプログラムから、セクタ分割比が指定されたループにて用いられる配列データの再利用性の有無を判定する。そして、最適化部32は、データ配列の再利用性の有無とキャッシュ制御文のセクタ分割比とに基づいて、セクタ番号を決定して、セクタ分割命令およびメモリアクセス命令へのセクタ番号を付加した命令文を中間言語テキストに挿入する。
As described above, according to the second embodiment, the
したがって、キャッシュ制御文を解読可能なコンパイラ装置10を用いることにより、プログラマの意図に沿って、セクタ分割機能付きキャッシュメモリを有効的に利用することができ、プログラムの実行性能を向上させることが可能となる。
Therefore, by using the
また、実施例2では、最適化部32は、キャッシュ制御文にて指定されたセクタ分割比からローカルメモリ方式か最弱ウェイ方式かを自動的に判定してセクタ番号を自動的に決定するので、プログラマの負担を軽減することが可能となる。
In the second embodiment, the
なお、上記した実施例1および2において説明した各処理のうち、自動的におこなわれるものとして説明した処理の全部または一部を手動的におこなうこともできる(例えば、ハードウェア情報を、プログラマが手動で入力するなど)。あるいは、本実施例において説明した各処理のうち、手動的におこなわれるものとして説明した処理の全部または一部を公知の方法で自動的におこなうこともできる。この他、上記文書中や図面中で示した処理手順、制御手順、具体的名称、各種のデータやパラメータを含む情報(例えば、図15に示すキャッシュ制御文など)については、特記する場合を除いて任意に変更することができる。 Of the processes described in the first and second embodiments described above, all or a part of the processes described as being automatically performed can be manually performed (for example, the hardware information is stored by the programmer. Manually). Alternatively, among the processes described in the present embodiment, all or a part of the processes described as being performed manually can be automatically performed by a known method. In addition, the processing procedure, control procedure, specific name, and information including various data and parameters (for example, the cache control statement shown in FIG. 15) shown in the above-mentioned document and drawings are not specifically described. Can be changed arbitrarily.
また、図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部または一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的または物理的に分散・統合して構成することができる。さらに、各装置にて行なわれる各処理機能は、その全部または任意の一部が、CPUおよび当該CPUにて解析実行されるプログラムにて実現され、あるいは、ワイヤードロジックによるハードウェアとして実現され得る。 Each component of each illustrated device is functionally conceptual and does not necessarily need to be physically configured as illustrated. In other words, the specific form of distribution / integration of each device is not limited to that shown in the figure, and all or a part thereof may be functionally or physically distributed or arbitrarily distributed in arbitrary units according to various loads or usage conditions. Can be integrated and configured. Further, all or any part of each processing function performed in each device may be realized by a CPU and a program analyzed and executed by the CPU, or may be realized as hardware by wired logic.
ところで上記の実施例では、ハードウェアロジックによって各種の処理を実現する場合を説明したが、本発明はこれに限定されるものではなく、あらかじめ用意されたプログラムをコンピュータで実行するようにしてもよい。そこで以下では、図23を用いて、上記の実施例1に示したコンパイラ装置10と同様の機能を有するコンパイラプログラムを実行するコンピュータの一例を説明する。図23は、実施例1のコンパイラプログラムを実行するコンピュータを示す図である。
In the above embodiment, the case where various processes are realized by hardware logic has been described. However, the present invention is not limited to this, and a program prepared in advance may be executed by a computer. . Therefore, in the following, an example of a computer that executes a compiler program having the same function as the
図23に示すように、情報処理装置としてのコンピュータ100は、キーボード101、ディスプレイ102、CPU103、ROM104、HDD105、RAM106を有する。そして、キーボード101、ディスプレイ102、CPU103、ROM104、HDD105およびRAM106は、バス107などで接続される。また、コンピュータ100は、情報処理装置40と接続される。
As shown in FIG. 23, a
ROM104には、上記の実施例1に示したコンパイラ装置10と同様の機能を発揮するコンパイラプログラム、つまり、図23に示すように、ソース解析プログラム104a、最適化プログラム104b、ファイル生成プログラム104cが予め記憶されている。なお、これらのプログラム104a〜104cについては、図4に示したコンパイラ装置10の各構成要素と同様、適宜統合または分散してもよい。
The
そして、CPU103が、これらのプログラム104a〜104cをROM104から読みだして実行する。これにより、図23に示すように、プログラム104a〜104c
は、ソース解析プロセス103a、最適化プロセス103b、ファイル生成プロセス103cとして機能するようになる。なお、各プロセス103a〜103cは、図4に示した、ソース解析部31、最適化部32、ファイル生成部33にそれぞれ対応する。
Then, the
Functions as a
また、HDD105には、図23に示すように、ソースプログラムデータ105a、ソース解析データ105b、アーキデータ105c、最適化結果データ105dが設けられる。各プログラムデータ105a〜105dは、図4に用いたソースプログラム記憶部21、ソース解析結果記憶部22、アーキデータ記憶部23、最適化結果記憶部24にそれぞれ対応する。そしてCPU103は、ソースプログラムデータ106aをソースプログラムデータ105aに対して登録し、ソース解析データ106bをソース解析データ105bに対して登録し、アーキデータ106cをアーキデータ105cに対して登録する。また、CPU103は、最適化結果データ106dを最適化結果データ105dに対して登録する。そして、CPU103は、登録したデータを読み出してRAM106に格納し、RAM106に格納されたソースプログラムデータ106a、ソース解析データ106b、アーキデータ106cおよび最適化結果データ106dに基づいてコンパイル処理を実行する。
Further, as shown in FIG. 23, the
なお、上記した各プログラム104a〜104cについては、必ずしも最初からROM104に記憶させておく必要はなく、例えばコンピュータ100に挿入されるフレキシブルディスク(FD)、CD−ROM、MOディスク、DVDディスク、光磁気ディスク、ICカードなどの「可搬用の物理媒体」、または、コンピュータ100の内外に備えられるHDDなどの「固定用物理媒体」、さらには、公衆回線、インターネット、LAN、WANなどを介してコンピュータ100に接続される「他のコンピュータ(またはサーバ)」などに各プログラムを記憶させておき、コンピュータ100がこれらから各プログラムを読み出して実行するようにしてもよい。
The above-described
以上の各実施例を含む実施形態に関し、さらに以下の付記を開示する。 The following supplementary notes are further disclosed with respect to the embodiments including the above examples.
(付記1)セクタ機能付きのキャッシュメモリを搭載する情報処理装置にて実行されるソースプログラムを解析することで、当該ソースプログラムの各ループにおいて処理されるデータ配列の集合であるデータ集合のループ処理実行時における再利用性の有無を判定し、当該再利用性の有無を判定したデータ集合を格納するために要する容量と前記キャッシュメモリの容量とから、前記キャッシュメモリにおけるセクタ分割比と、当該データ集合を格納するセクタを特定するためのセクタ番号とを決定する決定手順と、
前記決定手順によって前記セクタ分割比および前記セクタ番号が決定されたループにおいて、当該セクタ分割比および当該セクタ番号に基づく命令制御文を前記ソースプログラムに挿入する挿入手順と、
前記挿入手順によって前記命令制御文が挿入されたソースプログラムからオブジェクトファイルを生成するファイル生成手順と、
をコンピュータに実行させることを特徴とするコンパイラプログラム。
(Supplementary Note 1) By analyzing a source program executed by an information processing apparatus equipped with a cache memory with a sector function, loop processing of a data set that is a set of data arrays processed in each loop of the source program Determine the presence or absence of reusability at the time of execution, and determine the sector division ratio in the cache memory and the data from the capacity required to store the data set for which the presence or absence of the reusability is stored and the capacity of the cache memory A decision procedure for determining a sector number for identifying a sector storing the set;
An insertion procedure for inserting an instruction control statement based on the sector division ratio and the sector number into the source program in the loop in which the sector division ratio and the sector number are determined by the determination procedure;
A file generation procedure for generating an object file from the source program in which the instruction control statement is inserted by the insertion procedure;
A compiler program characterized by causing a computer to execute.
(付記2)前記決定手順は、再利用性有りとして判定したデータ配列のデータ集合を格納するために要する容量と、当該再利用性有りとして判定したデータ配列以外のデータ集合を格納するために要する容量との和が、前記キャッシュメモリの容量となるように前記セクタ分割比と前記セクタ番号とを決定することを特徴とする付記1に記載のコンパイラプログラム。
(Supplementary Note 2) The determination procedure is required for storing a capacity required to store a data set of a data array determined to be reusable and a data set other than the data array determined to be reusable. The compiler program according to
(付記3)前記決定手順は、再利用性有りのデータ配列がなかったループにて再利用性の無いストリームデータとして判定されるデータ集合が存在する場合、当該再利用性の無いストリームデータとして判定されるデータ集合を格納するために要する容量と当該再利用性の無いストリームデータとして判定されるデータ配列以外のデータ集合を格納するために要する容量との和が、前記キャッシュメモリの容量より大きくなるように前記セクタ分割比と前記セクタ番号とを決定することを特徴とする付記2に記載のコンパイラプログラム。 (Supplementary Note 3) When there is a data set that is determined as non-reusable stream data in a loop in which there is no reusable data array, the determination procedure is determined as non-reusable stream data. The sum of the capacity required to store the data set to be stored and the capacity required to store the data set other than the data array determined as the non-reusable stream data is larger than the capacity of the cache memory. The compiler program according to appendix 2, wherein the sector division ratio and the sector number are determined as described above.
(付記4)セクタ機能付きのキャッシュメモリに格納する際のセクタ分割比が作成者によりループ内にて指定されたソースプログラムを受け付ける受け付け手順と、
前記受け付け手順によって受け付けられた前記ソースプログラムから、当該ソースプログラムにて前記作成者により前記セクタ分割比が指定されたループにて用いられる配列データを抽出する抽出手順と、
前記抽出手順によって抽出された前記配列データの再利用性の有無と、前記セクタ分割比に基づいて、当該配列データを前記キャッシュメモリに格納する際のセクタ番号を決定する決定手順と、
前記決定手順によって前記セクタ番号が決定されたループにおいて、当該決定されたセクタ番号および前記作成者から指定されたセクタ分割比に基づく命令制御文を前記ソースプログラムに挿入する挿入手順と、
前記挿入手順によって前記命令制御文が挿入されたソースプログラムからオブジェクトファイルを生成するファイル生成手順と、
をコンピュータに実行させることを特徴とするコンパイラプログラム。
(Supplementary Note 4) Accepting procedure for accepting a source program in which a sector division ratio when storing in a cache memory with a sector function is designated in a loop by the creator;
An extraction procedure for extracting array data used in a loop in which the sector division ratio is designated by the creator in the source program from the source program accepted by the acceptance procedure;
A determination procedure for determining a sector number when storing the array data in the cache memory based on the presence or absence of reusability of the array data extracted by the extraction procedure and the sector division ratio;
In the loop in which the sector number is determined by the determination procedure, an insertion procedure for inserting an instruction control statement based on the determined sector number and a sector division ratio designated by the creator into the source program;
A file generation procedure for generating an object file from the source program in which the instruction control statement is inserted by the insertion procedure;
A compiler program characterized by causing a computer to execute.
(付記5)前記決定手順は、前記作成者から指定されたセクタ分割比が、前記キャッシュメモリの容量に対応する範囲内で分割されたものであるか、前記キャッシュメモリの容量に対応する範囲より大きい範囲内で分割されたものであるかを判定したうえで、前記セクタ番号を決定することを特徴とする付記4に記載のコンパイラプログラム。 (Supplementary Note 5) In the determination procedure, the sector division ratio designated by the creator is divided within a range corresponding to the capacity of the cache memory, or from a range corresponding to the capacity of the cache memory. The compiler program according to appendix 4, wherein the sector number is determined after determining whether the sector is divided within a large range.
(付記6)セクタ機能付きのキャッシュメモリを搭載する情報処理装置にて実行されるソースプログラムを解析することで、当該ソースプログラムの各ループにおいて処理されるデータ配列の集合であるデータ集合のループ処理実行時における再利用性の有無を判定し、当該再利用性の有無を判定したデータ集合を格納するために要する容量と前記キャッシュメモリの容量とから、前記キャッシュメモリにおけるセクタ分割比と、当該データ集合を格納するセクタを特定するためのセクタ番号とを決定する決定部と、
前記決定部によって前記セクタ分割比および前記セクタ番号が決定されたループにおいて、当該セクタ分割比および当該セクタ番号に基づく命令制御文を前記ソースプログラムに挿入する挿入部と、
前記挿入部によって前記命令制御文が挿入されたソースプログラムからオブジェクトファイルを生成するファイル生成部と、
を有することを特徴とするコンパイラ装置。
(Appendix 6) Loop processing of a data set that is a set of data arrays processed in each loop of the source program by analyzing a source program executed by an information processing apparatus equipped with a cache memory with a sector function Determine the presence or absence of reusability at the time of execution, and determine the sector division ratio in the cache memory and the data from the capacity required to store the data set for which the presence or absence of the reusability is stored and the capacity of the cache memory A determination unit for determining a sector number for identifying a sector storing the set;
An insertion unit for inserting an instruction control statement based on the sector division ratio and the sector number into the source program in a loop in which the sector division ratio and the sector number are determined by the determination unit;
A file generation unit that generates an object file from a source program in which the instruction control statement is inserted by the insertion unit;
A compiler apparatus comprising:
(付記7)前記決定部は、再利用性有りとして判定したデータ配列のデータ集合を格納するために要する容量と、当該再利用性有りとして判定したデータ配列以外のデータ集合を格納するために要する容量との和が、前記キャッシュメモリの容量となるように前記セクタ分割比と前記セクタ番号とを決定することを特徴とする付記6に記載のコンパイラ装置。 (Additional remark 7) The said determination part is required in order to store the capacity | capacitance required to store the data set of the data arrangement | sequence determined to have reusability, and data sets other than the data array determined to have the said reusability 7. The compiler apparatus according to appendix 6, wherein the sector division ratio and the sector number are determined so that a sum of the capacities is equal to a capacity of the cache memory.
(付記8)前記決定部は、再利用性有りのデータ配列がなかったループにて再利用性の無いストリームデータとして判定されるデータ集合が存在する場合、当該再利用性の無いストリームデータとして判定されるデータ集合を格納するために要する容量と当該再利用性の無いストリームデータとして判定されるデータ配列以外のデータ集合を格納するために要する容量との和が、前記キャッシュメモリの容量より大きくなるように前記セクタ分割比と前記セクタ番号とを決定することを特徴とする付記7に記載のコンパイラ装置。 (Supplementary Note 8) When there is a data set that is determined as non-reusable stream data in a loop in which there is no reusable data array, the determination unit determines that the data is not reusable stream data The sum of the capacity required to store the data set to be stored and the capacity required to store the data set other than the data array determined as the non-reusable stream data is larger than the capacity of the cache memory. The compiler apparatus according to appendix 7, wherein the sector division ratio and the sector number are determined as described above.
(付記9)セクタ機能付きのキャッシュメモリに格納する際のセクタ分割比が作成者によりループ内にて指定されたソースプログラムを受け付ける受け付け部と、
前記受け付け部によって受け付けられた前記ソースプログラムから、当該ソースプログラムにて前記作成者により前記セクタ分割比が指定されたループにて用いられる配列データを抽出する抽出部と、
前記抽出部によって抽出された前記配列データの再利用性の有無と、前記セクタ分割比に基づいて、当該配列データを前記キャッシュメモリに格納する際のセクタ番号を決定する決定部と、
前記決定部によって前記セクタ番号が決定されたループにおいて、当該決定されたセクタ番号および前記作成者から指定されたセクタ分割比に基づく命令制御文を前記ソースプログラムに挿入する挿入部と、
前記挿入部によって前記命令制御文が挿入されたソースプログラムからオブジェクトファイルを生成するファイル生成部と、
を有することを特徴とするコンパイラ装置。
(Supplementary Note 9) A reception unit that receives a source program in which a sector division ratio specified in a loop by a creator is stored in a cache memory with a sector function;
An extraction unit that extracts array data used in a loop in which the sector division ratio is specified by the creator in the source program from the source program received by the reception unit;
A determination unit for determining a sector number when storing the sequence data in the cache memory based on the presence or absence of reusability of the sequence data extracted by the extraction unit and the sector division ratio;
In the loop in which the sector number is determined by the determination unit, an insertion unit that inserts an instruction control statement based on the determined sector number and a sector division ratio specified by the creator into the source program;
A file generation unit that generates an object file from a source program in which the instruction control statement is inserted by the insertion unit;
A compiler apparatus comprising:
(付記10)前記決定部は、前記作成者から指定されたセクタ分割比が、前記キャッシュメモリの容量に対応する範囲内で分割されたものであるか、前記キャッシュメモリの容量に対応する範囲より大きい範囲内で分割されたものであるかを判定したうえで、前記セクタ番号を決定することを特徴とする付記9に記載のコンパイラ装置。 (Additional remark 10) The said determination part is a sector division ratio designated by the said creator divided | segmented within the range corresponding to the capacity | capacitance of the said cache memory, or from the range corresponding to the capacity | capacitance of the said cache memory. The compiler apparatus according to appendix 9, wherein the sector number is determined after determining whether the sector is divided within a large range.
10 コンパイラ装置
11 ソースプログラム入力部
12 オブジェクトファイル出力部
13 通信部
14 入出力制御I/F部
20 記憶部
21 ソースプログラム記憶部
22 ソース解析結果記憶部
23 アーキデータ記憶部
24 最適化結果記憶部
30 処理部
31 ソース解析部
32 最適化部
33 ファイル生成部
40 情報処理装置
DESCRIPTION OF
Claims (7)
前記決定手順によって前記セクタ分割比および前記セクタ番号が決定されたループにおいて、当該セクタ分割比および当該セクタ番号に基づく命令制御文を前記ソースプログラムに挿入する挿入手順と、
前記挿入手順によって前記命令制御文が挿入されたソースプログラムからオブジェクトファイルを生成するファイル生成手順と、
をコンピュータに実行させることを特徴とするコンパイラプログラム。 By analyzing a source program executed by an information processing device equipped with a cache memory with a sector function, a data set, which is a set of data arrays processed in each loop of the source program, is reproduced at the time of loop processing execution. The presence / absence of usability is determined, and the sector division ratio in the cache memory and the data set are stored from the capacity required to store the data set for which the reusability is determined and the capacity of the cache memory. A determination procedure for determining a sector number for identifying a sector;
An insertion procedure for inserting an instruction control statement based on the sector division ratio and the sector number into the source program in the loop in which the sector division ratio and the sector number are determined by the determination procedure;
A file generation procedure for generating an object file from the source program in which the instruction control statement is inserted by the insertion procedure;
A compiler program characterized by causing a computer to execute.
前記受け付け手順によって受け付けられた前記ソースプログラムから、当該ソースプログラムにて前記作成者により前記セクタ分割比が指定されたループにて用いられる配列データを抽出する抽出手順と、
前記抽出手順によって抽出された前記配列データの再利用性の有無と、前記セクタ分割比に基づいて、当該配列データを前記キャッシュメモリに格納する際のセクタ番号を決定する決定手順と、
前記決定手順によって前記セクタ番号が決定されたループにおいて、当該決定されたセクタ番号および前記作成者から指定されたセクタ分割比に基づく命令制御文を前記ソースプログラムに挿入する挿入手順と、
前記挿入手順によって前記命令制御文が挿入されたソースプログラムからオブジェクトファイルを生成するファイル生成手順と、
をコンピュータに実行させることを特徴とするコンパイラプログラム。 An acceptance procedure for accepting a source program in which a sector division ratio when storing in a cache memory with a sector function is specified in a loop by the creator;
An extraction procedure for extracting array data used in a loop in which the sector division ratio is designated by the creator in the source program from the source program accepted by the acceptance procedure;
A determination procedure for determining a sector number when storing the array data in the cache memory based on the presence or absence of reusability of the array data extracted by the extraction procedure and the sector division ratio;
In the loop in which the sector number is determined by the determination procedure, an insertion procedure for inserting an instruction control statement based on the determined sector number and a sector division ratio designated by the creator into the source program;
A file generation procedure for generating an object file from the source program in which the instruction control statement is inserted by the insertion procedure;
A compiler program characterized by causing a computer to execute.
前記決定部によって前記セクタ分割比および前記セクタ番号が決定されたループにおいて、当該セクタ分割比および当該セクタ番号に基づく命令制御文を前記ソースプログラムに挿入する挿入部と、
前記挿入部によって前記命令制御文が挿入されたソースプログラムからオブジェクトファイルを生成するファイル生成部と、
を有することを特徴とするコンパイラ装置。 By analyzing a source program executed by an information processing device equipped with a cache memory with a sector function, a data set, which is a set of data arrays processed in each loop of the source program, is reproduced at the time of loop processing execution. The presence / absence of usability is determined, and the sector division ratio in the cache memory and the data set are stored from the capacity required to store the data set for which the reusability is determined and the capacity of the cache memory. A determination unit for determining a sector number for identifying the sector;
An insertion unit for inserting an instruction control statement based on the sector division ratio and the sector number into the source program in a loop in which the sector division ratio and the sector number are determined by the determination unit;
A file generation unit that generates an object file from a source program in which the instruction control statement is inserted by the insertion unit;
A compiler apparatus comprising:
前記受け付け部によって受け付けられた前記ソースプログラムから、当該ソースプログラムにて前記作成者により前記セクタ分割比が指定されたループにて用いられる配列データを抽出する抽出部と、
前記抽出部によって抽出された前記配列データの再利用性の有無と、前記セクタ分割比に基づいて、当該配列データを前記キャッシュメモリに格納する際のセクタ番号を決定する決定部と、
前記決定部によって前記セクタ番号が決定されたループにおいて、当該決定されたセクタ番号および前記作成者から指定されたセクタ分割比に基づく命令制御文を前記ソースプログラムに挿入する挿入部と、
前記挿入部によって前記命令制御文が挿入されたソースプログラムからオブジェクトファイルを生成するファイル生成部と、
を有することを特徴とするコンパイラ装置。 A receiving unit for receiving a source program in which a sector division ratio when storing in a cache memory with a sector function is designated in a loop by the creator;
An extraction unit that extracts array data used in a loop in which the sector division ratio is specified by the creator in the source program from the source program received by the reception unit;
A determination unit for determining a sector number when storing the sequence data in the cache memory based on the presence or absence of reusability of the sequence data extracted by the extraction unit and the sector division ratio;
In the loop in which the sector number is determined by the determination unit, an insertion unit that inserts an instruction control statement based on the determined sector number and a sector division ratio specified by the creator into the source program;
A file generation unit that generates an object file from a source program in which the instruction control statement is inserted by the insertion unit;
A compiler apparatus comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009090480A JP5251689B2 (en) | 2009-04-02 | 2009-04-02 | Compiler program and compiler device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009090480A JP5251689B2 (en) | 2009-04-02 | 2009-04-02 | Compiler program and compiler device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2010244205A true JP2010244205A (en) | 2010-10-28 |
JP5251689B2 JP5251689B2 (en) | 2013-07-31 |
Family
ID=43097178
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009090480A Active JP5251689B2 (en) | 2009-04-02 | 2009-04-02 | Compiler program and compiler device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5251689B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9477601B2 (en) | 2014-05-22 | 2016-10-25 | Fujitsu Limited | Apparatus and method for determining a sector division ratio of a shared cache memory |
US10353682B2 (en) | 2016-07-14 | 2019-07-16 | Fujitsu Limited | Information processing device, storage medium, and method |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS638851A (en) * | 1986-06-27 | 1988-01-14 | Yokogawa Hewlett Packard Ltd | Cache memory control system |
JPH05225060A (en) * | 1992-02-14 | 1993-09-03 | Nec Corp | Information processor |
JPH08212135A (en) * | 1995-02-06 | 1996-08-20 | Hitachi Ltd | Information processor |
JPH08241208A (en) * | 1995-03-06 | 1996-09-17 | Fujitsu Ltd | Information display system for cache |
JPH09101916A (en) * | 1995-10-06 | 1997-04-15 | Fujitsu Ltd | Multiprocess processor |
JP2000020396A (en) * | 1998-06-26 | 2000-01-21 | Nec Kofu Ltd | Variable cache system |
JP2008102733A (en) * | 2006-10-19 | 2008-05-01 | Hitachi Ltd | Code generation method and compiler |
JP2008525919A (en) * | 2004-12-29 | 2008-07-17 | インテル・コーポレーション | Method for programmer-controlled cache line eviction policy |
-
2009
- 2009-04-02 JP JP2009090480A patent/JP5251689B2/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS638851A (en) * | 1986-06-27 | 1988-01-14 | Yokogawa Hewlett Packard Ltd | Cache memory control system |
JPH05225060A (en) * | 1992-02-14 | 1993-09-03 | Nec Corp | Information processor |
JPH08212135A (en) * | 1995-02-06 | 1996-08-20 | Hitachi Ltd | Information processor |
JPH08241208A (en) * | 1995-03-06 | 1996-09-17 | Fujitsu Ltd | Information display system for cache |
JPH09101916A (en) * | 1995-10-06 | 1997-04-15 | Fujitsu Ltd | Multiprocess processor |
JP2000020396A (en) * | 1998-06-26 | 2000-01-21 | Nec Kofu Ltd | Variable cache system |
JP2008525919A (en) * | 2004-12-29 | 2008-07-17 | インテル・コーポレーション | Method for programmer-controlled cache line eviction policy |
JP2008102733A (en) * | 2006-10-19 | 2008-05-01 | Hitachi Ltd | Code generation method and compiler |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9477601B2 (en) | 2014-05-22 | 2016-10-25 | Fujitsu Limited | Apparatus and method for determining a sector division ratio of a shared cache memory |
US10353682B2 (en) | 2016-07-14 | 2019-07-16 | Fujitsu Limited | Information processing device, storage medium, and method |
Also Published As
Publication number | Publication date |
---|---|
JP5251689B2 (en) | 2013-07-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8266603B2 (en) | Technique for allocating register to variable for compiling | |
US8375374B2 (en) | Partitioning programs between a general purpose core and one or more accelerators | |
US7926046B2 (en) | Compiler method for extracting and accelerator template program | |
US8341615B2 (en) | Single instruction multiple data (SIMD) code generation for parallel loops using versioning and scheduling | |
US8886887B2 (en) | Uniform external and internal interfaces for delinquent memory operations to facilitate cache optimization | |
WO2005116837A1 (en) | Automatic caching generation in network applications | |
EP2508992B1 (en) | Method of generating code executable by a processor | |
JP5244421B2 (en) | Information processing apparatus and program dividing method | |
WO2007016808A1 (en) | A compiling and translating method and apparatus | |
US20120011166A1 (en) | Skip list generation | |
US10353682B2 (en) | Information processing device, storage medium, and method | |
JP5251689B2 (en) | Compiler program and compiler device | |
US20090276575A1 (en) | Information processing apparatus and compiling method | |
US8959309B2 (en) | Skip list generation | |
US20040205738A1 (en) | Compiler, program prduct, compilation device, communication terminal device, and compilation method | |
JP6160232B2 (en) | Compilation program and compilation method | |
US20050144605A1 (en) | Information processing system and code generation method | |
US20150046913A1 (en) | Data splitting for multi-instantiated objects | |
JP4080809B2 (en) | Compiler apparatus and arrangement determining method for determining arrangement of data in storage area | |
WO1998018084A1 (en) | Device and method for accelerating memory access speed | |
JP2010244204A (en) | Compiler program and compiler device | |
JPH10187460A (en) | Device and method for converting binary program | |
JP2004265279A (en) | Compiler device, compile method, compiler program and recording medium | |
JP2677482B2 (en) | Computer language processing method | |
CN112579091A (en) | Instruction compiling method and device, compiler and computing equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20111205 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130305 |
|
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: 20130319 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130401 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5251689 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160426 Year of fee payment: 3 |