Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3922699B2 - Optimization method and program for moving invariant expressions in loop - Google Patents
[go: Go Back, main page]

JP3922699B2 - Optimization method and program for moving invariant expressions in loop - Google Patents

Optimization method and program for moving invariant expressions in loop Download PDF

Info

Publication number
JP3922699B2
JP3922699B2 JP2002219284A JP2002219284A JP3922699B2 JP 3922699 B2 JP3922699 B2 JP 3922699B2 JP 2002219284 A JP2002219284 A JP 2002219284A JP 2002219284 A JP2002219284 A JP 2002219284A JP 3922699 B2 JP3922699 B2 JP 3922699B2
Authority
JP
Japan
Prior art keywords
copyable
loop
primary
invariant
variable
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2002219284A
Other languages
Japanese (ja)
Other versions
JP2004062489A (en
Inventor
匡 毛穴
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.)
NEC Solution Innovators Ltd
Original Assignee
NEC System Technologies Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC System Technologies Ltd filed Critical NEC System Technologies Ltd
Priority to JP2002219284A priority Critical patent/JP3922699B2/en
Publication of JP2004062489A publication Critical patent/JP2004062489A/en
Application granted granted Critical
Publication of JP3922699B2 publication Critical patent/JP3922699B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Devices For Executing Special Programs (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、コンパイラの最適化方式に関し、特に演算で使用している変数がループ内で不変な値を選択的に使用しているためにループ内不変式として移動できない演算をループの外で計算できるように変形する最適化に関する。
【0002】
【従来の技術】
一般にコンパイラは、図11のコンパイラ100に示すように、高級言語で記述されたソースプログラム200を入力し、構文解析部101によって字句解析、構文解析、意味解析等を行って中間テキスト104を生成し、次いで、最適化部102によって中間テキスト104に対して最適化処理を施した中間テキスト105を生成し、次いで、コード生成部103によって中間テキスト105から機械語命令のオブジェクトプログラム300を生成して出力する。最適化部102では各種の最適化が実施されるが、その1つに、繰り返し実行される部分(つまりループ)内に存在するループ内不変式をループ外に移動することにより、無駄な計算の繰り返しを無くす最適化処理がある。ここで、ループ内不変式とは、ループの実行回数にかかわらず計算結果が常に一定になる演算を言う。本発明はこのようなループ内不変式の最適化に関する。
【0003】
従来、この種のループ内で不変な式の最適化は、特開平5−189244号公報に示されるように、自明なループ内で不変な式の検出を行い、その後、それらの不変な式を使用している式が不変となるかどうかの調査を行う。このため、演算の結果がループ内で不変な値を持つ場合にのみ、ループ外への移動の最適化が行われ、ループ内で不変な値を持つ変数が複数の個所で選択的に定義され、その変数を参照する演算の場合は、このような演算はループ内不変式でないと判断され、最適化の対象にはされなかった。
【0004】
【発明が解決しようとする課題】
しかし、ある演算が、ループ内の複数の箇所で選択的にループ内で不変な値を定義されている変数を参照する場合、異なる繰り返しであっても、実際に変数が定義されている箇所が同じならば同じ演算結果となる。すなわち、同じ結果を得る演算をループの繰り返しにおいて何度も実行することになり、実行時間が長くなっている。
【0005】
【発明の目的】
本発明の目的は、ある演算において、その演算で参照している変数が、ループ内の複数の箇所で選択的にループ内で不変な値を定義されている場合にも、ループ内で不変な演算として可能な限り多くをループ外に移動できるようプログラムを変形し得るようにすることにある。
【0006】
【課題を解決するための手段】
第1の発明は、第1の記憶手段に記憶されたソースプログラムを読み出して解析し、生成した第1の中間テキストを第2の記憶手段に記憶する構文解析部と、前記第2の記憶手段から読み出した第1の中間テキストに対して最適化処理を施した第2の中間テキストを生成し、前記第2の記憶手段に記憶する最適化部と、前記第2の記憶手段から読み出した第2の中間テキストからオブジェクトコードを生成し、第3の記憶手段に記憶するコード生成部とを備え、且つ、
前記最適化部は、前記第2の記憶手段から前記第1の中間テキストを読み出し、ループ内で値が不変である変数と結果が不変である演算を検出し、その処理結果を前記第2の記憶手段に記憶するループ内不変式検出手段と、
前記第2の記憶手段から前記第1の中間テキストと前記ループ内不変式検出手段の処理結果とを読み出し、演算に使用される変数の全てが、ループ内で不変であるか、ループ内の複数箇所で定義されているがそのいずれかが必ずこの演算に先立って実行されかつそのいずれもがループ内で不変の値が代入されている変数であるかのいずれかである、第一次複写可能演算を検出し、その処理結果を前記第2の記憶手段に記憶する第一次複写可能演算検出手段と、
前記第2の記憶手段から前記第1の中間テキストと前記第一次複写可能演算検出手段の処理結果とを読み出し、前記第一次複写可能演算検出手段で検出された第一次複写可能演算に対して、演算で使用しているループ内の複数箇所で定義されている変数の各々の定義の直後に第一次複写可能演算を複写し、さらに一時的に使用する新しく作成した変数を複写された演算の結果とし、元の前記第一次複写可能演算を一時的に使用する変数から上記第一次複写可能演算の結果を保持する変数への代入に置き換える第一次複写可能演算複写手段とを含み、
演算で使用している変数がループ内で不変な値を選択的に使用しているためにループ内不変式として移動できない演算をループの外で計算できるように変形することを特徴とする。
【0007】
第2の発明は、第1の記憶手段に記憶されたソースプログラムを読み出して解析し、生成した第1の中間テキストを第2の記憶手段に記憶する構文解析部と、前記第2の記憶手段から読み出した第1の中間テキストに対して最適化処理を施した第2の中間テキストを生成し、前記第2の記憶手段に記憶する最適化部と、前記第2の記憶手段から読み出した第2の中間テキストからオブジェクトコードを生成し、第3の記憶手段に記憶するコード生成部とを備え、且つ、
前記最適化部は、
前記第2の記憶手段から前記第1の中間テキストを読み出し、ループ内で値が不変である変数と結果が不変である演算を検出し、その処理結果を前記第2の記憶手段に記憶するループ内不変式検出手段と、
前記第2の記憶手段から前記第1の中間テキストと前記ループ内不変式検出手段の処理結果とを読み出し、演算に使用される変数の全てが、ループ内で不変であるか、ループ内の複数箇所で定義されているがそのいずれかが必ずこの演算に先立って実行されかつそのいずれもがループ内で不変の値が代入されている変数であるかのいずれかである、第一次複写可能演算を検出し、その処理結果を前記第2の記憶手段に記憶する第一次複写可能演算検出手段と、
前記第2の記憶手段から前記第1の中間テキストと前記ループ内不変式検出手段の処理結果と前記第一次複写可能演算検出手段の処理結果とを読み出し、演算に使用される変数の全てが、ループ内で不変であるか、前記第一次複写可能演算検出手段で検出された第一次複写可能演算の結果であるかのいずれかであり、かついずれの第一次複写可能演算もその結果を代入される変数は1箇所でのみ定義されていてかつ必ずこの演算に先立って実行されているものである、第二次複写可能演算を検出し、その処理結果を前記第2の記憶手段に記憶する第二次複写可能演算検出手段と、
前記第2の記憶手段から前記第1の中間テキストと前記第一次複写可能演算検出手段の処理結果とを読み出し、前記第一次複写可能演算検出手段で検出された第一次複写可能演算に対して、演算で使用しているループ内の複数箇所で定義されている変数の各々の定義の直後に第一次複写可能演算を複写し、さらに一時的に使用する新しく作成した変数を複写された演算の結果とし、元の前記第一次複写可能演算を一時的に使用する変数から上記第一次複写可能演算の結果を保持する変数への代入に置き換える第一次複写可能演算複写手段と、
前記第2の記憶手段から前記第二次複写可能演算検出手段の処理結果と前記第一次複写可能演算検出手段による書き換え後の前記第1の中間テキストとを入力し、前記第二次複写可能演算検出手段で検出された第二次複写可能演算に対して、演算で使用している第一次複写可能演算の、演算で使用しているループ内の複数箇所で定義されている変数の各々の定義の直後に複写された第一次複写可能演算の直後に、前記第二次複写可能演算を複写し、その複写した演算で引用している複数の箇所で定義されている変数を前記第一次複写可能演算で使用した一時的な変数に置き換え、さらに一時的に使用する新しく作成した変数を複写された演算の結果とし、元の前記第二次複写可能演算を一時的に使用する変数から前記第二次複写可能演算の結果を保持する変数への代入に置き換える第二次複写可能演算複写手段とを含み、
演算で使用している変数がループ内で不変な値を選択的に使用しているためにループ内不変式として移動できない演算をループの外で計算できるように変形することを特徴とする。
【0009】
【作用】
第1の発明にあっては、ループ内不変式検出手段により、ループ内で値が不変である変数と、結果が不変である演算を検出し、第一次複写可能演算検出手段により、演算に使用される変数の全てが、ループ内で不変であるか、ループ内の複数箇所で定義されているがそのいずれかが必ずこの演算に先立って実行されかつそのいずれもがループ内で不変の値が代入されている変数であるかのいずれかである、第一次複写可能演算を検出する。そして、第一次複写可能演算複写手段により、上記第一次複写可能演算検出手段で検出された第一次複写可能演算に対して、演算で使用しているループ内の複数箇所で定義されている変数の各々の定義の直後に第一次複写可能演算を複写し、さらに一時的に使用する新しく作成した変数を複写された演算の結果とし、元の上記第一次複写可能演算を一時的に使用する変数から上記第一次複写可能演算の結果を保持する変数への代入に置き換える。これにより、各々の条件下に複写された第一次複写可能演算は、ループ内不変式として扱うことができ、ループ外へ移動することにより、ループの実行時間を短くすることが可能となる。
【0010】
第2の発明にあっては、第1の発明に加えて更に、第二次複写可能演算検出手段により、演算に使用される変数の全てが、ループ内で不変であるか、上記第一次複写可能演算検出手段で検出された第一次複写可能演算の結果であるかのいずれかであり、かついずれの第一次複写可能演算もその結果を代入される変数は1箇所でのみ定義されていてかつ必ずこの演算に先立って実行されているものである、第二次複写可能演算を検出し、第二次複写可能演算複写手段により、上記第二次複写可能演算検出手段で検出された第二次複写可能演算に対して、演算で使用している第一次複写可能演算の、演算で使用しているループ内の複数箇所で定義されている変数の各々の定義の直後に複写された第一次複写可能演算の直後に、上記第二次複写可能演算を複写し、その複写した演算で引用している複数の箇所で定義されている変数を上記第一次複写可能演算で使用した一時的な変数に置き換え、さらに一時的に使用する新しく作成した変数を複写された演算の結果とし、元の上記第二次複写可能演算を一時的に使用する変数から上記第二次複写可能演算の結果を保持する変数への代入に置き換える。これにより、各々の条件下に複写された第一次複写可能演算に加えて第二次複写可能演算も、ループ内不変式として扱うことができ、ループ外へ移動することにより、ループの実行時間をより短くすることが可能となる。
【0012】
【発明の第1の実施の形態】
次に、本発明の第1の実施の形態について図面を参照して説明する。
【0013】
【構成の説明】
図1を参照すると、本発明の第1の実施の形態にかかるコンパイラのループ最適化部10は、ループ内不変式検出手段11、第一次複写可能演算検出手段12、第二次複写可能演算検出手段13、第一次複写可能演算複写手段14、第二次複写可能演算複写手段15およびループ内不変式移動手段16を含み、中間テキスト21を入力し、それを最適化した中間テキスト22を出力する。中間テキスト21は図11の中間テキスト104に、中間テキスト22は図11の中間テキスト105に、そして、ループ最適化部10は、図11の最適化部102に、それぞれ相当する。
【0014】
ループ内不変式検出手段11は、中間テキスト21を入力し、ループ内で値が不変である変数および演算結果がループ内で不変となる演算を検索し、記録する。
【0015】
第一次複写可能演算検出手段12は、中間テキスト21とループ内不変式検出手段11の上記記録を入力し、演算に使用される変数の全てが、ループ内で不変であるか、ループ内の複数箇所で定義されているがそのいずれかが必ずこの演算に先立って実行されかつそのいずれもがループ内で不変の値が代入されている変数であるかのいずれかである、第一次複写可能演算の検出を行い、記録する。
【0016】
第二次複写可能演算検出手段13は、中間テキスト21とループ内不変式検出手段11および第一次複写可能演算検出手段12の上記記録を入力し、演算に使用される変数の全てがループ内で不変であるか、第一次複写可能演算検出手段12で検出された第一次複写可能演算の結果であるかのいずれかであり、かついずれの第一次複写可能演算もその結果を代入される変数は1箇所でのみ定義されていてかつ必ずこの演算に先立って実行されているものである、第二次複写可能演算を検出し、記録する。
【0017】
第一次複写可能演算複写手段14は、中間テキスト21と第一次複写可能演算検出手段12の上記記録を入力し、第一次複写可能演算検出手段12で検出された第一次複写可能演算に対して、演算で使用しているループ内の複数箇所で定義されている変数の各々の定義の直後に第一次複写可能演算を複写し、さらに一時的に使用する新しく作成した変数を複写された演算の結果とし、元の上記第一次複写可能演算を一時的に使用する変数から上記第一次複写可能演算の結果を保持する変数への代入に置き換え、置き換え後の中間テキストを記録する。
【0018】
第二次複写可能演算複写手段15は、第二次複写可能演算検出手段13の上記記録と第一次複写可能演算複写手段14による上記置き換え後の中間テキストを入力し、第二次複写可能演算検出手段13で検出された第二次複写可能演算に対して、演算で使用している第一次複写可能演算の、演算で使用しているループ内の複数箇所で定義されている変数の各々の定義の直後に複写された第一次複写可能演算の直後に、上記第二次複写可能演算を複写し、その複写した演算で引用している複数の箇所で定義されている変数を上記第一次複写可能演算で使用した一時的な変数に置き換え、さらに一時的に使用する新しく作成した変数を複写された演算の結果とし、元の上記第二次複写可能演算を一時的に使用する変数から上記第二次複写可能演算の結果を保持する変数への代入に置き換え、置き換え後の中間テキストを記録する。
【0019】
ループ内不変式移動手段16は、第二次複写可能演算複写手段15による上記置き換え後の中間テキストを入力し、その入力した中間テキストに存在するループ内不変式をループ外に移動し、最適化された中間テキスト22を出力する。
【0020】
【動作の説明】
次に、本実施の形態のループ最適化部10の動作について図1乃至図6を参照して詳細に説明する。
【0021】
ループ内不変式検出手段11は、中間テキスト21をループ毎に検索し、ループ内で値が不変である変数と結果が不変である演算を検出し、記録する(図2のステップA1)。例えば、図3のような実際のFortranプログラム片の場合、変数I1、I2、Sがループ内不変として記録される。
【0022】
次に第一次複写可能演算検出手段12は、演算に使用されている変数の全てが、ループ内で不変であるか、ループ内の複数箇所で定義されているがそのいずれかが必ずこの演算に先立って実行されかつそのいずれもがループ内で不変の値が代入されている変数であるかのいずれかである第一次複写可能演算を検出する(図2のステップA2)。例えば、図3のような実際のFortranプログラム片の場合、(3)の演算IX*Sは、Sがループ内不変であり、IXは(1)と(2)の2箇所で定義されており、(1)においてはI1、(2)においてはI2といういずれもループ内で不変な変数を代入されているため、第一次複写可能演算として認識される。
【0023】
上記において、検出された演算が1つもなければ、図2の処理は終了する。1つでもあれば、次のステップA4に進む(図2のステップA3)。
【0024】
次に第二次複写可能演算検出手段13は、演算に使用される変数の全てが、ループ内で不変であるか、上記ステップA2で検出された第一次複写可能演算の結果であるかのいずれかであり、かついずれの第一次複写可能演算もその結果を代入される変数は1箇所でのみ定義されていてかつ必ずこの演算に先立って実行されているものである第二次複写可能演算の検索を行う(図2のステップA4)。例えば、図3のような実際のFortranプログラム片の場合、(4)の演算T+Sは、Sがループ内不変であり、Tは第一次複写可能演算(図3の(3))の結果であるため、第二次複写可能演算として認識される。
【0025】
次に第一次複写可能演算複写手段14は、ステップA2で検索した第一次複写可能演算に対し、演算で使用しているループ内の複数箇所で定義されている変数の各々の定義の直後に演算を複写し、さらに一時的に使用する新しく作成した変数を複写された演算の結果とし、元の第一次複写可能演算を一時的に使用する変数から第一次複写可能演算の結果を保持する変数への代入に置き換える(図2のステップA5)。例えば、図3のような実際のFortranプログラム片に対してこの複写を行った場合を図4に示す。第一次複写可能演算である図3の(3)の演算IX*Sは、図3の(1)および(2)の直後に複写され、演算によって定義される変数は新しく生成した変数T1に変更される(図4の(5)および(6))。また、図3の(3)の演算IX*Sは、上記の新しく生成した変数T1に置き換えられる(図4の(7))。
【0026】
第二次複写可能演算検出手段(図2のステップA4)において、検出された演算が1つもなければ、図2の処理は終了する。1つでもあれば、次のステップA7に進む(図2のステップA6)。
【0027】
次に第二次複写可能演算複写手段15は、ステップA4で検索した第二次複写可能演算に対し、演算で使用している第一次複写可能演算の、演算で使用しているループ内の複数箇所で定義されている変数の各々の定義の直後に複写された第一次複写可能演算の直後に、上記第二次複写可能演算を複写し、その複写した演算で引用している複数の箇所で定義されている変数を上記第一次複写可能演算で使用した一時的な変数に置き換え、さらに一時的に使用する新しく作成した変数を複写された演算の結果とし、元の上記第二次複写可能演算を一時的に使用する変数から上記第二次複写可能演算の結果を保持する変数への代入に置き換える(図2のステップA7)。例えば、図3のような実際のFortranプログラム片に対してこの複写を行った場合を図5に示す。第二次複写可能演算である図3の(4)の演算T+Sは、図4の(5)および(6)の直後に複写され、第一次複写可能演算の結果であるTはステップA3で生成された新しい変数T1に変更され、演算によって定義される変数は新しく生成した変数T2に変更される(図5の(8)および(9))。また、図3の(4)の演算T+Sは、上記の新しく生成した変数T2に置き換えられる(図5の(10))。
【0028】
このようにして変更された図5のようなプログラム片は、従来技術によるループ内不変式の移動の最適化を行うループ内不変式移動手段16により、図6のように変形され、ループ内の実行命令数が減り、実行時間が短くなる。
【0029】
【発明の第2の実施の形態】
次に本発明の第2の実施の形態について、図面を参照して詳細に説明する。
【0030】
第1の実施の形態では、演算で参照する変数は、第二次複写可能演算検出手段13において第一次複写可能演算で定義される変数またはループ内不変な変数のみとしているが、図7の(6)のT+Uのように第一次複写可能演算で定義される変数(T)と、複数の箇所で定義されいずれかの定義がこの演算に先立って実行されかついずれの定義においてもループ内で不変の値が代入される変数(U)の混在する場合においても、第一次複写可能演算複写手段14と第二次複写可能演算複写手段15を組み合わせることにより、本発明を適用可能である。
【0031】
上記の場合、複数の箇所で定義されいずれかの定義がこの演算に先立って実行されておりかついずれの定義においてもループ内で不変の値が代入される変数(図7の(6)のU)については、第一次複写可能演算複写手段14(図2のステップA5)と同様に、演算で使用しているループ内の複数箇所で定義されている変数の各々の定義の直後に演算を複写し、さらに一時的に使用する新しく作成した変数を複写された演算の結果とし、元の演算を一時的に使用する変数から演算の結果を保持する変数への代入に置き換える。例えば、図7のような実際のFortranプログラム片に対してこの複写を行った場合を図8に示す。図8の(7)、(10)、(13)は、第一次複写可能演算複写手段14によってすでに変更されているものとする。第二次複写可能演算である図7の(6)の演算T+Uは、図7の(2)および(4)の直後に複写され、第一次複写可能演算の結果であるTはステップA3で生成された新しい変数T1に変更され、演算によって定義される変数は新しく生成した変数T2に変更される(図8の(9)および(12))。
【0032】
次に、第一次複写可能演算で定義される変数(図7の(6)のT)については、第二次複写可能演算(図7の(6)のT+U)に対し、演算で使用している第一次複写可能演算の、演算で使用しているループ内の複数箇所で定義されている変数の各々の定義の直後に複写された第一次複写可能演算の直後に、上記第二次複写可能演算を複写し、その複写した演算で引用している複数の箇所で定義されている変数を上記第一次複写可能演算で使用した一時的な変数に置き換え、さらに一時的に使用する新しく作成した変数を複写された演算の結果とし、元の上記第二次複写可能演算を一時的に使用する変数から上記第二次複写可能演算の結果を保持する変数への代入に置き換える。例えば、図7のような実際のFortranプログラム片に対してこの複写を行った場合を図8に示す。図8の(7)、(10)、(13)は、第一次複写可能演算複写手段14によって既に変更されているものとする。第二次複写可能演算である図7の(6)の演算T+Uは、図8の(7)および(10)の直後に複写され、TはステップA3で生成された新しい変数T1に変更され、演算によって定義される変数は新しく生成した変数T2に変更される(図8の(8)および(11))。その上で、第二次複写可能演算(図7の(6)のT+U)は、新しく生成した変数T2に置き換えられる(図8の(14))。
【0033】
このようにして変更された図8のようなプログラム片は、従来技術によるループ内不変式の移動の最適化を行うループ内不変式移動手段16により、図9のように変形され、ループ内の実行命令数が減り、実行時間が短くなる。
【0034】
【発明の他の実施の形態】
図10は本発明を実施するコンピュータの構成例を示すブロック図である。この例のコンピュータは、高級言語で記述されたソースプログラム200を格納する外部記憶装置201と、生成された機械語命令のオブジェクトプログラム300を格納する外部記憶装置301と、外部記憶装置201からソースプログラム200を入力し、また外部記憶装置301へオブジェクトプログラム300を出力する入出力部31と、ソースプログラム200を構文解析部で処理して得た中間テキスト21、この中間テキスト21を最適化して得た中間テキスト22を記憶すると共に、最適化処理の過程で得られる各種の情報を一時的に記憶するワーク領域32を有するメモリ33と、コンパイル用プログラム34を記憶する磁気ディスク装置等のコンピュータ可読記録媒体35と、入出力部31とメモリ33とコンピュータ可読記録媒体35に接続された中央処理装置36とで構成される。
【0035】
コンピュータ可読記録媒体35に記録されたコンパイル用プログラム34は、中央処理装置36に読み取られ、その動作を制御することにより、当該コンピュータを前述した第1、第2の実施の形態にかかるループ最適化部10を有するコンパイラとして機能させる。この際、メモリ33のワーク領域32は、ループ最適化部10における各手段間で受け渡される情報が一時的に記憶される。例えば、第1の実施の形態にあっては、ループ内不変式検出手段11は、ループ内で値が不変である変数および演算結果がループ内で不変となる演算を検索してワーク領域32に記録する。第一次複写可能演算検出手段12は、第一次複写可能演算の検出を行う際に、ワーク領域32を参照してループ内で不変である変数等を認識し、検出した第一次複写可能演算をワーク領域32に記録する。第二次複写可能演算検出手段13は、第二次複写可能演算を検出する際に、ワーク領域32を参照してループ内で不変である変数および検出された第一次複写可能演算等を認識し、検出した第二次複写可能演算をワーク領域に記録する。第一次複写可能演算複写手段14は、ワーク領域32を参照して第一次複写可能演算検出手段12で検出された第一次複写可能演算等を認識し、中間テキスト21に対して変形を施した図4のような中間テキストをワーク領域32に記録する。第二次複写可能演算複写手段15は、ワーク領域32を参照して第二次複写可能演算検出手段13で検出された第二次複写可能演算および第一次複写可能演算複写手段14の処理結果等を認識し、自らの処理を加えて図5のような中間テキストをワーク領域32に記録する。ループ内不変式移動手段16は、ワーク領域32に記録された図5のような中間テキストを入力して、ループ内の不変式の移動に関する最適化処理を施し、その結果を中間テキスト22としてメモリ33に記録する。第2の実施の形態においても同様に、ループ内不変式検出手段11、第一次複写可能演算検出手段12、第二次複写可能演算検出手段13、第一次複写可能演算複写手段14、第二次複写可能演算複写手段15およびループ内不変式移動手段16の間で、ワーク領域32を通じて必要なデータが受け渡される。
【0036】
【発明の効果】
以上説明したように本発明は、ループ内で不変でない演算であっても所定の条件を満たすときはそれをループ内不変式に変形することができる。このため、ループ内不変式の移動の最適化をより多くの演算について実施でき、ループ中で実行される命令数の削減により実行時間を大幅に短縮することが可能となる。
【図面の簡単な説明】
【図1】本発明の第1の実施の形態を示すブロック図である。
【図2】本発明の第1の実施の形態の処理例を示すフローチャートである。
【図3】本発明の第1の実施の形態が適用できるFortranのプログラム片である。
【図4】本発明の第1の実施の形態における第一次複写可能演算複写手段を適用した後の中間テキストのイメージを表すFortranのプログラム片である。
【図5】本発明の第1の実施の形態における第二次複写可能演算複写手段を適用した後の中間テキストのイメージを表すFortranのプログラム片である。
【図6】本発明の第1の実施の形態におけるループ内不変式移動手段を適用した後の中間テキストのイメージを表すFortranのプログラム片である。
【図7】本発明の第2の実施の形態が適用できるFortranのプログラム片である。
【図8】本発明の第2の実施の形態における第一次複写可能演算複写手段および第二次複写可能演算複写手段を適用した後の中間テキストのイメージを表すFortranのプログラム片である。
【図9】本発明の第2の実施の形態におけるループ内不変式移動手段を適用した後の中間テキストのイメージを表すFortranのプログラム片である。
【図10】本発明を適用したコンピュータの構成例を示すブロック図である。
【図11】コンパイラの一般的な構成を示すブロック図である。
【符号の説明】
10 ループ最適化部
11 ループ内不変式検出手段
12 第一次複写可能演算検出手段
13 第二次複写可能演算検出手段
14 第一次複写可能演算複写手段
15 第二次複写可能演算複写手段
16 ループ内不変式移動手段
21 中間テキスト
22 中間テキスト
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an optimization method of a compiler, and particularly calculates an operation that cannot move as an invariant expression in a loop because a variable used in the operation selectively uses an invariant value in the loop. It relates to optimization that transforms as much as possible.
[0002]
[Prior art]
In general, as shown in the compiler 100 of FIG. 11, the compiler inputs a source program 200 described in a high-level language, and performs a lexical analysis, a syntax analysis, a semantic analysis, etc. by a syntax analysis unit 101 to generate an intermediate text 104. Next, the optimization unit 102 generates the intermediate text 105 obtained by performing the optimization process on the intermediate text 104, and then the code generation unit 103 generates the machine language instruction object program 300 from the intermediate text 105 and outputs it. To do. Various optimizations are performed by the optimization unit 102. One of them is to perform useless calculation by moving the invariant expression in the loop existing in the repeatedly executed part (that is, the loop) to the outside of the loop. There is an optimization process that eliminates repetition. Here, the invariant expression in the loop means an operation in which the calculation result is always constant regardless of the number of executions of the loop. The present invention relates to the optimization of such in-loop invariants.
[0003]
Conventionally, optimization of an invariant expression in this kind of loop is performed by detecting an invariant expression in a trivial loop, as shown in Japanese Patent Laid-Open No. 5-189244, and then converting those invariant expressions. Investigate whether the expression used is immutable. For this reason, optimization of movement out of the loop is performed only when the result of the operation has an invariant value in the loop, and variables with invariant values in the loop are selectively defined at multiple locations. In the case of an operation that refers to the variable, such an operation is determined not to be an invariant expression in the loop, and is not subject to optimization.
[0004]
[Problems to be solved by the invention]
However, when an operation refers to a variable that has an invariant value defined in the loop selectively at multiple locations in the loop, the location where the variable is actually defined is different even if it is a different iteration. If they are the same, the result is the same. That is, an operation that obtains the same result is executed many times in the repetition of the loop, and the execution time is long.
[0005]
OBJECT OF THE INVENTION
The object of the present invention is that in a certain operation, even if a variable referred to in the operation is selectively defined as an invariable value in the loop at a plurality of locations in the loop, the invariable value is not changed in the loop. The purpose is to make it possible to modify the program so that as many operations as possible can be moved out of the loop.
[0006]
[Means for Solving the Problems]
According to a first aspect of the present invention, there is provided a syntax analysis unit that reads and analyzes a source program stored in a first storage unit and stores the generated first intermediate text in a second storage unit, and the second storage unit A second intermediate text obtained by performing optimization processing on the first intermediate text read from the first intermediate text is generated and stored in the second storage means; and the second intermediate text read from the second storage means An object code is generated from the intermediate text of 2 and stored in a third storage means, and
The optimization unit reads the first intermediate text from the second storage means, detects a variable whose value is invariant and an operation whose result is invariant in a loop, and obtains the processing result as the second intermediate text. In-loop invariant detection means for storing in the storage means;
The first intermediate text and the processing result of the in-loop invariant detecting means are read from the second storage means, and all the variables used for the operation are invariant in the loop, or a plurality of variables in the loop Primary copyable, defined in places but any one of which is always executed prior to this operation and any of which is a variable that is assigned an invariant value in the loop A primary copyable calculation detecting means for detecting a calculation and storing the processing result in the second storage means;
The first intermediate text and the processing result of the primary copyable calculation detection means are read from the second storage means, and the first copyable calculation detected by the primary copyable calculation detection means is used. On the other hand, the primary copyable operation is copied immediately after the definition of each variable defined in multiple places in the loop used in the operation, and the newly created variable that is temporarily used is copied. A primary copyable operation copying means for replacing the original primary copyable operation with a variable that temporarily retains the result of the primary copyable operation as a result of the operation Including
Since the variable used in the calculation selectively uses an invariant value in the loop, it is modified so that an operation that cannot be moved as an invariant expression in the loop can be calculated outside the loop.
[0007]
According to a second aspect of the present invention, there is provided a syntax analysis unit that reads and analyzes the source program stored in the first storage unit, and stores the generated first intermediate text in the second storage unit, and the second storage unit A second intermediate text obtained by performing optimization processing on the first intermediate text read from the first intermediate text is generated and stored in the second storage means; and the second intermediate text read from the second storage means An object code is generated from the intermediate text of 2 and stored in a third storage means, and
The optimization unit includes:
A loop that reads the first intermediate text from the second storage means, detects a variable whose value is invariant and an operation whose result is invariant in the loop, and stores the processing result in the second storage means Inner invariant detection means;
The first intermediate text and the processing result of the in-loop invariant detecting means are read from the second storage means, and all the variables used for the operation are invariant in the loop, or a plurality of variables in the loop Primary copyable, defined in places but any one of which is always executed prior to this operation and any of which is a variable that is assigned an invariant value in the loop A primary copyable calculation detecting means for detecting a calculation and storing the processing result in the second storage means;
The first intermediate text, the processing result of the in-loop invariant detecting means and the processing result of the primary copyable arithmetic detecting means are read out from the second storage means, and all the variables used for the calculation are The primary copyable calculation detected by the primary copyable calculation detection means, and any of the primary copyable calculations is the same. The variable to which the result is assigned is defined only in one place and is always executed prior to this operation. The second copyable operation is detected, and the processing result is stored in the second storage means. A second copyable operation detection means stored in
The first intermediate text and the processing result of the primary copyable calculation detection means are read from the second storage means, and the first copyable calculation detected by the primary copyable calculation detection means is used. On the other hand, the primary copyable operation is copied immediately after the definition of each variable defined in multiple places in the loop used in the operation, and the newly created variable that is temporarily used is copied. A primary copyable operation copying means for replacing the original primary copyable operation with a variable that temporarily retains the result of the primary copyable operation as a result of the operation ,
The processing result of the second copyable calculation detecting means and the first intermediate text after rewriting by the first copyable calculation detecting means are inputted from the second storage means, and the second copy is possible Each of the variables defined at multiple locations in the loop used in the operation of the primary copyable operation used in the operation, for the second copyable operation detected by the operation detection means Immediately after the primary copyable operation copied immediately after the definition of the variable, the second copyable operation is copied, and the variables defined at a plurality of locations cited in the copied operation are copied. A variable that temporarily replaces the temporary variable used in the primary copyable operation, sets the newly created variable to be temporarily used as the result of the copied operation, and temporarily uses the original secondary copyable operation To the result of the second copyable operation. And a second copy available computing copying means for replacing the assignment to variables that hold,
Since the variable used in the calculation selectively uses an invariant value in the loop, it is modified so that an operation that cannot be moved as an invariant expression in the loop can be calculated outside the loop.
[0009]
[Action]
In the first invention, the invariant detecting means in the loop detects the variable whose value is invariant in the loop and the operation whose result is invariant. All of the variables used are immutable in the loop, or are defined in multiple places in the loop, but one of them is always executed prior to this operation, and all of them are values that are immutable in the loop The primary copyable operation is detected which is one of the assigned variables. Then, the primary copyable operation copying means is defined at a plurality of locations in the loop used in the operation with respect to the primary copyable operation detected by the primary copyable operation detection means. The primary copyable operation is copied immediately after the definition of each variable, and the newly created variable to be used temporarily is used as the result of the copied operation. The variable used in the above is replaced with an assignment to the variable holding the result of the first copyable operation. Thus, the primary copyable operation copied under each condition can be treated as an invariant expression in the loop, and the execution time of the loop can be shortened by moving out of the loop.
[0010]
In the second invention, in addition to the first invention, the second copyable calculation detection means determines whether all of the variables used in the calculation are invariant in the loop or whether the first primary It is either the result of the primary copyable operation detected by the copyable operation detection means, and the variable to which the result of any primary copyable operation is assigned is defined only in one place And a secondary copyable operation that is always executed prior to this operation is detected and detected by the secondary copyable operation detection means by the secondary copyable operation copy means. For the secondary copyable operation, the primary copyable operation used in the operation is copied immediately after the definition of each variable defined in multiple places in the loop used in the operation. The secondary copy is possible immediately after the primary copyable operation. Copy the calculation, replace the variable defined in multiple places cited in the copied operation with the temporary variable used in the above primary copyable operation, and create a new one to be used temporarily The variable is used as the result of the copied operation, and the original second copyable operation is replaced with a variable that temporarily uses the second copyable operation and substituted with the variable that holds the second copyable operation result. As a result, in addition to the primary copyable operation copied under each condition, the secondary copyable operation can also be treated as an invariant expression in the loop. Can be made shorter.
[0012]
First Embodiment of the Invention
Next, a first embodiment of the present invention will be described with reference to the drawings.
[0013]
[Description of configuration]
Referring to FIG. 1, the loop optimization unit 10 of the compiler according to the first embodiment of the present invention includes an in-loop invariant detection means 11, a primary copyable operation detection means 12, and a secondary copyable operation. It includes a detecting means 13, a primary copyable operational copying means 14, a secondary copyable operational copying means 15 and an invariant moving means 16 in the loop, and an intermediate text 21 is inputted and an intermediate text 22 optimized for it is obtained. Output. The intermediate text 21 corresponds to the intermediate text 104 in FIG. 11, the intermediate text 22 corresponds to the intermediate text 105 in FIG. 11, and the loop optimization unit 10 corresponds to the optimization unit 102 in FIG.
[0014]
The in-loop invariant detection means 11 receives the intermediate text 21, searches for and records a variable whose value is invariant in the loop and an operation whose operation result is invariant in the loop.
[0015]
The primary copyable calculation detecting means 12 inputs the intermediate text 21 and the above-mentioned record of the in-loop invariant detecting means 11 and determines whether all of the variables used for the calculation are invariant in the loop. A primary copy that is defined in multiple places, but any one of them is always executed prior to this operation, and any of them is a variable that is assigned an invariant value in the loop Detect possible operations and record them.
[0016]
The secondary copyable calculation detection means 13 receives the intermediate text 21, the in-loop invariant detection means 11 and the records of the primary copyable calculation detection means 12, and all the variables used for the calculation are in the loop. Or the result of the primary copyable operation detected by the primary copyable operation detection means 12, and any primary copyable operation substitutes the result Detects and records secondary copyable operations that are defined only at one location and are always executed prior to this operation.
[0017]
The primary copyable operation copying means 14 receives the intermediate text 21 and the above-mentioned records of the primary copyable operation detection means 12 and detects the primary copyable operation detected by the primary copyable operation detection means 12. In contrast, the primary copyable operation is copied immediately after the definition of each variable defined in multiple places in the loop used in the operation, and the newly created variable that is temporarily used is copied. As a result of the operation, the original primary copyable operation is replaced with a variable that temporarily uses the primary copyable operation, and the replacement intermediate text is recorded. To do.
[0018]
The secondary copyable operation copying means 15 inputs the above-mentioned record of the secondary copyable operation detection means 13 and the intermediate text after the replacement by the primary copyable operation copy means 14, and obtains a secondary copyable operation copy. Each of the variables defined at a plurality of locations in the loop used in the operation of the primary copyable operation used in the operation with respect to the second copyable operation detected by the detecting means 13 Immediately after the primary copyable operation copied immediately after the definition of the above, the above secondary copyable operation is copied, and the variables defined in a plurality of places cited in the copied operation are A variable that temporarily replaces a temporary variable used in the primary copyable operation and that uses the newly created variable that is temporarily used as the result of the copied operation and temporarily uses the original secondary copyable operation. To the above secondary copyable operation Replaced with the assignment of the result to a variable to hold the records the intermediate text after the replacement.
[0019]
The in-loop invariant moving means 16 receives the intermediate text after the replacement by the secondary copyable operation copying means 15 and moves the in-loop invariant existing in the inputted intermediate text out of the loop for optimization. The intermediate text 22 is output.
[0020]
[Description of operation]
Next, the operation of the loop optimization unit 10 of the present exemplary embodiment will be described in detail with reference to FIGS.
[0021]
The in-loop invariant detection means 11 searches the intermediate text 21 for each loop, detects a variable whose value is invariant in the loop and an operation whose result is invariant and records it (step A1 in FIG. 2). For example, in the case of an actual Fortran program piece as shown in FIG. 3, the variables I1, I2, and S are recorded as invariant in the loop.
[0022]
Next, the primary copyable operation detection means 12 determines whether all of the variables used in the operation are invariant in the loop or are defined in a plurality of locations in the loop, but any one of them is necessarily this operation. The first copyable operation is detected, which is one of the variables that are executed prior to and any of which is a variable to which an invariant value is assigned in the loop (step A2 in FIG. 2). For example, in the case of an actual Fortran program fragment as shown in Fig. 3, in the operation IX * S of (3), S is invariant in the loop, and IX is defined in two places (1) and (2). , (1) and I2 in (2) are both substituted with invariable variables in the loop, and are recognized as primary copyable operations.
[0023]
In the above, if there is no detected operation, the processing in FIG. 2 ends. If there is even one, it proceeds to the next step A4 (step A3 in FIG. 2).
[0024]
Next, the secondary copyable calculation detecting means 13 determines whether all of the variables used for the calculation are invariable in the loop or the result of the primary copyable calculation detected in step A2. Any one of the primary copyable operations, the variable to which the result is assigned is defined in only one place and must be executed prior to this operation. An operation search is performed (step A4 in FIG. 2). For example, in the case of an actual Fortran program piece as shown in FIG. 3, in the operation T + S of (4), S is invariant in the loop, and T is the operation of the primary copyable operation ((3) of FIG. 3). As a result, it is recognized as a secondary copyable operation.
[0025]
Next, the primary copyable operation copying means 14 immediately after the definition of each of the variables defined at a plurality of locations in the loop used in the operation for the primary copyable operation searched in step A2. The newly created variable that is temporarily used for copying is used as the result of the copied operation, and the result of the primary copyable operation is obtained from the variable that temporarily uses the original primary copyable operation. Replace with the variable to be held (step A5 in FIG. 2). For example, FIG. 4 shows a case where this copying is performed on an actual Fortran program piece as shown in FIG. The operation IX * S of (3) in FIG. 3 which is the first copyable operation is copied immediately after (1) and (2) of FIG. 3, and the variable defined by the operation is newly generated variable T1. It is changed ((5) and (6) in FIG. 4). Also, the operation IX * S in (3) of FIG. 3 is replaced with the newly generated variable T1 ((7) in FIG. 4).
[0026]
If there is no detected operation in the secondary copyable operation detecting means (step A4 in FIG. 2), the processing in FIG. 2 ends. If there is even one, it proceeds to the next step A7 (step A6 in FIG. 2).
[0027]
Next, the secondary copyable operation copying means 15 performs the operation of the primary copyable operation used in the operation in the loop used in the operation for the secondary copyable operation searched in step A4. Immediately after the primary copyable operation copied immediately after the definition of each of the variables defined in multiple places, the second copyable operation is copied, and a plurality of references cited in the copied operation are made. Replace the variable defined in the location with the temporary variable used in the above primary copyable operation, and use the newly created variable that is temporarily used as the result of the copied operation. The variable that temporarily uses the copyable operation is replaced with an assignment to the variable that holds the result of the second copyable operation (step A7 in FIG. 2). For example, FIG. 5 shows a case where this copying is performed for an actual Fortran program piece as shown in FIG. The operation T + S of (4) in FIG. 3 which is a secondary copyable operation is copied immediately after (5) and (6) of FIG. 4, and T which is the result of the primary copyable operation is a step. The variable is changed to the new variable T1 generated in A3, and the variable defined by the operation is changed to the newly generated variable T2 ((8) and (9) in FIG. 5). Also, the operation T + S in (4) of FIG. 3 is replaced with the newly generated variable T2 ((10) in FIG. 5).
[0028]
The program piece changed as shown in FIG. 5 is transformed as shown in FIG. 6 by the in-loop invariant moving means 16 for optimizing the in-loop invariant movement according to the prior art. The number of execution instructions is reduced and the execution time is shortened.
[0029]
Second Embodiment of the Invention
Next, a second embodiment of the present invention will be described in detail with reference to the drawings.
[0030]
In the first embodiment, the variables to be referred to in the calculation are only variables defined by the primary copyable calculation in the secondary copyable calculation detection means 13 or invariable variables in the loop. The variable (T) defined in the primary copyable operation, such as T + U in (6), and any definition that is defined in multiple locations is executed prior to this operation, and in any definition The present invention can be applied by combining the primary copyable operation copying means 14 and the secondary copyable operation copying means 15 even when a variable (U) into which an invariant value is substituted is mixed in the loop. It is.
[0031]
In the above case, a variable (a U in FIG. 7 (6)) that is defined in a plurality of places and any of the definitions is executed prior to this operation and in each definition is assigned an invariant value in the loop. As for the first copyable operation copying means 14 (step A5 in FIG. 2), the operation is performed immediately after the definition of each of the variables defined at a plurality of locations in the loop used in the operation. The newly created variable that is copied and used temporarily is used as the result of the copied operation, and the original operation is replaced with a variable that temporarily stores the result of the operation. For example, FIG. 8 shows a case where this copying is performed on an actual Fortran program piece as shown in FIG. It is assumed that (7), (10), and (13) in FIG. The operation T + U of (6) in FIG. 7 which is the second copyable operation is copied immediately after (2) and (4) of FIG. 7, and T which is the result of the first copyable operation is a step. The variable is changed to the new variable T1 generated in A3, and the variable defined by the operation is changed to the newly generated variable T2 ((9) and (12) in FIG. 8).
[0032]
Next, with respect to variables defined in the primary copyable operation (T in FIG. 7 (6)), the calculation is performed for the secondary copyable operation (T + U in (6) in FIG. 7). Immediately after the primary duplicatable operation copied immediately after the definition of each of the variables defined in multiple places in the loop used in the operation of the primary duplicatable operation used Copy the second copyable operation, replace the variables defined in multiple places cited in the copied operation with the temporary variables used in the first copyable operation, and temporarily The newly created variable to be used is the result of the copied operation, and the original second copyable operation is replaced with a variable that temporarily uses the second copyable operation and assigned to the variable that holds the second copyable operation result. . For example, FIG. 8 shows a case where this copying is performed on an actual Fortran program piece as shown in FIG. It is assumed that (7), (10), and (13) in FIG. The operation T + U of (6) in FIG. 7 which is the second copyable operation is copied immediately after (7) and (10) of FIG. 8, and T is changed to the new variable T1 generated in step A3. Then, the variable defined by the operation is changed to a newly generated variable T2 ((8) and (11) in FIG. 8). Then, the second copyable operation (T + U in (6) of FIG. 7) is replaced with the newly generated variable T2 ((14) of FIG. 8).
[0033]
The program piece changed as shown in FIG. 8 is transformed as shown in FIG. 9 by the in-loop invariant moving means 16 for optimizing the in-loop invariant movement according to the prior art. The number of execution instructions is reduced and the execution time is shortened.
[0034]
Other Embodiments of the Invention
FIG. 10 is a block diagram illustrating a configuration example of a computer that implements the present invention. The computer in this example includes an external storage device 201 that stores a source program 200 written in a high-level language, an external storage device 301 that stores an object program 300 of generated machine language instructions, and a source program from the external storage device 201. 200, and the input / output unit 31 that outputs the object program 300 to the external storage device 301, the intermediate text 21 obtained by processing the source program 200 by the syntax analysis unit, and the intermediate text 21 obtained by optimizing the intermediate text 21 A computer-readable recording medium such as a memory 33 having a work area 32 for storing intermediate text 22 and temporarily storing various information obtained in the course of optimization processing, and a magnetic disk device for storing a compiling program 34 35, input / output unit 31, memory 33 and computer Consisting of being connected to the recording medium 35 and the central processing unit 36.
[0035]
The compiling program 34 recorded on the computer-readable recording medium 35 is read by the central processing unit 36, and the operation of the compiling program 34 is controlled to optimize the loop according to the first and second embodiments described above. It functions as a compiler having the unit 10. At this time, in the work area 32 of the memory 33, information transferred between each means in the loop optimization unit 10 is temporarily stored. For example, in the first embodiment, the in-loop invariant detection means 11 searches the work area 32 by searching for a variable whose value is invariant in the loop and an operation whose operation result is invariant in the loop. Record. When detecting the primary copyable calculation, the primary copyable calculation detecting means 12 refers to the work area 32 to recognize a variable that is invariant in the loop, and detects the detected primary copy. The calculation is recorded in the work area 32. When detecting the secondary copyable calculation, the secondary copyable calculation detecting means 13 refers to the work area 32 and recognizes a variable that is invariant in the loop, the detected primary copyable calculation, and the like. Then, the detected secondary copyable operation is recorded in the work area. The primary copyable operation copying means 14 recognizes the primary copyable operation detected by the primary copyable operation detection means 12 with reference to the work area 32, and deforms the intermediate text 21. The intermediate text as shown in FIG. 4 is recorded in the work area 32. The secondary copyable operation copying unit 15 refers to the work area 32 and the secondary copyable operation detected by the secondary copyable operation detection unit 13 and the processing result of the primary copyable operation copy unit 14. 5 and the like, and an intermediate process as shown in FIG. The invariant moving means 16 in the loop inputs the intermediate text as shown in FIG. 5 recorded in the work area 32, performs an optimization process relating to the movement of the invariant expression in the loop, and stores the result as the intermediate text 22 in the memory. 33. Similarly in the second embodiment, in-loop invariant detection means 11, primary copyable calculation detection means 12, secondary copyable calculation detection means 13, primary copyable calculation copy means 14, Necessary data is transferred through the work area 32 between the secondary copy enabling operation copying means 15 and the in-loop invariant moving means 16.
[0036]
【The invention's effect】
As described above, according to the present invention, even an operation that is not invariant in a loop can be transformed into an invariant expression in a loop when a predetermined condition is satisfied. For this reason, the optimization of the movement of the invariant expression in the loop can be performed for more operations, and the execution time can be greatly shortened by reducing the number of instructions executed in the loop.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a first embodiment of the present invention.
FIG. 2 is a flowchart illustrating a processing example of the first exemplary embodiment of the present invention.
FIG. 3 is a Fortran program fragment to which the first embodiment of the present invention can be applied.
FIG. 4 is a Fortran program fragment representing an intermediate text image after application of the primary copyable operation copying means in the first embodiment of the present invention.
FIG. 5 is a Fortran program fragment representing an intermediate text image after application of the secondary copyable operation copying means in the first embodiment of the present invention.
FIG. 6 is a Fortran program fragment representing an image of intermediate text after applying the in-loop invariant moving means in the first embodiment of the present invention.
FIG. 7 is a Fortran program fragment to which the second embodiment of the present invention can be applied.
FIG. 8 is a Fortran program fragment representing an intermediate text image after applying the first copyable operation copy means and the second copyable operation copy means in the second embodiment of the present invention.
FIG. 9 is a Fortran program fragment representing an intermediate text image after applying the in-loop invariant moving means in the second embodiment of the present invention.
FIG. 10 is a block diagram illustrating a configuration example of a computer to which the present invention is applied.
FIG. 11 is a block diagram illustrating a general configuration of a compiler.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 10 Loop optimization part 11 In-loop invariant detection means 12 Primary copyable calculation detection means 13 Secondary copyable calculation detection means 14 Primary copyable calculation copy means 15 Secondary copyable calculation copy means 16 Loop Inner invariant moving means 21 Intermediate text 22 Intermediate text

Claims (4)

第1の記憶手段に記憶されたソースプログラムを読み出して解析し、生成した第1の中間テキストを第2の記憶手段に記憶する構文解析部と、前記第2の記憶手段から読み出した第1の中間テキストに対して最適化処理を施した第2の中間テキストを生成し、前記第2の記憶手段に記憶する最適化部と、前記第2の記憶手段から読み出した第2の中間テキストからオブジェクトコードを生成し、第3の記憶手段に記憶するコード生成部とを備え、且つ、
前記最適化部は、前記第2の記憶手段から前記第1の中間テキストを読み出し、ループ内で値が不変である変数と結果が不変である演算を検出し、その処理結果を前記第2の記憶手段に記憶するループ内不変式検出手段と、
前記第2の記憶手段から前記第1の中間テキストと前記ループ内不変式検出手段の処理結果とを読み出し、演算に使用される変数の全てが、ループ内で不変であるか、ループ内の複数箇所で定義されているがそのいずれかが必ずこの演算に先立って実行されかつそのいずれもがループ内で不変の値が代入されている変数であるかのいずれかである、第一次複写可能演算を検出し、その処理結果を前記第2の記憶手段に記憶する第一次複写可能演算検出手段と、
前記第2の記憶手段から前記第1の中間テキストと前記第一次複写可能演算検出手段の処理結果とを読み出し、前記第一次複写可能演算検出手段で検出された第一次複写可能演算に対して、演算で使用しているループ内の複数箇所で定義されている変数の各々の定義の直後に第一次複写可能演算を複写し、さらに一時的に使用する新しく作成した変数を複写された演算の結果とし、元の前記第一次複写可能演算を一時的に使用する変数から上記第一次複写可能演算の結果を保持する変数への代入に置き換える第一次複写可能演算複写手段とを含み、
演算で使用している変数がループ内で不変な値を選択的に使用しているためにループ内不変式として移動できない演算をループの外で計算できるように変形することを特徴とするループ内不変な式の移動に関する最適化方式。
A source program stored in the first storage means is read and analyzed, a syntax analysis unit that stores the generated first intermediate text in the second storage means, and a first read out from the second storage means An optimization unit that generates a second intermediate text obtained by performing an optimization process on the intermediate text and stores the second intermediate text in the second storage unit; and an object from the second intermediate text read from the second storage unit A code generation unit that generates a code and stores the code in a third storage unit; and
The optimization unit reads the first intermediate text from the second storage means, detects a variable whose value is invariant and an operation whose result is invariant in a loop, and obtains the processing result as the second intermediate text. In-loop invariant detection means for storing in the storage means;
The first intermediate text and the processing result of the in-loop invariant detecting means are read from the second storage means, and all the variables used for the operation are invariant in the loop, or a plurality of variables in the loop Primary copyable, defined in places but any one of which is always executed prior to this operation and any of which is a variable that is assigned an invariant value in the loop A primary copyable calculation detecting means for detecting a calculation and storing the processing result in the second storage means;
The first intermediate text and the processing result of the primary copyable calculation detection means are read from the second storage means, and the first copyable calculation detected by the primary copyable calculation detection means is used. On the other hand, the primary copyable operation is copied immediately after the definition of each variable defined in multiple places in the loop used in the operation, and the newly created variable that is temporarily used is copied. A primary copyable operation copying means for replacing the original primary copyable operation with a variable that temporarily retains the result of the primary copyable operation as a result of the operation Including
In a loop that is modified so that an operation that cannot be moved as an invariant expression in the loop because the variable used in the operation selectively uses an invariant value in the loop can be calculated outside the loop Optimization method for moving invariant expressions.
第1の記憶手段に記憶されたソースプログラムを読み出して解析し、生成した第1の中間テキストを第2の記憶手段に記憶する構文解析部と、前記第2の記憶手段から読み出した第1の中間テキストに対して最適化処理を施した第2の中間テキストを生成し、前記第2の記憶手段に記憶する最適化部と、前記第2の記憶手段から読み出した第2の中間テキストからオブジェクトコードを生成し、第3の記憶手段に記憶するコード生成部とを備え、且つ、
前記最適化部は、
前記第2の記憶手段から前記第1の中間テキストを読み出し、ループ内で値が不変である変数と結果が不変である演算を検出し、その処理結果を前記第2の記憶手段に記憶するループ内不変式検出手段と、
前記第2の記憶手段から前記第1の中間テキストと前記ループ内不変式検出手段の処理結果とを読み出し、演算に使用される変数の全てが、ループ内で不変であるか、ループ内の複数箇所で定義されているがそのいずれかが必ずこの演算に先立って実行されかつそのいずれもがループ内で不変の値が代入されている変数であるかのいずれかである、第一次複写可能演算を検出し、その処理結果を前記第2の記憶手段に記憶する第一次複写可能演算検出手段と、
前記第2の記憶手段から前記第1の中間テキストと前記ループ内不変式検出手段の処理結果と前記第一次複写可能演算検出手段の処理結果とを読み出し、演算に使用される変数の全てが、ループ内で不変であるか、前記第一次複写可能演算検出手段で検出された第一次複写可能演算の結果であるかのいずれかであり、かついずれの第一次複写可能演算もその結果を代入される変数は1箇所でのみ定義されていてかつ必ずこの演算に先立って実行されているものである、第二次複写可能演算を検出し、その処理結果を前記第2の記憶手段に記憶する第二次複写可能演算検出手段と、
前記第2の記憶手段から前記第1の中間テキストと前記第一次複写可能演算検出手段の 処理結果とを読み出し、前記第一次複写可能演算検出手段で検出された第一次複写可能演算に対して、演算で使用しているループ内の複数箇所で定義されている変数の各々の定義の直後に第一次複写可能演算を複写し、さらに一時的に使用する新しく作成した変数を複写された演算の結果とし、元の前記第一次複写可能演算を一時的に使用する変数から上記第一次複写可能演算の結果を保持する変数への代入に置き換える第一次複写可能演算複写手段と、
前記第2の記憶手段から前記第二次複写可能演算検出手段の処理結果と前記第一次複写可能演算検出手段による書き換え後の前記第1の中間テキストとを入力し、前記第二次複写可能演算検出手段で検出された第二次複写可能演算に対して、演算で使用している第一次複写可能演算の、演算で使用しているループ内の複数箇所で定義されている変数の各々の定義の直後に複写された第一次複写可能演算の直後に、前記第二次複写可能演算を複写し、その複写した演算で引用している複数の箇所で定義されている変数を前記第一次複写可能演算で使用した一時的な変数に置き換え、さらに一時的に使用する新しく作成した変数を複写された演算の結果とし、元の前記第二次複写可能演算を一時的に使用する変数から前記第二次複写可能演算の結果を保持する変数への代入に置き換える第二次複写可能演算複写手段とを含み、
演算で使用している変数がループ内で不変な値を選択的に使用しているためにループ内不変式として移動できない演算をループの外で計算できるように変形することを特徴とするループ内不変な式の移動に関する最適化方式。
A source program stored in the first storage means is read and analyzed, a syntax analysis unit that stores the generated first intermediate text in the second storage means, and a first read out from the second storage means An optimization unit that generates a second intermediate text obtained by performing an optimization process on the intermediate text and stores the second intermediate text in the second storage unit; and an object from the second intermediate text read from the second storage unit A code generation unit that generates a code and stores the code in a third storage unit; and
The optimization unit includes:
A loop that reads the first intermediate text from the second storage means, detects a variable whose value is invariant and an operation whose result is invariant in the loop, and stores the processing result in the second storage means Inner invariant detection means;
The first intermediate text and the processing result of the in-loop invariant detecting means are read from the second storage means, and all the variables used for the operation are invariant in the loop, or a plurality of variables in the loop Primary copyable, defined in places but any one of which is always executed prior to this operation and any of which is a variable that is assigned an invariant value in the loop A primary copyable calculation detecting means for detecting a calculation and storing the processing result in the second storage means;
The first intermediate text, the processing result of the in-loop invariant detecting means and the processing result of the primary copyable arithmetic detecting means are read out from the second storage means, and all the variables used for the calculation are The primary copyable calculation detected by the primary copyable calculation detection means, and any of the primary copyable calculations is the same. The variable to which the result is assigned is defined only in one place and is always executed prior to this operation. The second copyable operation is detected, and the processing result is stored in the second storage means. A second copyable operation detection means stored in
The first intermediate text and the processing result of the primary copyable calculation detection means are read from the second storage means, and the first copyable calculation detected by the primary copyable calculation detection means is used. On the other hand, the primary copyable operation is copied immediately after the definition of each variable defined in multiple places in the loop used in the operation, and the newly created variable that is temporarily used is copied. A primary copyable operation copying means for replacing the original primary copyable operation with a variable that temporarily retains the result of the primary copyable operation as a result of the operation ,
The processing result of the second copyable calculation detecting means and the first intermediate text after rewriting by the first copyable calculation detecting means are inputted from the second storage means, and the second copy is possible Each of the variables defined at multiple locations in the loop used in the operation of the primary copyable operation used in the operation, for the second copyable operation detected by the operation detection means Immediately after the primary copyable operation copied immediately after the definition of the variable, the second copyable operation is copied, and the variables defined at a plurality of locations cited in the copied operation are copied. A variable that temporarily replaces the temporary variable used in the primary copyable operation, sets the newly created variable to be temporarily used as the result of the copied operation, and temporarily uses the original secondary copyable operation To the result of the second copyable operation. And a second copy available computing copying means for replacing the assignment to variables that hold,
In a loop that is modified so that an operation that cannot be moved as an invariant expression in the loop because the variable used in the operation selectively uses an invariant value in the loop can be calculated outside the loop Optimization method for moving invariant expressions.
コンピュータを、
第1の記憶手段に記憶されたソースプログラムを読み出して解析し、生成した第1の中間テキストを第2の記憶手段に記憶する構文解析部、
前記第2の記憶手段から読み出した第1の中間テキストに対して最適化処理を施した第2の中間テキストを生成し、前記第2の記憶手段に記憶する最適化部であって、
前記第2の記憶手段から前記第1の中間テキストを読み出し、ループ内で値が不変である変数と結果が不変である演算を検出し、その処理結果を前記第2の記憶手段に記憶するループ内不変式検出手段と、
前記第2の記憶手段から前記第1の中間テキストと前記ループ内不変式検出手段の処理結果とを読み出し、演算に使用される変数の全てが、ループ内で不変であるか、ループ内の複数箇所で定義されているがそのいずれかが必ずこの演算に先立って実行されかつそのいずれもがループ内で不変の値が代入されている変数であるかのいずれかである、第一次複写可能演算を検出し、その処理結果を前記第2の記憶手段に記憶する第一次複写可能演算検出手段と、
前記第2の記憶手段から前記第1の中間テキストと前記第一次複写可能演算検出手段の処理結果とを読み出し、前記第一次複写可能演算検出手段で検出された第一次複写可能演算に対して、演算で使用しているループ内の複数箇所で定義されている変数の各々の定義の直後に第一次複写可能演算を複写し、さらに一時的に使用する新しく作成した変数を複写された演算の結果とし、元の前記第一次複写可能演算を一時的に使用する変数から上記第一次複写可能演算の結果を保持する変数への代入に置き換える第一次複写可能演算複写手段とを含む最適化部、
前記第2の記憶手段から読み出した第2の中間テキストからオブジェクトコードを生成し、第3の記憶手段に記憶するコード生成部、
として機能させるためのプログラムであって、演算で使用している変数がループ内で不変な値を選択的に使用しているためにループ内不変式として移動できない演算をループの外で計算できるように変形することを特徴とするプログラム。
Computer
A syntax analysis unit that reads and analyzes the source program stored in the first storage unit, and stores the generated first intermediate text in the second storage unit;
An optimization unit that generates a second intermediate text obtained by performing an optimization process on the first intermediate text read from the second storage unit, and stores the second intermediate text in the second storage unit;
A loop that reads the first intermediate text from the second storage means, detects a variable whose value is invariant and an operation whose result is invariant in the loop, and stores the processing result in the second storage means Inner invariant detection means;
The first intermediate text and the processing result of the in-loop invariant detecting means are read from the second storage means, and all the variables used for the operation are invariant in the loop, or a plurality of variables in the loop Primary copyable, defined in places but any one of which is always executed prior to this operation and any of which is a variable that is assigned an invariant value in the loop A primary copyable calculation detecting means for detecting a calculation and storing the processing result in the second storage means;
The first intermediate text and the processing result of the primary copyable calculation detection means are read from the second storage means, and the first copyable calculation detected by the primary copyable calculation detection means is used. On the other hand, the primary copyable operation is copied immediately after the definition of each variable defined in multiple places in the loop used in the operation, and the newly created variable that is temporarily used is copied. A primary copyable operation copying means for replacing the original primary copyable operation with a variable that temporarily retains the result of the primary copyable operation as a result of the operation Optimization part, including
A code generation unit for generating an object code from the second intermediate text read from the second storage unit and storing the object code in a third storage unit;
This is a program that can be used as an invariant expression in a loop because a variable used in the operation selectively uses an invariant value in the loop. A program characterized by being transformed into
コンピュータを、
第1の記憶手段に記憶されたソースプログラムを読み出して解析し、生成した第1の中間テキストを第2の記憶手段に記憶する構文解析部、
前記第2の記憶手段から読み出した第1の中間テキストに対して最適化処理を施した第2の中間テキストを生成し、前記第2の記憶手段に記憶する最適化部であって、
前記第2の記憶手段から前記第1の中間テキストを読み出し、ループ内で値が不変である変数と結果が不変である演算を検出し、その処理結果を前記第2の記憶手段に記憶するループ内不変式検出手段と、
前記第2の記憶手段から前記第1の中間テキストと前記ループ内不変式検出手段の処理結果とを読み出し、演算に使用される変数の全てが、ループ内で不変であるか、ループ内の複数箇所で定義されているがそのいずれかが必ずこの演算に先立って実行されかつそのいずれもがループ内で不変の値が代入されている変数であるかのいずれかである、第一次複写可能演算を検出し、その処理結果を前記第2の記憶手段に記憶する第一次複写可能演算検出手段と、
前記第2の記憶手段から前記第1の中間テキストと前記ループ内不変式検出手段の処理結果と前記第一次複写可能演算検出手段の処理結果とを読み出し、演算に使用される変数の全てが、ループ内で不変であるか、前記第一次複写可能演算検出手段で検出された第一次複写可能演算の結果であるかのいずれかであり、かついずれの第一次複写可能演算もその結果を代入される変数は1箇所でのみ定義されていてかつ必ずこの演算に先立って実行されているものである、第二次複写可能演算を検出し、その処理結果を前記第2の記憶手段に記憶する第二次複写可能演算検出手段と、
前記第2の記憶手段から前記第1の中間テキストと前記第一次複写可能演算検出手段の処理結果とを読み出し、前記第一次複写可能演算検出手段で検出された第一次複写可能演算に対して、演算で使用しているループ内の複数箇所で定義されている変数の各々の定義の直後に第一次複写可能演算を複写し、さらに一時的に使用する新しく作成した変数を複写された演算の結果とし、元の前記第一次複写可能演算を一時的に使用する変数から上記第一次複写可能演算の結果を保持する変数への代入に置き換える第一次複写可能演算複写手段と、
前記第2の記憶手段から前記第二次複写可能演算検出手段の処理結果と前記第一次複写可能演算検出手段による書き換え後の前記第1の中間テキストとを入力し、前記第二次複写可能演算検出手段で検出された第二次複写可能演算に対して、演算で使用している第一次複写可能演算の、演算で使用しているループ内の複数箇所で定義されている変数の各々の定義の直後に複写された第一次複写可能演算の直後に、前記第二次複写可能演算を複写し、その複写した演算で引用している複数の箇所で定義されている変数を前記第一次複写可能演算で使用した一時的な変数に置き換え、さらに一時的に使用する新しく作成した変数を複写された演算の結果とし、元の前記第二次複写可能演算を一時的に使用する変数から前記第二次複写可能演算の結果を保持する変数への代入に置き換える第二次複写可能演算複写手段とを含む最適化部、
前記第2の記憶手段から読み出した第2の中間テキストからオブジェクトコードを生成し、第3の記憶手段に記憶するコード生成部、
として機能させるためのプログラムであって、演算で使用している変数がループ内で不変な値を選択的に使用しているためにループ内不変式として移動できない演算をループの外で計算できるように変形することを特徴とするプログラム。
Computer
A syntax analysis unit that reads and analyzes the source program stored in the first storage unit, and stores the generated first intermediate text in the second storage unit;
An optimization unit that generates a second intermediate text obtained by performing an optimization process on the first intermediate text read from the second storage unit, and stores the second intermediate text in the second storage unit;
A loop that reads the first intermediate text from the second storage means, detects a variable whose value is invariant and an operation whose result is invariant in the loop, and stores the processing result in the second storage means Inner invariant detection means;
The first intermediate text and the processing result of the in-loop invariant detecting means are read from the second storage means, and all the variables used for the operation are invariant in the loop, or a plurality of variables in the loop Primary copyable, defined in places but any one of which is always executed prior to this operation and any of which is a variable that is assigned an invariant value in the loop A primary copyable calculation detecting means for detecting a calculation and storing the processing result in the second storage means;
The first intermediate text, the processing result of the in-loop invariant detecting means and the processing result of the primary copyable arithmetic detecting means are read out from the second storage means, and all the variables used for the calculation are The primary copyable calculation detected by the primary copyable calculation detection means, and any of the primary copyable calculations is the same. The variable to which the result is assigned is defined only in one place and is always executed prior to this operation. The second copyable operation is detected, and the processing result is stored in the second storage means. A second copyable operation detection means stored in
The first intermediate text and the processing result of the primary copyable calculation detection means are read from the second storage means, and the first copyable calculation detected by the primary copyable calculation detection means is used. On the other hand, the primary copyable operation is copied immediately after the definition of each variable defined in multiple places in the loop used in the operation, and the newly created variable that is temporarily used is copied. A primary copyable operation copying means for replacing the original primary copyable operation with a variable that temporarily retains the result of the primary copyable operation as a result of the operation ,
The processing result of the second copyable calculation detecting means and the first intermediate text after rewriting by the first copyable calculation detecting means are inputted from the second storage means, and the second copy is possible Each of the variables defined at multiple locations in the loop used in the operation of the primary copyable operation used in the operation, for the second copyable operation detected by the operation detection means Immediately after the primary copyable operation copied immediately after the definition of the variable, the second copyable operation is copied, and the variables defined at a plurality of locations cited in the copied operation are copied. A variable that temporarily replaces the temporary variable used in the primary copyable operation, sets the newly created variable to be temporarily used as the result of the copied operation, and temporarily uses the original secondary copyable operation To the result of the second copyable operation. Optimization unit and a secondary copiable operation copying means for replacing the assignment to variables that hold,
A code generation unit for generating an object code from the second intermediate text read from the second storage unit and storing the object code in a third storage unit;
This is a program that can be used as an invariant expression in a loop because a variable used in the operation selectively uses an invariant value in the loop. A program characterized by being transformed into
JP2002219284A 2002-07-29 2002-07-29 Optimization method and program for moving invariant expressions in loop Expired - Fee Related JP3922699B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002219284A JP3922699B2 (en) 2002-07-29 2002-07-29 Optimization method and program for moving invariant expressions in loop

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002219284A JP3922699B2 (en) 2002-07-29 2002-07-29 Optimization method and program for moving invariant expressions in loop

Publications (2)

Publication Number Publication Date
JP2004062489A JP2004062489A (en) 2004-02-26
JP3922699B2 true JP3922699B2 (en) 2007-05-30

Family

ID=31940226

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002219284A Expired - Fee Related JP3922699B2 (en) 2002-07-29 2002-07-29 Optimization method and program for moving invariant expressions in loop

Country Status (1)

Country Link
JP (1) JP3922699B2 (en)

Also Published As

Publication number Publication date
JP2004062489A (en) 2004-02-26

Similar Documents

Publication Publication Date Title
JP4181326B2 (en) Method, apparatus and program for code optimization
US20230004368A1 (en) Multi-chip compatible compiling method and device
WO2010013370A1 (en) Program conversion device and program conversion method
CN104536898B (en) The detection method of c program parallel regions
Yuki et al. Array dataflow analysis for polyhedral X10 programs
CN100462920C (en) Generating unwind information for optimized programs
JP4041248B2 (en) COMPILER DEVICE, COMPUTER-READABLE RECORDING MEDIUM CONTAINING COMPILING PROGRAM, AND COMPILING METHOD
KR20010086159A (en) Method for platform specific efficiency enhancement of java programs and software product therefor
Çiçek et al. A type theory for incremental computational complexity with control flow changes
Serbinowska et al. Behaverify: Verifying temporal logic specifications for behavior trees
US7917899B2 (en) Program development apparatus, method for developing a program, and a computer program product for executing an application for a program development apparatus
US10013244B2 (en) Apparatus and method to compile a variadic template function
EP1164477A2 (en) A loop optimization method and a compiler
JP2023045347A (en) Program and information processing method
JP3922699B2 (en) Optimization method and program for moving invariant expressions in loop
JP3840149B2 (en) Compiler, arithmetic processing system, and arithmetic processing method
Paulweber et al. CASM-IR: uniform ASM-based intermediate representation for model specification, execution, and transformation
JP2017091070A (en) Executable code generation program and executable code generation apparatus
JP3225940B2 (en) Program optimization method and apparatus
JP7653021B2 (en) Compiler, compiling method, and compiler device
CN118760436B (en) Compiler performance optimization method
JP2002082811A (en) Compilation method and recording medium
Malviya et al. Code optimization using code purifier
Pirkelbauer et al. CompilerGPT: Analyzing and Acting Upon Compiler Optimization Reports using LLMs
JP6898556B2 (en) Information processing equipment, compilation method and compilation program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040419

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060925

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061003

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061201

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: 20070130

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070219

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20100302

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110302

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120302

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130302

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130302

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20140302

Year of fee payment: 7

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees