JP2013242604A - Execution module optimization device, execution module optimization method and program - Google Patents

Execution module optimization device, execution module optimization method and program Download PDF

Info

Publication number
JP2013242604A
JP2013242604A JP2010203616A JP2010203616A JP2013242604A JP 2013242604 A JP2013242604 A JP 2013242604A JP 2010203616 A JP2010203616 A JP 2010203616A JP 2010203616 A JP2010203616 A JP 2010203616A JP 2013242604 A JP2013242604 A JP 2013242604A
Authority
JP
Japan
Prior art keywords
optimization
information
location
execution module
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2010203616A
Other languages
Japanese (ja)
Inventor
Satoshi Miki
聡 三木
Takashi Nakamura
孝史 中村
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.)
FIXSTARS MULTI CORE LABO CORP
Original Assignee
FIXSTARS MULTI CORE LABO CORP
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by FIXSTARS MULTI CORE LABO CORP filed Critical FIXSTARS MULTI CORE LABO CORP
Priority to JP2010203616A priority Critical patent/JP2013242604A/en
Priority to PCT/JP2011/059387 priority patent/WO2012032807A1/en
Publication of JP2013242604A publication Critical patent/JP2013242604A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management

Abstract

PROBLEM TO BE SOLVED: To solve the problem of conventional compiler devices, in which optimization of an execution module cannot be performed.SOLUTION: Optimization of an execution module can be performed by an execution module optimization device including: a disassembling unit for disassembling the execution module and obtaining an assembly program; an optimization part detection unit for detecting one or more optimization parts from the assembly program, using optimization part detection information; an altering unit for altering the optimization part using alteration information corresponding to the optimization part detection information used when each optimization part is detected, and obtaining an optimized assembly program; and an execution unit 108 for executing the optimized assembly program.

Description

本発明は、実行モジュールを最適化する実行モジュール最適化装置等に関するものである。   The present invention relates to an execution module optimizing device that optimizes an execution module.

従来、ソースコードをコンパイルし、実行モジュールを作成するコンパイラ装置において、ソースコードを最適化し、実行モジュールを作成するコンパイラ装置が開発されている。(例えば、非特許文献1参照)。   Conventionally, in a compiler apparatus that compiles source code and creates an execution module, a compiler apparatus that optimizes the source code and creates an execution module has been developed. (For example, refer nonpatent literature 1).

“インテル C++ コンパイラー 11.1 プロフェッショナル エディション 詳細”、[online]、インテル株式会社、[2010年8月4日検索]、インターネット<URL:http://download.intel.com/jp/software/doc/compilers/reseller_productpage_cpp_compiler_windows.pdf>“Intel C ++ Compiler 11.1 Professional Edition Details”, [online], Intel Corporation, [searched August 4, 2010], Internet <URL: http://download.intel.com/software/doc/ compilers / reseller_productpage_cpp_compiler_windows.pdf>

しかしながら、従来のコンパイラ装置においては、コンパイル済の実行モジュールを最適化できないという課題があった。   However, the conventional compiler apparatus has a problem that a compiled execution module cannot be optimized.

本第一の発明の実行モジュール最適化装置は、1以上の実行モジュールを格納し得る実行モジュール格納部と、処理の最適化が可能な箇所である最適化箇所を検出するための情報である最適化箇所検出情報と、最適化箇所検出情報を用いて検出された最適化箇所を変更するための情報である変更情報とを有する1以上の最適化情報を格納し得る最適化情報格納部と、実行モジュールを識別する実行モジュール識別子を有する指示を受け付ける受付部と、指示に含まれる実行モジュール識別子で識別される実行モジュールを、実行モジュール格納部から読み出し、逆アセンブルし、実行モジュールに対応するアセンブリプログラムを得る逆アセンブル部と、最適化情報格納部の1以上の最適化箇所検出情報を用いて、アセンブリプログラムから1以上の最適化箇所を検出する最適化箇所検出部と、1以上の各最適化箇所に対して、各最適化箇所を検出する際に用いられた最適化箇所検出情報に対応する変更情報を最適化情報格納部から取得し、変更情報を用いて1以上の最適化箇所を変更し、最適化されたアセンブリプログラムを取得する変更部と、最適化されたアセンブリプログラムを実行する実行部とを具備する実行モジュール最適化装置である。   The execution module optimizing device according to the first aspect of the present invention includes an execution module storage that can store one or more execution modules, and an optimization that is information for detecting an optimization location that is a location where processing can be optimized. An optimization information storage unit that can store one or more pieces of optimization information having optimization location detection information and change information that is information for changing the optimization location detected using the optimization location detection information; An accepting unit that accepts an instruction having an execution module identifier that identifies an execution module, and an execution module that is identified by the execution module identifier included in the instruction is read from the execution module storage unit, disassembled, and an assembly program corresponding to the execution module From the assembly program using the disassembly unit that obtains the information and one or more optimization location detection information in the optimization information storage unit Optimized change information corresponding to the optimized location detection information used when detecting each optimized location for the optimized location detection unit that detects the above optimized locations and one or more optimized locations A change unit that acquires from the optimization information storage unit, changes one or more optimization locations using the change information, and acquires an optimized assembly program; and an execution unit that executes the optimized assembly program This is an execution module optimization device.

このような構成により、実行モジュールを最適化することができる。   With such a configuration, the execution module can be optimized.

また、本第二の発明の実行モジュール最適化装置は、第一の発明に対して、最適化情報は、最適化箇所検出情報と、収集すべきパラメータを示すパラメータ情報と、変更情報とを有し、最適化箇所検出部は、最適化箇所検出情報を用いて、アセンブリプログラムからループである1以上の最適化箇所候補を検出する最適化箇所候補検出手段と、最適化箇所候補検出手段が検出した1以上の各最適化箇所候補から、予め決められたパターンに合致する情報を取得し、情報が予め決められた条件に合致するか否かを判断し、合致する場合に、情報に対応する箇所を最適化箇所候補に決定する静的解析を行う静的解析手段と、静的解析手段が決定した1以上の各最適化箇所候補に対して、パラメータ情報が示すパラメータを収集するためのアセンブリプログラム命令列を最適化箇所候補の前に挿入し、プロファイルプログラムを生成するプロファイルプログラム生成手段と、プロファイルプログラムを実行し、1以上のパラメータを取得する動的解析を行う動的解析手段と、1以上のパラメータが、予め決められた条件に合致するか否かを判断する判断手段と、1以上のパラメータが予め決められた条件に合致する場合に、1以上の各最適化箇所候補を最適化箇所に決定する決定手段とを具備する実行モジュール最適化装置である。   In addition, the execution module optimization device according to the second aspect of the invention has the optimization information including the optimization location detection information, the parameter information indicating the parameters to be collected, and the change information. Then, the optimization location detection unit detects the optimization location candidate detection means for detecting one or more optimization location candidates that are loops from the assembly program using the optimization location detection information, and the optimization location candidate detection means detects Information that matches a predetermined pattern is acquired from the one or more candidate optimization locations, and it is determined whether or not the information matches a predetermined condition. Static analysis means for performing static analysis to determine a location as an optimization location candidate, and an assembly for collecting parameters indicated by the parameter information for each of one or more optimization location candidates determined by the static analysis means A program instruction sequence that inserts a program instruction sequence in front of an optimization location candidate and generates a profile program; a dynamic analysis unit that executes the profile program and performs dynamic analysis to acquire one or more parameters; Judgment means for judging whether or not the above parameters meet a predetermined condition, and if one or more parameters meet a predetermined condition, optimize one or more optimization location candidates An execution module optimizing device comprising a determining means for determining a location.

このような構成により、実行モジュールのループ部分について最適化することができる。   With such a configuration, the loop portion of the execution module can be optimized.

また、本第三の発明の実行モジュール最適化装置は、第二の発明に対して、プロファイルプログラム生成手段は、1以上の各最適化箇所候補を複写し、複写した1以上の各最適化箇所候補の直前にパラメータ情報が示すパラメータを収集するためのアセンブリプログラム命令列を挿入し、1以上の元の各最適化箇所候補の直前に、挿入したアセンブリプログラム命令列の直前にジャンプするアセンブリプログラム命令を挿入する実行モジュール最適化装置である。   The execution module optimizing apparatus according to the third aspect of the present invention is different from the second aspect in that the profile program generating means copies one or more optimization location candidates and copies the one or more optimization locations. An assembly program instruction sequence for collecting parameters indicated by the parameter information immediately before the candidate and jumping immediately before the inserted assembly program instruction sequence immediately before one or more original optimization location candidates Is an execution module optimizing device for inserting

このような構成により、実行モジュールのループ部分について最適化することができる。   With such a configuration, the loop portion of the execution module can be optimized.

また、本第四の発明の実行モジュール最適化装置は、第二または第三の発明に対して、アセンブリプログラムを実行し、各命令の負荷を取得するプロファイラを格納し得るプロファイラ格納部をさらに具備し、最適化箇所候補検出手段は、最適化箇所検出情報を用いて、アセンブリプログラムから1以上のループを検出し、アセンブリプログラムに対してプロファイラを実行し、各命令の負荷を取得し、負荷が閾値を超える命令を有するループを1以上の最適化箇所候補として検出する実行モジュール最適化装置である。   The execution module optimizing device according to the fourth aspect of the present invention further includes a profiler storage unit that can store a profiler that executes an assembly program and obtains the load of each instruction, as compared with the second or third aspect of the invention. Then, the optimization location candidate detection means detects one or more loops from the assembly program using the optimization location detection information, executes a profiler for the assembly program, acquires the load of each instruction, An execution module optimizing device that detects a loop having an instruction exceeding a threshold as one or more optimization location candidates.

このような構成により、実行モジュールの負荷の高い部分について最適化することができる。   With such a configuration, it is possible to optimize the high load portion of the execution module.

また、本第五の発明の実行モジュール最適化装置は、第二から第四いずれかの発明に対して、最適化箇所候補検出手段は、最適化箇所検出情報を用いて、アセンブリプログラムから1以上のループを検出し、アセンブリプログラムから、アセンブリプログラムを構成する各命令をノードとする2以上のノードを有する制御フローグラフを作成し、制御フローグラフから、任意の1つのノードが起点となるループであって、起点となるノードに戻る直前のノードと起点となるノードとが支配関係にあるループである支配ループである1以上の最適化箇所候補を検出する実行モジュール最適化装置である。   The execution module optimizing device according to the fifth aspect of the present invention is the second to fourth aspects of the invention, wherein the optimization location candidate detection means uses the optimization location detection information to determine one or more from the assembly program. A control flow graph having two or more nodes having each instruction constituting the assembly program as a node is created from the assembly program. From the control flow graph, an arbitrary one node is a starting point. The execution module optimizing device detects one or more optimization location candidates that are dominating loops in which the node immediately before returning to the starting node and the starting node are in a dominating relationship.

このような構成により、実行モジュールの支配ループについて最適化することができる。   With such a configuration, it is possible to optimize the dominant loop of the execution module.

また、本第六の発明の実行モジュール最適化装置は、第二から第五の発明に対して、パラメータ情報は、ループ回数と、ポインタがオーバーラップするか否かを示す情報であり、静的解析手段は、最適化箇所候補検出手段が検出した1以上の各最適化箇所候補に対して、ループ不変値と、配列にアクセスするための誘導変数とを取得し、取得したループ不変値と誘導変数とを用いて、最適化箇所候補において配列に対するメモリストアが行われているか否かを判断し、行われている場合に、箇所を最適化箇所候補に決定する静的解析を行い、判断手段は、動的解析手段が取得したループ回数が閾値以上であり、かつポインタがオーバーラップするか否かを示す情報が、ポインタがオーバーラップしないことを示す情報であるか否かを判断し、決定手段は、判断手段が、ループ回数が閾値以上であり、かつポインタがオーバーラップするか否かを示す情報が、ポインタがオーバーラップしないことを示す情報であると判断した最適化箇所候補を、最適化箇所に決定し、変更部は、判断手段が最適化箇所に決定した最適化箇所に対して、複数のプロセッサにおいて並列に実行できるアセンブリプログラム命令列に変更するマルチコア並列化を施す実行モジュール最適化装置である。   In the execution module optimizing device according to the sixth aspect of the present invention, the parameter information is information indicating whether the number of loops and the pointer overlap or not. The analysis unit acquires a loop invariant value and a guidance variable for accessing the array for each of one or more optimization site candidates detected by the optimization site candidate detection unit, and acquires the obtained loop invariant value and the guidance. The variable is used to determine whether or not a memory store for the sequence is performed in the optimization location candidate, and if so, a static analysis is performed to determine the location as the optimization location candidate, and determination means Determines whether the number of loops acquired by the dynamic analysis means is greater than or equal to a threshold and whether the pointers overlap or not is information indicating that the pointers do not overlap, The determining unit determines the optimization location candidate that the determining unit determines that the number of loops is equal to or greater than a threshold value and the information indicating whether or not the pointer overlaps is information indicating that the pointer does not overlap. The optimization part is determined as the optimization part, and the changing unit performs the multi-core parallelization to change the assembly part instruction sequence that can be executed in parallel in a plurality of processors to the optimization part determined by the judging means as the optimization part. Device.

このような構成により、マルチコア並列化により、実行モジュールを最適化することができる。   With such a configuration, execution modules can be optimized by multi-core parallelization.

また、本第七の発明の実行モジュール最適化装置は、第二から第五の発明に対して、パラメータ情報は、ループ回数と、ポインタがオーバーラップするか否かを示す情報であり、静的解析手段は、最適化箇所候補検出手段が検出した1以上の各最適化箇所候補に対して、変数名を取得し、取得した変数名を用いて、最適化箇所候補において変数間の依存関係が存在するか否かを判断し、存在しない場合に、箇所を最適化箇所候補に決定する静的解析を行い、判断手段は、動的解析手段が取得したループ回数が閾値以上であり、かつポインタがオーバーラップするか否かを示す情報が、ポインタがオーバーラップしないことを示す情報であるか否かを判断し、決定手段は、判断手段が、ループ回数が閾値以上であり、かつポインタがオーバーラップするか否かを示す情報が、ポインタがオーバーラップしないことを示す情報であると判断した最適化箇所候補を、最適化箇所に決定し、変更部は、判断手段が最適化箇所に決定した最適化箇所に対して、1の命令で複数データに対する処理を同時に行うことができるアセンブリプログラム命令に変更するSIMD化を施す実行モジュール最適化装置である。   In the execution module optimizing device according to the seventh aspect of the invention, the parameter information is information indicating whether the number of loops and the pointer overlap or not. The analysis unit acquires a variable name for each of the one or more optimization location candidates detected by the optimization location candidate detection unit, and uses the acquired variable name to determine the dependency relationship between the variables in the optimization location candidate. If it does not exist, perform static analysis to determine the location as an optimized location candidate, and the determination means has a loop count acquired by the dynamic analysis means that is greater than or equal to a threshold value and a pointer The information indicating whether or not the pointers overlap is information indicating that the pointers do not overlap, and the determining means determines that the determining means is that the number of loops is equal to or greater than a threshold and the pointers overlap. La The optimization part candidate determined that the information indicating whether or not the information is information indicating that the pointer does not overlap is determined as the optimization part, and the changing unit determines the optimization part as the optimization part. This is an execution module optimizing device that performs SIMD conversion to an assembly program instruction that can simultaneously process a plurality of data with a single instruction with respect to an optimization location.

このような構成により、SIMD化により、実行モジュールを最適化することができる。   With such a configuration, the execution module can be optimized by SIMD.

また、本第八の発明の実行モジュール最適化装置は、第一の発明に対して、最適化箇所検出情報は、1の処理を行う関数名であり、変更情報は、1の処理を行い、最適化箇所検出情報が示す関数よりも高速に処理を行う関数名であり、変更部は、1以上の最適化箇所を、各最適化箇所を検出する際に用いられた最適化箇所検出情報に対応する変更情報に変更し、最適化されたアセンブリプログラムを取得する実行モジュール最適化装置である。   The execution module optimizing device according to the eighth aspect of the present invention is the first aspect of the invention, wherein the optimization location detection information is a function name for performing 1 processing, and the change information is for performing 1 processing. The name of the function that performs processing at a higher speed than the function indicated by the optimization location detection information, and the changing unit converts one or more optimization locations into the optimization location detection information used when detecting each optimization location. It is an execution module optimizing device that obtains an optimized assembly program by changing to corresponding change information.

このような構成により、API/Library置き換えにより、実行モジュールを最適化することができる。   With such a configuration, the execution module can be optimized by API / Library replacement.

また、本第九の発明の実行モジュール最適化装置は、1以上の実行モジュールを格納し得る実行モジュール格納部と、処理の最適化が可能な箇所である最適化箇所を検出するための情報である最適化箇所検出情報と、最適化箇所検出情報を用いて検出された最適化箇所を変更するための情報である変更情報とを有する1以上の最適化情報を格納し得る最適化情報格納部と、実行モジュールを識別する実行モジュール識別子を有する指示を受け付ける受付部と、指示に含まれる実行モジュール識別子で識別される実行モジュールを、実行モジュール格納部から読み出し、逆アセンブルし、実行モジュールに対応するアセンブリプログラムを得る逆アセンブル部と、最適化情報格納部の1以上の最適化箇所検出情報を用いて、アセンブリプログラムから1以上の最適化箇所を検出する最適化箇所検出部と、1以上の各最適化箇所に対して、各最適化箇所を検出する際に用いられた最適化箇所検出情報に対応する変更情報を最適化情報格納部から取得し、変更情報を用いて1以上の最適化箇所を変更し、最適化されたアセンブリプログラムを取得する変更部と、最適化されたアセンブリプログラムを蓄積する蓄積部とを具備する実行モジュール最適化装置である。   The execution module optimization device according to the ninth aspect of the present invention includes an execution module storage unit that can store one or more execution modules, and information for detecting an optimization location that is a location where processing can be optimized. An optimization information storage unit capable of storing one or more pieces of optimization information having certain optimization location detection information and change information that is information for changing the optimization location detected using the optimization location detection information A reception unit that receives an instruction having an execution module identifier that identifies an execution module, and an execution module identified by the execution module identifier included in the instruction is read from the execution module storage unit, disassembled, and corresponds to the execution module An assembly program is obtained by using the disassembly unit for obtaining an assembly program and one or more pieces of optimization location detection information in the optimization information storage unit. From the optimization location detection unit that detects one or more optimization locations and change information corresponding to the optimization location detection information used for detecting each optimization location for each of the one or more optimization locations A change unit that obtains an optimized assembly program by changing one or more optimization locations using the change information, a storage unit that stores the optimized assembly program, Is an execution module optimizing device.

このような構成により、実行モジュールを最適化することができる。   With such a configuration, the execution module can be optimized.

また、本第十の発明の実行モジュール最適化装置は、第九の発明に対して、最適化されたアセンブリプログラムをコンパイルし、最適化された実行モジュールを取得するコンパイル部をさらに具備し、蓄積部は、最適化された実行モジュールをも蓄積する実行モジュール最適化装置である。   The execution module optimizing device according to the tenth aspect of the present invention further includes a compiling unit that compiles an optimized assembly program and obtains an optimized execution module, as compared with the ninth aspect of the invention. The unit is an execution module optimizing device that also stores optimized execution modules.

このような構成により、実行モジュールを最適化することができる。   With such a configuration, the execution module can be optimized.

本発明による実行モジュール最適化装置等によれば、実行モジュールの最適化を行うことができる。   According to the execution module optimizing apparatus and the like according to the present invention, the execution module can be optimized.

実施の形態1における実行モジュール最適化装置1のブロック図Block diagram of execution module optimizing apparatus 1 according to Embodiment 1 同制御フローグラフの例を示す図The figure which shows the example of the same control flow graph 同制御フローグラフを示す情報の例を示す図The figure which shows the example of the information which shows the same control flow graph 同制御フローグラフを示す情報の例を示す図The figure which shows the example of the information which shows the same control flow graph 同支配関係にあるノードを示す情報の例を示す図The figure which shows the example of the information which shows the node which has the same dominance relation 同支配関係にあるノードを示す情報の例を示す図The figure which shows the example of the information which shows the node which has the same dominance relation 同実行モジュール最適化装置1の全体動作を示すフローチャートA flowchart showing the overall operation of the execution module optimization apparatus 1 同最適化箇所の検出処理について説明するフローチャートA flowchart for explaining the detection processing of the optimization location 同最適化箇所情報にマッチする箇所の検出処理について説明するフローチャートThe flowchart explaining the detection process of the location which matches the optimization location information 同最適化箇所の検出処理ついて説明するフローチャートFlowchart explaining the detection process of the same optimization location 同プロファイラを用いた最適化箇所候補の検出処理について説明するフローチャートFlowchart for explaining optimization location candidate detection processing using the profiler 同制御フローグラフを用いた最適化箇所候補の検出処理について説明するフローチャートThe flowchart explaining the detection process of the optimization location candidate using the control flow graph 同制御フローグラフの作成処理について説明するフローチャートFlowchart explaining creation process of the control flow graph 同最適化箇所の変更処理について説明するフローチャートFlowchart explaining change processing of the same optimization location 同最適化情報の例を示す図The figure which shows the example of the optimization information 同アセンブリプログラムの例を示す図Diagram showing an example of the assembly program 同プロファイルプログラムの例を示す図Diagram showing an example of the profile program 同マルチコア並列化の例を示す図Diagram showing an example of the multi-core parallelization 同SIMD化の例を示す図The figure which shows the example of the same SIMD conversion 同置換の例を示す図Diagram showing an example of the replacement 同最適化されたアセンブリコードの例を示す図Diagram showing an example of the optimized assembly code 実施の形態2における実行モジュール最適化装置2のブロック図Block diagram of execution module optimizing device 2 in Embodiment 2 同コンピュータシステムの概観図Overview of the computer system 同コンピュータシステムのブロック図Block diagram of the computer system

以下、本発明による実行モジュール最適化装置等の実施形態について図面を参照して説明する。なお、実施の形態において同じ符号を付した構成要素は同様の動作を行うので、再度の説明を省略する場合がある。   Embodiments of an execution module optimizing device according to the present invention will be described below with reference to the drawings. In addition, since the component which attached | subjected the same code | symbol in embodiment performs the same operation | movement, description may be abbreviate | omitted again.

(実施の形態1)
本実施の形態において、実行モジュールを最適化する実行モジュール最適化装置1について説明する。
(Embodiment 1)
In the present embodiment, an execution module optimization apparatus 1 that optimizes an execution module will be described.

図1は、本実施の形態における実行モジュール最適化装置1のブロック図である。   FIG. 1 is a block diagram of an execution module optimizing apparatus 1 according to this embodiment.

実行モジュール最適化装置1は、実行モジュール格納部101、最適化情報格納部102、プロファイラ格納部103、受付部104、逆アセンブル部105、最適化箇所検出部106、変更部107、実行部108を備える。   The execution module optimization apparatus 1 includes an execution module storage unit 101, an optimization information storage unit 102, a profiler storage unit 103, a reception unit 104, a disassembly unit 105, an optimization location detection unit 106, a change unit 107, and an execution unit 108. Prepare.

最適化箇所検出部106は、最適化箇所候補検出手段1061、静的解析手段1062、プロファイルプログラム生成手段1063、動的解析手段1064、判断手段1065、決定手段1066を備える。   The optimization location detection unit 106 includes optimization location candidate detection means 1061, static analysis means 1062, profile program generation means 1063, dynamic analysis means 1064, determination means 1065, and determination means 1066.

実行モジュール格納部101は、1以上の実行モジュールを格納し得る。   The execution module storage unit 101 can store one or more execution modules.

ここで、実行モジュールとは、いわゆるソースコードをコンパイルして得られるプログラムであり、いわゆる実行ファイルや実行プログラムと呼ばれるものである。つまり、実行モジュールは、任意のOS(Operationg System)上で動作するプログラムのことである。実行モジュールは、当該プログラムを示すファイル、もしくはファイル群であってもよい。当該実行モジュールには、インタプリタにより動作するいわゆるスクリプト言語で記述されたプログラムは含まないものとする。   Here, the execution module is a program obtained by compiling a so-called source code, and is called a so-called execution file or execution program. In other words, the execution module is a program that operates on an arbitrary OS (Operation System). The execution module may be a file or a file group indicating the program. The execution module does not include a program written in a so-called script language that operates by an interpreter.

また、プログラムとは、ソフトウェア分野において「プログラム」の言葉から連想される意味を含む概念である。つまり、プログラムとは、ソフトウェアプログラムのことであってもよいし、プログラミング言語で記述されたものであってもよい。   A program is a concept including a meaning associated with the word “program” in the software field. That is, the program may be a software program or may be written in a programming language.

実行モジュール格納部101は、不揮発性の記録媒体が好適であるが、揮発性の記録媒体でも実現可能である。また、実行モジュール格納部101に実行モジュールが記憶される過程は問わない。例えば、記録媒体を介して実行モジュールが実行モジュール格納部101で記憶されるようになってもよい。また、通信回線などを介して送信された実行モジュールが実行モジュール格納部101で記憶されるようになってもよい。さらに、入力デバイスを介して入力された実行モジュールが実行モジュール格納部101で記憶されるようになってもよい。   The execution module storage unit 101 is preferably a non-volatile recording medium, but can also be realized by a volatile recording medium. The process of storing the execution module in the execution module storage unit 101 is not limited. For example, the execution module may be stored in the execution module storage unit 101 via a recording medium. Further, the execution module transmitted via a communication line or the like may be stored in the execution module storage unit 101. Furthermore, the execution module input via the input device may be stored in the execution module storage unit 101.

最適化情報格納部102は、最適化情報を格納し得る。   The optimization information storage unit 102 can store optimization information.

ここで、最適化情報とは、最適化箇所検出情報と、変更情報とを1以上有する情報である。最適化箇所検出情報と変更情報とは、例えば、1対1で対応していてもよいし、そうでなくてもよい。最適化箇所検出情報と変更情報とは、どちらか一方の情報に対し、もう一方の情報とが対応付けられていればよく、その形式は問わない。   Here, the optimization information is information having at least one piece of optimization location detection information and change information. For example, the optimization location detection information and the change information may or may not correspond one-to-one. The optimization location detection information and the change information may be in any form as long as one of the information is associated with the other information.

また、最適化情報は、パラメータ情報を有していてもよい。この場合、パラメータ情報は、最適化箇所検出情報、または変更情報と1対1で対応していてもよいし、そうでなくてもよい。   The optimization information may include parameter information. In this case, the parameter information may or may not correspond to the optimization location detection information or the change information on a one-to-one basis.

また、最適化箇所検出情報とは、処理の最適化が可能な箇所である最適化箇所を検出するための情報である。最適化箇所検出情報は、例えば、プログラムコードや、プログラムコードのパターン、最適化箇所の検出方法を示す情報、プログラムなどであってもよい。プログラムコードとは、例えば、任意の処理を行う関数名や、任意の処理を行う命令などである。また、プログラムコードのパターンとは、例えば、制御構文と変数の組み合わせを示すパターンや、いわゆる正規表現などである。また、最適化箇所の検出方法を示す情報とは、例えば、ループを検出することを示す情報や、関数を検出することを示す情報などである。また、プログラムとは、例えば、ループを検出するプログラムや、関数を検出するプログラムなどである。   The optimized location detection information is information for detecting an optimized location that is a location where processing can be optimized. The optimization location detection information may be, for example, a program code, a program code pattern, information indicating an optimization location detection method, a program, or the like. The program code is, for example, a function name for performing an arbitrary process or an instruction for performing an arbitrary process. The program code pattern is, for example, a pattern indicating a combination of a control syntax and a variable, a so-called regular expression, or the like. Further, the information indicating the method for detecting the optimization location includes, for example, information indicating that a loop is detected, information indicating that a function is detected, and the like. The program is, for example, a program that detects a loop or a program that detects a function.

また、変更情報とは、最適化箇所検出情報を用いて検出された最適化箇所を変更するための情報である。変更情報は、例えば、プログラムコードや、プログラムコードのパターン、最適化箇所の変更方法を示す情報、プログラムなどであってもよい。プログラムコードとは、例えば、任意の処理を行う関数名や、任意の処理を行う命令などである。また、プログラムコードのパターンとは、例えば、制御構文と変数の組み合わせを示すパターンや、いわゆる正規表現などである。また、最適化箇所の変更方法を示す情報とは、例えば、指定された最適化箇所に対して、マルチコア並列化を施すことを示す情報や、SIMD化を施すことを示す情報、任意の情報と置換することを示す情報などである。また、プログラムとは、例えば、指定された最適化箇所に対して、マルチコア並列化を施すプログラムや、SIMD化を施すプログラム、任意の情報と置換するプログラムなどである。   The change information is information for changing the optimized location detected using the optimized location detection information. The change information may be, for example, a program code, a program code pattern, information indicating a method for changing an optimization location, a program, or the like. The program code is, for example, a function name for performing an arbitrary process or an instruction for performing an arbitrary process. The program code pattern is, for example, a pattern indicating a combination of a control syntax and a variable, a so-called regular expression, or the like. The information indicating the method of changing the optimization location includes, for example, information indicating that multi-core parallelization is performed on the specified optimization location, information indicating that SIMD processing is performed, and arbitrary information. For example, information indicating replacement. The program is, for example, a program that performs multi-core parallelization, a program that performs SIMD, or a program that replaces arbitrary information with respect to a specified optimization location.

また、パラメータ情報とは、収集すべきパラメータを示す情報である。つまり、パラメータ情報とは、任意のパラメータを収集する旨を示す情報である。当該パラメータ情報は、後述のプロファイルプログラム生成手段1063が使用する情報である。パラメータ情報は、例えば、ループの回数を収集する旨を示す情報や、変数の数を収集する旨を示す情報、分岐が存在するか否かを示す情報を収集する旨を示す情報、ポインタがオーバーラップするか否かを示す情報を収集する旨を示す情報などであってもよい。パラメータ情報は、任意の事象や状態を示す情報であれば、その種類は問わない。   The parameter information is information indicating parameters to be collected. That is, the parameter information is information indicating that an arbitrary parameter is collected. The parameter information is information used by a profile program generation unit 1063 described later. The parameter information includes, for example, information indicating that the number of loops is collected, information indicating that the number of variables is collected, information indicating whether or not there is a branch, and pointer is over. It may be information indicating that information indicating whether or not to wrap is collected. The parameter information is not limited as long as it is information indicating an arbitrary event or state.

また、最適化とは、高速化や、メモリ使用量の削減、低消費電力化、冗長なプログラムコードの削除などを含む概念であり、良くするという程度を含み、広く解する。   Optimization is a concept that includes speeding up, memory usage reduction, low power consumption, deletion of redundant program code, and the like, and includes a degree of improvement and is widely understood.

また、最適化情報は、例えば、最適化箇所検出情報により何を検出するのかを示す検出対象情報を含んでいてもよい。検出対象情報は、例えば、最適化箇所検出情報により検出する対象がループであることを示す情報や、最適化箇所検出情報により検出する対象が関数であることを示す情報などであってもよい。また、検出対象情報は、最適化情報に含まれていてもよいし、後述の最適化箇所検出部106、最適化箇所候補検出手段1061が、最適化箇所、および最適化箇所候補を検出する際に、最適化箇所検出情報から判断し、取得するようにしてもよい。また、検出対象情報は、後述の変更部107が、最適化箇所検出情報から判断し、取得するようにしてもよい。   Further, the optimization information may include detection target information indicating what is to be detected by the optimization location detection information, for example. The detection target information may be, for example, information indicating that the target detected by the optimized location detection information is a loop, information indicating that the target detected by the optimized location detection information is a function, or the like. Further, the detection target information may be included in the optimization information, or when the optimization location detection unit 106 and the optimization location candidate detection unit 1061 described later detect the optimization location and the optimization location candidate. Further, it may be determined and acquired from the optimization location detection information. Further, the detection target information may be acquired by the changing unit 107 described later, judging from the optimization location detection information.

最適化情報格納部102は、不揮発性の記録媒体が好適であるが、揮発性の記録媒体でも実現可能である。また、最適化情報格納部102に最適化情報が記憶される過程は問わない。例えば、記録媒体を介して最適化情報が最適化情報格納部102で記憶されるようになってもよい。また、通信回線などを介して送信された最適化情報が最適化情報格納部102で記憶されるようになってもよい。さらに、入力デバイスを介して入力された最適化情報が最適化情報格納部102で記憶されるようになってもよい。   The optimization information storage unit 102 is preferably a non-volatile recording medium, but can also be realized by a volatile recording medium. Moreover, the process in which optimization information is memorize | stored in the optimization information storage part 102 is not ask | required. For example, the optimization information may be stored in the optimization information storage unit 102 via a recording medium. Further, optimization information transmitted via a communication line or the like may be stored in the optimization information storage unit 102. Further, the optimization information input via the input device may be stored in the optimization information storage unit 102.

プロファイラ格納部103は、プロファイラを格納し得る。   The profiler storage unit 103 can store a profiler.

ここで、プロファイラとは、動作中のプログラムが実行した処理や、その処理が実行された順序を監視するプログラムであり、プロファイル情報を収集するためのプログラムである。また、プロファイラは、例えば、アセンブリプログラムを実行し、各命令の負荷を取得するプログラムであってもよい。プロファイラは、OSがWindows(登録商標)の場合であれば、「イベント トレース プロバイダ」(http://www.microsoft.com/japan/whdc/devtools/tools/eventtrace_sample.mspx)が知られている。また、プロファイラは、OSがLinuxの場合であれば、「OProfile」(http://oprofile.sourceforge.net/)が知られている。なお、プロファイラの詳細については、公知の技術であるので、その説明を省略する。   Here, the profiler is a program for monitoring processing executed by an operating program and the order in which the processing is executed, and is a program for collecting profile information. The profiler may be a program that executes an assembly program and acquires the load of each instruction, for example. If the OS is Windows (registered trademark), an “event trace provider” (http://www.microsoft.com/whdc/devtools/tools/eventtrace_sample.mspx) is known as the profiler. As the profiler, if the OS is Linux, “OProfile” (http://oprofile.sourceforge.net/) is known. Note that the details of the profiler are well-known techniques, and the description thereof is omitted.

また、負荷とは、例えば、命令の実行時間であってもよいし、メモリの使用量であってもよいし、その内容は問わない。   The load may be, for example, an instruction execution time, a memory usage amount, or any content.

プロファイラ格納部103は、不揮発性の記録媒体が好適であるが、揮発性の記録媒体でも実現可能である。また、プロファイラ格納部103にプロファイラが記憶される過程は問わない。例えば、記録媒体を介してプロファイラがプロファイラ格納部103で記憶されるようになってもよい。また、通信回線などを介して送信されたプロファイラがプロファイラ格納部103で記憶されるようになってもよい。さらに、入力デバイスを介して入力されたプロファイラがプロファイラ格納部103で記憶されるようになってもよい。   The profiler storage unit 103 is preferably a nonvolatile recording medium, but can also be realized by a volatile recording medium. The process of storing the profiler in the profiler storage unit 103 is not limited. For example, the profiler may be stored in the profiler storage unit 103 via a recording medium. Further, a profiler transmitted via a communication line or the like may be stored in the profiler storage unit 103. Furthermore, the profiler input via the input device may be stored in the profiler storage unit 103.

受付部104は、指示を受け付ける。   The accepting unit 104 accepts an instruction.

ここで、指示とは、例えば、実行モジュールを実行する指示や、実行モジュールを最適化する指示などである。また、指示は、実行モジュール識別子を有する指示である。また、実行モジュール識別子とは、実行モジュールを識別する情報である。   Here, the instruction is, for example, an instruction to execute an execution module, an instruction to optimize an execution module, or the like. The instruction is an instruction having an execution module identifier. An execution module identifier is information for identifying an execution module.

また、例えば、実行モジュール最適化装置1が、実行モジュールが実行されるときに必ず実行されるようなミドルウェアである場合であれば、実行モジュール識別子を有する指示は、例えば、実行モジュールを示すアイコンのダブルクリックやシングルクリックなどである。また、例えば、実行モジュール最適化装置1が、OS上で動作するアプリケーションである場合であれば、実行モジュール識別子を有する指示は、例えば、実行モジュールを示すアイコンの当該装置へのドラッグ&ドロップなどである。つまり、実行モジュール識別子を有する指示とは、実行モジュールを識別する実行モジュール識別子を有する指示であれば、その形式は問わない。   For example, if the execution module optimization apparatus 1 is middleware that is always executed when the execution module is executed, the instruction having the execution module identifier is, for example, an icon indicating the execution module. For example, double click or single click. For example, if the execution module optimizing apparatus 1 is an application that runs on the OS, an instruction having an execution module identifier is given by, for example, dragging and dropping an icon indicating the execution module onto the apparatus. is there. That is, the instruction having the execution module identifier may be in any format as long as the instruction has an execution module identifier for identifying the execution module.

受け付けとは、キーボードやマウス、タッチパネルなどの入力デバイスから入力された情報の受け付け、有線もしくは無線の通信回線を介して送信された情報の受信、光ディスクや磁気ディスク、半導体メモリなどの記録媒体から読み出された情報の受け付けなどを含む概念である。   Acceptance refers to accepting information input from an input device such as a keyboard, mouse, or touch panel, receiving information transmitted via a wired or wireless communication line, and reading from a recording medium such as an optical disk, magnetic disk, or semiconductor memory. It is a concept that includes accepting information that has been issued.

受付部104における実行モジュール識別子を有する指示の入力手段は、キーボードやマウスやメニュー画面によるものなど、何でもよい。受付部104は、キーボード等の入力手段のデバイスドライバーや、メニュー画面の制御ソフトウェアなどで実現され得る。   The instruction input means having the execution module identifier in the receiving unit 104 may be anything such as a keyboard, a mouse, or a menu screen. The accepting unit 104 can be realized by a device driver for input means such as a keyboard, control software for a menu screen, or the like.

逆アセンブル部105は、実行モジュール格納部101に格納されている実行モジュールを読み出し、逆アセンブルし、当該実行モジュールに対応するアセンブリプログラムを取得する。   The disassembly unit 105 reads out an execution module stored in the execution module storage unit 101, disassembles it, and obtains an assembly program corresponding to the execution module.

ここで、読み出す実行モジュールは、通常、受付部104が受け付けた指示に含まれる実行モジュール識別子で識別される実行モジュールである。   Here, the execution module to be read is usually an execution module identified by the execution module identifier included in the instruction received by the receiving unit 104.

また、逆アセンブルとは、実行モジュールを、アセンブリプログラムに変換することである。逆アセンブルは、公知の技術であるので、詳細な説明は省略する。   Also, disassembling is converting an execution module into an assembly program. Since disassembly is a known technique, a detailed description thereof is omitted.

また、逆アセンブル部105は、例えば、逆アセンブルを行うプログラムである逆アセンブラを用いて、実行モジュールの逆アセンブル、および当該実行モジュールに対応するアセンブリプログラムを得てもよい。この場合、逆アセンブラは、例えば、逆アセンブル部105が保持していてもよいし、そうでなくてもよい。そうでない場合は、逆アセンブラは、任意の記憶領域に格納されていてもよい。   Further, the disassembly unit 105 may obtain an assembly program corresponding to the execution module and the disassembly of the execution module by using, for example, a disassembler that is a program for performing the disassembly. In this case, the disassembler may or may not be held by the disassembler 105, for example. Otherwise, the disassembler may be stored in any storage area.

また、アセンブリプログラムとは、いわゆるアセンブリ言語で記述されたプログラムのことである。   An assembly program is a program written in a so-called assembly language.

逆アセンブル部105は、通常、MPUやメモリ等から実現され得る。逆アセンブル部105の処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現してもよい。   The disassembly unit 105 can be usually realized by an MPU, a memory, or the like. The processing procedure of the disassembly unit 105 is usually realized by software, and the software is recorded on a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

最適化箇所検出部106は、逆アセンブル部105が取得したアセンブリプログラムから、1以上の最適化箇所を検出する。最適化箇所の検出は、最適化情報格納部102に格納されている1以上の最適化箇所検出情報を用いて行う。また、最適化箇所の検出は、最適化箇所検出部106が備える後述の最適化箇所候補検出手段1061、静的解析手段1062、プロファイルプログラム生成手段1063、動的解析手段1064、判断手段1065、決定手段1066により行ってもよい。   The optimization location detection unit 106 detects one or more optimization locations from the assembly program acquired by the disassembly unit 105. The optimization location detection is performed using one or more optimization location detection information stored in the optimization information storage unit 102. Further, the optimization location is detected by the optimization location candidate detection unit 1061, the static analysis unit 1062, the profile program generation unit 1063, the dynamic analysis unit 1064, the determination unit 1065, and the determination, which will be described later. This may be done by means 1066.

ここで、最適化箇所とは、後述の変更部107が変更情報を用いて変更する箇所であり、逆アセンブル部105が取得したアセンブリプログラム内の箇所である。また、最適化箇所を示す情報は、例えば、アセンブリプログラム内の当該箇所の位置を示す行番号や、当該箇所の範囲を示す行番号、アセンブリプログラムを構成する1以上のプログラムコードなどであってもよい。最適化箇所を示す情報は、逆アセンブル部105が取得したアセンブリプログラム内の任意の箇所を特定できる情報であれば、その形式は問わない。   Here, the optimization location is a location that is changed by the change unit 107 described later using the change information, and is a location in the assembly program acquired by the disassembly unit 105. The information indicating the optimization location may be, for example, a line number indicating the location of the location in the assembly program, a line number indicating the range of the location, or one or more program codes constituting the assembly program. Good. The information indicating the optimization location is not limited as long as it is information that can identify an arbitrary location in the assembly program acquired by the disassembly unit 105.

また、最適化箇所を示す情報は、例えば、後述の変更部107が当該最適化箇所を変更する方法を示す変更方法情報を含んでいてもよい。変更方法情報は、例えば、最適化箇所を検出する際に使用した最適化箇所検出情報に対応する変更情報で置換することを示す情報や、当該変更情報を用いて変更することを示す情報などであってもよい。変更方法情報は、例えば、変更情報から取得してもよいし、検出した最適化箇所を示す情報から取得してもよい。   Moreover, the information which shows an optimization location may contain the change method information which shows the method for the below-mentioned change part 107 to change the said optimization location, for example. The change method information includes, for example, information indicating that replacement is performed with the change information corresponding to the optimization location detection information used when detecting the optimization location, information indicating that the change is performed using the change information, and the like. There may be. The change method information may be acquired from the change information, for example, or may be acquired from information indicating the detected optimization location.

また、最適化箇所の検出とは、最適化箇所検出情報を用いて、逆アセンブル部105が取得したアセンブリプログラム内の任意の箇所を特定する情報を取得することである。   Moreover, the detection of an optimization location is acquiring the information which pinpoints the arbitrary locations in the assembly program which the disassembly part 105 acquired using the optimization location detection information.

最適化箇所検出部106は、通常、MPUやメモリ等から実現され得る。最適化箇所検出部106の処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現してもよい。   The optimization location detection unit 106 can be usually realized by an MPU, a memory, or the like. The processing procedure of the optimized location detection unit 106 is usually realized by software, and the software is recorded on a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

最適化箇所候補検出手段1061は、逆アセンブル部105が取得したアセンブリプログラムから、1以上の最適化箇所候補を検出する。最適化箇所候補の検出は、最適化情報格納部102に格納されている1以上の最適化箇所検出情報を用いて行う。また、最適化箇所候補の検出は、プロファイラ格納部103に格納されているプロファイラを用いて行ってもよいし、逆アセンブル部105が取得したアセンブリプログラムから作成した制御フローグラフを基に行ってもよい。   The optimization location candidate detection means 1061 detects one or more optimization location candidates from the assembly program acquired by the disassembly unit 105. The optimization location candidate is detected using one or more pieces of optimization location detection information stored in the optimization information storage unit 102. Further, the optimization location candidate may be detected using a profiler stored in the profiler storage unit 103 or based on a control flow graph created from the assembly program acquired by the disassembly unit 105. Good.

ここで、最適化箇所候補とは、最適化箇所となり得る箇所であり、逆アセンブル部105が取得したアセンブリプログラム内の箇所である。また、最適化箇所候補を示す情報は、例えば、ループを示す情報や、アセンブリプログラム内の当該箇所の位置を示す行番号、当該箇所の範囲を示す行番号、アセンブリプログラムを構成する1以上のプログラムコードなどであってもよい。最適化箇所候補を示す情報は、逆アセンブル部105が取得したアセンブリプログラム内の任意の箇所を特定できる情報であれば、その形式は問わない。   Here, the optimization location candidate is a location that can be an optimization location, and is a location in the assembly program acquired by the disassembly unit 105. The information indicating the optimization location candidate includes, for example, information indicating a loop, a line number indicating the position of the location in the assembly program, a line number indicating the range of the location, and one or more programs constituting the assembly program It may be a code or the like. The information indicating the optimization location candidate is not limited as long as it is information that can identify an arbitrary location in the assembly program acquired by the disassembly unit 105.

また、最適化箇所候補の検出とは、最適化箇所検出情報を用いて、逆アセンブル部105が取得したアセンブリプログラム内の任意の箇所を特定する情報を取得することである。   Moreover, the detection of an optimization location candidate is to acquire information for specifying an arbitrary location in the assembly program acquired by the disassembly unit 105 using the optimization location detection information.

また、最適化箇所候補の検出は、例えば、アセンブリプログラムの任意の行のコードと、最適化箇所検出情報とを、比較対象とする行を1行ずつずらしながら比較し、一致する箇所を最適化箇所として検出することなどであってもよい。   In addition, the optimization location candidate is detected by, for example, comparing the code of an arbitrary line in the assembly program with the optimization location detection information while shifting the comparison target line by line, and optimizing the matching location. It may be detected as a location.

また、最適化箇所候補検出手段1061は、例えば、逆アセンブル部105が取得したアセンブリプログラムに対し、プロファイラ格納部103に格納されているプロファイラを実行し、最適化箇所候補を検出してもよい。   The optimization location candidate detection unit 1061 may detect an optimization location candidate by executing a profiler stored in the profiler storage unit 103 for the assembly program acquired by the disassembly unit 105, for example.

また、最適化箇所候補検出手段1061は、例えば、当該アセンブリプログラムに対し、当該プロファイラを実行し、各命令の負荷を取得し、当該アセンブリプログラムからループのパターンを示す最適化箇所検出情報を用いて1以上のループを検出し、検出した1以上のループのうち、負荷が閾値を超える命令を有するループを、最適化箇所候補として検出してもよい。   The optimization location candidate detection means 1061 executes, for example, the profiler for the assembly program, acquires the load of each instruction, and uses the optimization location detection information indicating the loop pattern from the assembly program. One or more loops may be detected, and among the detected one or more loops, a loop having an instruction whose load exceeds a threshold may be detected as an optimization location candidate.

また、最適化箇所候補検出手段1061は、例えば、当該アセンブリプログラムからループのパターンを示す最適化箇所検出情報を用いて1以上のループを検出し、当該アセンブリプログラムに対し、当該プロファイラを実行し、検出した1以上のループ内の各命令の負荷を取得し、検出した1以上のループのうち、負荷が閾値を超える命令を有するループを、最適化箇所候補として検出してもよい。   The optimization location candidate detection unit 1061 detects, for example, one or more loops using the optimization location detection information indicating the loop pattern from the assembly program, executes the profiler for the assembly program, The load of each instruction in the detected one or more loops may be acquired, and among the detected one or more loops, a loop having an instruction whose load exceeds a threshold value may be detected as an optimization location candidate.

なお、上記の閾値は、予め決められていてもよいし、そうでなくてもよい。予め決められている場合は、当該閾値は、任意の記憶領域に格納されていてもよい。また、予め決められていない場合は、当該閾値は、例えば、アセンブリプログラム中のすべての行の負荷の平均や、アセンブリプログラム中のすべての行の負荷のうち最大の負荷の半分、アセンブリプログラム中のすべての命令の負荷の平均、アセンブリプログラム中のすべての命令の負荷のうち最大の負荷の半分などであってもよい。   In addition, said threshold value may be decided beforehand and may not be so. When it is determined in advance, the threshold value may be stored in an arbitrary storage area. If the threshold is not determined in advance, the threshold value may be, for example, the average of the loads of all the lines in the assembly program, half the maximum load among the loads of all the lines in the assembly program, It may be an average of all instruction loads, half the maximum load among all instruction loads in the assembly program, or the like.

また、最適化箇所候補検出手段1061は、例えば、逆アセンブル部105が取得したアセンブリプログラムから制御フローグラフを作成し、当該制御フローグラフを基に、最適化箇所候補を検出してもよい。   In addition, the optimization location candidate detection unit 1061 may create a control flow graph from the assembly program acquired by the disassembly unit 105 and detect the optimization location candidate based on the control flow graph.

また、最適化箇所候補検出手段1061は、例えば、当該アセンブリプログラムからループのパターンを示す最適化箇所検出情報を用いて1以上のループを検出し、当該アセンブリプログラムから制御フローグラフを作成し、当該制御フローグラフから支配ループであるループを検出し、最適化箇所検出情報を用いて検出したループと、制御フローグラフから検出した支配ループとを比較し、最適化箇所検出情報を用いて検出したループのうち、支配ループであるループを、最適化箇所候補として検出してもよい。   Further, the optimization location candidate detection unit 1061 detects, for example, one or more loops using the optimization location detection information indicating the loop pattern from the assembly program, creates a control flow graph from the assembly program, A loop that is a dominant loop is detected from the control flow graph, and a loop that is detected by using the optimized location detection information is compared with a loop that is detected by using the optimized location detection information and a dominant loop that is detected from the control flow graph. Among them, a loop that is a dominant loop may be detected as an optimization location candidate.

また、最適化箇所候補検出手段1061は、例えば、当該アセンブリプログラムから制御フローグラフを作成し、当該制御フローグラフから支配ループのパターンを示す最適化箇所検出情報を用いて支配ループであるループを検出し、当該検出した制御フローグラフにおけるループに該当するアセンブリプログラム内のループを最適化箇所候補として検出してもよい。   Further, the optimization location candidate detection unit 1061 creates a control flow graph from the assembly program, for example, and detects a loop that is a dominant loop from the control flow graph using optimized location detection information indicating the pattern of the dominant loop. Then, a loop in the assembly program corresponding to the loop in the detected control flow graph may be detected as an optimization location candidate.

ここで、制御フローグラフとは、コントロールフローグラフ(Control Flow Graph)のことであり、プログラムを実行したときに通る可能性のある命令の全経路をグラフで表したものである。制御フローグラフは、アセンブリプログラムを構成する各命令をノードとする2以上のノードを有するものであってもよい。制御フローグラフは、例えば、図2のようなものである。   Here, the control flow graph is a control flow graph (Control Flow Graph), which is a graph showing all paths of instructions that may be passed when a program is executed. The control flow graph may have two or more nodes having each instruction constituting the assembly program as a node. The control flow graph is, for example, as shown in FIG.

また、制御フローグラフを示す情報は、例えば、図2の制御フローグラフにおいて、矢印が出ているノードと、当該矢印が向かう先のノードの2つのノードの関係を示す情報であって、図3や、図4のような情報であってもよい。制御フローグラフを示す情報は、図2のようなグラフが表現できればよく、その形式は問わない。   The information indicating the control flow graph is, for example, information indicating the relationship between two nodes, that is, the node where the arrow appears in the control flow graph of FIG. Alternatively, the information shown in FIG. 4 may be used. The information indicating the control flow graph is not particularly limited as long as the graph as shown in FIG. 2 can be expressed.

また、支配ループとは、任意の1つのノードが起点となるループであって、当該起点となるノードに戻る直前のノードと起点となるノードとが支配関係にあるループである。   The dominant loop is a loop starting from any one node, and the node immediately before returning to the starting node and the starting node are in a controlling relationship.

また、支配関係とは、制御フローグラフにおける任意の2つのノードにおいて、一方のノードを通るためには、必ずもう一方のノードを通らなければならないような関係にあることを言う。例えば、図2のような制御フローグラフにおいて、Bを通るためには必ずAを通らなければならないので、「BはAに支配されている」と言い、「AとBは支配関係にある」と言う。また、図2において、Eを通るためには必ずBを通らなければならないので、「EはBに支配されている」と言い、「BとEは支配関係にある」と言う。また、図2において、Eを通るためには必ずCを通らなければならないわけではなく、また、Eを通るためには必ずDを通らなければならないわけでもないので、「EはCに支配されていない」、「CとEは支配関係にない」、「EはDに支配されていない」、「DとEは支配関係にない」と言う。   Further, the dominating relationship means that in any two nodes in the control flow graph, in order to pass one node, the other node must be passed. For example, in the control flow graph as shown in FIG. 2, in order to pass B, you must pass A. Therefore, “B is controlled by A” and “A and B are in a control relationship”. Say. In FIG. 2, in order to pass through E, you must pass through B. Therefore, “E is controlled by B” and “B and E are in a control relationship”. In FIG. 2, it is not always necessary to pass C in order to pass E, and it is not always necessary to pass D in order to pass E. "C and E are not in a dominating relationship", "E is not controlled by D", "D and E are not in a dominating relationship".

また、図2のような制御フローグラフにおいて、Iを通るためには必ずFを通らなければならないので、「IはFに支配されている」と言い、「FとIは支配関係にある」と言う。また、図2において、「F→G→H→I→F」はループになっており、かつループの起点となるノードであるFに戻る直前のノードであるIが支配関係にある。このようなループを、支配ループと呼ぶ。また、図2において、AとEは支配関係にあるので、「A→B→C→E→A」のループは、支配ループである。同様に、「A→B→D→E→A」のループも、支配ループである。   Further, in the control flow graph as shown in FIG. 2, in order to pass through I, it must pass through F, so it is said that “I is controlled by F”, and “F and I are in a control relationship”. Say. In FIG. 2, “F → G → H → I → F” is a loop, and I which is a node immediately before returning to F which is a node which is a starting point of the loop is in a dominating relationship. Such a loop is called a dominant loop. In FIG. 2, since A and E are in a dominating relationship, the loop “A → B → C → E → A” is a dominating loop. Similarly, the loop “A → B → D → E → A” is also a dominant loop.

また、最適化箇所候補検出手段1061は、制御フローグラフを作成し、各ノード間の支配関係を解析し、その解析結果を任意の記憶領域に蓄積してもよい。この場合、支配関係の解析結果を示す情報は、例えば、図2の制御フローグラフにおいて、支配するノードと、支配されるノードの関係を示す情報であって、図5や図6のような情報であってもよい。支配関係の解析結果を示す情報は、ノード間の支配関係がわかればよく、その形式は問わない。   Further, the optimization location candidate detection unit 1061 may create a control flow graph, analyze the dominating relationship between the nodes, and accumulate the analysis result in an arbitrary storage area. In this case, the information indicating the analysis result of the dominant relationship is, for example, information indicating the relationship between the ruled node and the ruled node in the control flow graph of FIG. It may be. The information indicating the analysis result of the dominating relationship may be any format as long as the dominating relationship between the nodes is known.

また、ループが支配ループであるか否かの判断は、例えば、以下のような手順で行ってもよい。
(1)制御フローグラフ中のループを検出する。例えば、「A→B→C→A」のような形式で検出する。
(2)(1)で検出したループの最後の2つのノード間の支配関係を解析し、解析結果を取得する。例えば、「支配する:A|支配される:C」のような形式で解析結果を取得する。
(3)(2)で取得した解析結果において支配関係にあるか否かを判断する。
(4)(3)で支配関係にあると判断した場合に、支配ループであると判断する。
The determination as to whether or not the loop is a dominant loop may be made, for example, by the following procedure.
(1) A loop in the control flow graph is detected. For example, detection is performed in a format such as “A → B → C → A”.
(2) Analyze the dominating relationship between the last two nodes of the loop detected in (1), and obtain the analysis result. For example, the analysis result is acquired in a format such as “dominate: A | dominated: C”.
(3) It is determined whether or not the analysis result obtained in (2) has a dominating relationship.
(4) When it is determined that there is a dominating relationship in (3), it is determined that it is a dominating loop.

また、最適化箇所候補検出手段1061は、プロファイラを用いて最適化箇所候補を検出するか、制御フローグラフを用いて最適化箇所候補を検出するかを判断し、プロファイラを用いて最適化箇所候補を検出すると判断した場合は、最適化箇所検出情報とプロファイラを用いて最適化箇所候補を検出し、制御フローグラフを用いて最適化箇所候補を検出すると判断した場合は、最適化箇所検出情報と制御フローグラフを用いて最適化箇所候補を検出してもよい。この場合、当該判断は、例えば、最適化箇所候検出情報に、プロファイラを用いて最適化箇所候補を検出するか、制御フローグラフを用いて最適化箇所候補を検出するかを示す情報が含まれており、当該情報を用いて判断することであってもよい。また、当該判断は、例えば、プロファイラ格納部103にプロファイラが格納されているか否かを判断することであってもよい。また、当該判断は、例えば、ループを検出した際に使用した各最適化箇所検出情報に対応する変更情報が、マルチコア並列化を施すための情報であるか、SIMD化を施すための情報であるかを判断し、マルチコア並列化を施すための情報であれば、プロファイラを用いて最適化箇所候補を検出すると判断し、SIMD化を施すための情報であれば、制御フローグラフを用いて最適化箇所候補を検出すると判断することであってもよい。   Further, the optimization location candidate detection unit 1061 determines whether to detect the optimization location candidate using the profiler or to detect the optimization location candidate using the control flow graph, and uses the profiler to determine the optimization location candidate. If it is determined that the optimized location candidate is detected using the optimized location detection information and the profiler, and the optimized location candidate is detected using the control flow graph, the optimized location detection information and You may detect an optimization location candidate using a control flow graph. In this case, the determination includes, for example, information indicating whether the optimization location candidate is detected using the profiler or whether the optimization location candidate is detected using the control flow graph. It may be determined using the information. The determination may be, for example, determining whether or not the profiler is stored in the profiler storage unit 103. In addition, the determination is, for example, information for performing multi-core parallelism or information for performing SIMD, in which change information corresponding to each piece of optimization location detection information used when detecting a loop is information. If it is information for performing multi-core parallelization, it is determined that an optimization location candidate is detected using a profiler. If it is information for performing SIMD, optimization is performed using a control flow graph. It may be determined that a location candidate is detected.

なお、最適化箇所候補検出手段1061が行う最適化箇所候補の検出は、最適化箇所候補が検出できれば、その方法は問わない。   In addition, the detection of the optimization location candidate which the optimization location candidate detection means 1061 performs can be any method as long as the optimization location candidate can be detected.

最適化箇所候補検出手段1061は、通常、MPUやメモリ等から実現され得る。最適化箇所候補検出手段1061の処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現してもよい。   The optimization location candidate detection means 1061 can be usually realized by an MPU, a memory, or the like. The processing procedure of the optimized location candidate detection means 1061 is usually realized by software, and the software is recorded on a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

静的解析手段1062は、最適化箇所候補検出手段1061が検出した最適化箇所候補に対して、静的解析を行う。   The static analysis unit 1062 performs a static analysis on the optimization location candidate detected by the optimization location candidate detection unit 1061.

ここで、静的解析とは、最適化箇所候補検出手段1061が検出した最適化箇所候補が示す箇所を、最適化箇所候補に決定する処理である。静的解析は、例えば、以下のような処理である。
(1)最適化箇所候補検出手段1061が検出した最適化箇所候補を取得する。
(2)(1)で取得した各最適化箇所候補から、予め決められたパターンに合致する情報を取得する。
(3)(2)で取得した情報が、予め決められた条件に合致するか否かを判断する。
(4)(3)で合致すると判断した場合は、(2)で取得した情報に対応する箇所を、最適化箇所候補に決定する。
Here, the static analysis is a process of determining a location indicated by the optimization location candidate detected by the optimization location candidate detection unit 1061 as an optimization location candidate. The static analysis is, for example, the following processing.
(1) The optimization location candidate detected by the optimization location candidate detection means 1061 is acquired.
(2) Information matching a predetermined pattern is acquired from each optimization location candidate acquired in (1).
(3) It is determined whether the information acquired in (2) matches a predetermined condition.
(4) If it is determined in (3) that they match, the location corresponding to the information acquired in (2) is determined as an optimized location candidate.

ここで、予め決められたパターンとは、最適化箇所候補検出手段1061が検出した最適化箇所候補から情報を取得するパターンである。予め決められたパターンは、例えば、ループ不変値や、配列にアクセスするための誘導変数、変数名を取得するためのパターンであってもよい。つまり、この場合、予め決められたパターンに合致する情報は、ループ不変値や、配列にアクセスするための誘導変数、変数名となる。   Here, the predetermined pattern is a pattern for acquiring information from the optimization location candidates detected by the optimization location candidate detection means 1061. The predetermined pattern may be, for example, a loop invariant value, an induction variable for accessing an array, or a pattern for acquiring a variable name. That is, in this case, information that matches a predetermined pattern is a loop invariant value, an induction variable for accessing the array, or a variable name.

なお、予め決められたパターンは、例えば、「mov edx,dword ptr [ebp+#*eax−#]」や、「ptr [ebp+#*eax−#]」、「edp」などであってもよい。予め決められたパターンは、最適化箇所候補検出手段1061が検出した最適化箇所候補から情報を取得できればよく、その形式は問わない。また、予め決められたパターンは、静的解析手段1062が保持していてもよく、そうでなくてもよい。そうでない場合は、予め決められたパターンは、任意の記憶領域に格納されていてもよい。   The predetermined pattern may be, for example, “mov edx, dword ptr [ebp + # * eax− #]”, “ptr [ebp + ## * eax− #]”, “edp”, or the like. The predetermined pattern is not particularly limited as long as information can be acquired from the optimization location candidates detected by the optimization location candidate detection means 1061. The predetermined pattern may or may not be held by the static analysis unit 1062. Otherwise, the predetermined pattern may be stored in an arbitrary storage area.

また、ループ不変値とは、ループにおいて、ループ内の処理の繰り返しに依存することなく、変化しない値(変数)のことである。例えば、「for(i=0;i<10;i++)」で示されるループにおいて、「a=10;」と「b=i*2;」のプログラムコードが存在する場合、「a」は、ループ内の処理の繰り返しに依存することなく、変化しないので、ループ不変値である。また「b」は、ループ内の処理の繰り返しに依存し、変化するので、ループ不変値でない。   A loop invariant value is a value (variable) that does not change in a loop without depending on the repetition of processing in the loop. For example, in a loop indicated by “for (i = 0; i <10; i ++)”, when program codes “a = 10;” and “b = i * 2;” exist, “a” Since it does not change without depending on repetition of processing in the loop, it is a loop invariant value. Also, “b” is not a loop invariant value because it changes depending on the repetition of processing in the loop.

また、誘導変数とは、ループにおいて、ループ内の処理の繰り返しを示す変数のことである。例えば、「for(i=0;i<10;i++)」で示されるループにおいて、「i」は、ループの反復を示す変数であるので、誘導変数である。   The induction variable is a variable indicating repetition of processing in the loop in the loop. For example, in a loop indicated by “for (i = 0; i <10; i ++)”, “i” is a variable indicating the iteration of the loop, and thus is an induction variable.

また、予め決められた条件とは、予め決められたパターンに合致する情報に対応する箇所を、最適化箇所に決定する条件である。また、予め決められた条件は、例えば、予め決められたパターンにより取得できた情報が任意の条件に合致することであってもよし、当該情報を用いて判断できる事象が任意の条件に合致することであってもよい。   The predetermined condition is a condition for determining a location corresponding to information that matches a predetermined pattern as an optimization location. Further, the predetermined condition may be, for example, that information acquired by a predetermined pattern matches an arbitrary condition, and an event that can be determined using the information matches an arbitrary condition. It may be.

また、予め決められた条件は、例えば、メモリストアが行われていることであってもよいし、変数間の依存関係が存在しないことであってもよい。例えば、予め決められた条件が、メモリストアが行われていなことである場合、当該条件に合致するか否かの判断は、予め決められたパターンにより取得できたループ不変値と誘導変数とを用いて、配列に対するメモリストアが行われているか否かを判断することであってもよい。また、例えば、予め決められた条件が、変数間の依存関係が存在しないことである場合、当該条件に合致するか否かの判断は、予め決められたパターンにより取得できた変数名を用いて、変数間の依存関係が存在するか否かを判断することであってもよい。   In addition, the predetermined condition may be, for example, that a memory store is performed, or that there is no dependency between variables. For example, when the predetermined condition is that the memory store is not performed, the determination as to whether or not the condition is met is based on the loop invariant value and the induction variable that can be acquired by the predetermined pattern. It may be used to determine whether a memory store is being performed on the array. Also, for example, when the predetermined condition is that there is no dependency relationship between variables, the determination as to whether or not the condition is satisfied is performed using the variable name acquired by the predetermined pattern. It may be determined whether or not there is a dependency relationship between variables.

つまり、静的解析手段1062は、予め決められた条件に応じた判断を行い、当該判断の結果が、予め決められた条件に合致するか否かを判断する。   That is, the static analysis unit 1062 makes a determination according to a predetermined condition, and determines whether or not the result of the determination matches a predetermined condition.

なお、予め決められた条件は、例えば、「メモリストアが行われている」や、「変数間の依存関係が存在しない」、「ポインタがオーバーラップしない」などであってもよい。予め決められた条件は、予め決められたパターンに合致する情報に対応する箇所を、最適化箇所に決定できればよく、その形式は問わない。また、予め決められた条件は、静的解析手段1062が保持していてもよく、そうでなくてもよい。そうでない場合は、予め決められた条件は、任意の記憶領域に格納されていてもよい。   The predetermined condition may be, for example, “memory is being stored”, “no dependency between variables exists”, “the pointers do not overlap”, or the like. The predetermined condition is not particularly limited as long as the location corresponding to the information matching the predetermined pattern can be determined as the optimization location. The predetermined condition may or may not be held by the static analysis means 1062. Otherwise, the predetermined condition may be stored in an arbitrary storage area.

また、変数間の依存関係とは、例えば、ある変数に対する値の代入などの処理が、他の変数の処理結果に依存するような関係にあることを言う。つまり、例えば、「A」と「B」の2つの変数が存在し、「A=1」と「B=A+2」のコードが存在する場合、「B」への値の代入は、「A」への値の代入の結果に依存する。このような場合に、変数間の依存関係が存在すると判断する。   Further, the dependency relationship between variables means that, for example, processing such as assignment of a value to a certain variable depends on processing results of other variables. That is, for example, when there are two variables “A” and “B”, and codes “A = 1” and “B = A + 2” exist, the assignment of a value to “B” is “A”. Depends on the result of assigning the value to. In such a case, it is determined that there is a dependency between variables.

また、静的解析手段1062が行う最適化箇所候補を決定する静的解析は、最適化箇所候補が決定できればよく、その方法は問わない。   The static analysis performed by the static analysis means 1062 is not particularly limited as long as the optimization location candidate can be determined.

また、最適化箇所候補の決定とは、最適化箇所検出情報を用いて、逆アセンブル部105が取得したアセンブリプログラム内の任意の箇所を特定する情報を取得することである。   The determination of the optimization location candidate is to acquire information for specifying an arbitrary location in the assembly program acquired by the disassembly unit 105 using the optimization location detection information.

静的解析手段1062は、通常、MPUやメモリ等から実現され得る。静的解析手段1062の処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現してもよい。   The static analysis means 1062 can usually be realized by an MPU, a memory, or the like. The processing procedure of the static analysis means 1062 is usually realized by software, and the software is recorded on a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

プロファイルプログラム生成手段1063は、静的解析手段1062が静的解析を行い、最適化箇所候補を決定したアセンブリプログラムから、プロファイルプログラムを生成する。また、プロファイルプログラム生成手段1063は、逆アセンブル部105が取得したアセンブリプログラムから、静的解析手段1062が決定した最適化箇所候補を基に、プロファイルプログラムを生成してもよい。   The profile program generation unit 1063 generates a profile program from the assembly program in which the static analysis unit 1062 performs static analysis and the optimization location candidate is determined. Further, the profile program generation unit 1063 may generate a profile program from the assembly program acquired by the disassembly unit 105 based on the optimization location candidates determined by the static analysis unit 1062.

ここで、プロファイルプログラムとは、最適化情報格納部102が格納しているパラメータ情報が示すパラメータを収集するためのプログラムである。   Here, the profile program is a program for collecting parameters indicated by the parameter information stored in the optimization information storage unit 102.

また、プロファイルプログラムの生成は、例えば、以下のような処理である。
(1)静的解析手段1062が決定した最適化箇所候補を取得する。ここで、m個の最適化箇所候補が取得できたものとする。
(2)カウンタiに1をセットする。
(3)(1)で取得した最適化箇所候補から、i番目の最適化箇所候補を取得する。
(4)(2)で取得した最適化箇所候補の前に、最適化情報格納部102が格納しているパラメータ情報が示すパラメータを収集するためのアセンブリプログラム命令列を挿入する。
(5)iがmであるか否かを判断する。mである場合は、処理を終了し、そうでない場合は、(6)に進む。
(6)iを1インクリメントし、(3)に戻る。
The profile program is generated by the following process, for example.
(1) The optimization location candidate determined by the static analysis means 1062 is acquired. Here, it is assumed that m optimization location candidates have been acquired.
(2) Set 1 to the counter i.
(3) The i-th optimized location candidate is acquired from the optimized location candidates acquired in (1).
(4) An assembly program instruction sequence for collecting parameters indicated by the parameter information stored in the optimization information storage unit 102 is inserted before the optimization location candidates acquired in (2).
(5) Determine whether i is m. If it is m, the process is terminated; otherwise, the process proceeds to (6).
(6) Increment i by 1 and return to (3).

また、プロファイルプログラムの生成は、例えば、以下のような手順で行ってもよい。
(1)静的解析手段1062が決定した最適化箇所候補を取得する。ここで、m個の最適化箇所候補が取得できたものとする。
(2)カウンタiに1をセットする。
(3)(1)で取得した最適化箇所候補から、i番目の最適化箇所候補を取得する。
(4)(3)で取得したi番目の最適化箇所候補を複写する。
(5)(4)で複写した最適化箇所候補の直前に、最適化情報格納部102が格納しているパラメータ情報が示すパラメータを収集するためのアセンブリプログラム命令列を挿入する。
(6)(3)で取得した最適化箇所候補の直前に、(5)で挿入したアセンブリプログラム命令列の直前にジャンプするアセンブリプログラム命令を挿入する。
(7)iがmであるか否かを判断する。mである場合は、処理を終了し、そうでない場合は、(8)に進む。
(8)iを1インクリメントし、(3)に戻る。
The profile program may be generated by the following procedure, for example.
(1) The optimization location candidate determined by the static analysis means 1062 is acquired. Here, it is assumed that m optimization location candidates have been acquired.
(2) Set 1 to the counter i.
(3) The i-th optimized location candidate is acquired from the optimized location candidates acquired in (1).
(4) The i-th optimized location candidate obtained in (3) is copied.
(5) An assembly program instruction sequence for collecting parameters indicated by the parameter information stored in the optimization information storage unit 102 is inserted immediately before the optimization location candidate copied in (4).
(6) An assembly program instruction that jumps immediately before the assembly program instruction sequence inserted in (5) is inserted immediately before the optimization location candidate acquired in (3).
(7) It is determined whether i is m. If it is m, the process is terminated; otherwise, the process proceeds to (8).
(8) Increment i by 1 and return to (3).

ここで、最適化箇所候補の取得とは、例えば、最適化箇所候補を示す情報を取得することであってもよいし、最適化箇所候補を示す情報により示されるアセンブリプログラムを取得することであってもよい。   Here, acquisition of the optimization location candidate may be, for example, acquisition of information indicating the optimization location candidate, or acquisition of an assembly program indicated by information indicating the optimization location candidate. May be.

また、最適化箇所候補の前とは、最適化箇所候補の前であればよく、直前でなくてもよいが、通常は、直前であることが好適である。   In addition, the term “before the optimization location candidate” only needs to be in front of the optimization location candidate, and may not be immediately before, but usually it is preferable to be immediately before.

また、命令列とは、2以上の命令のことであり、命令とは、1つの命令のことである。   An instruction sequence is two or more instructions, and an instruction is one instruction.

また、最適化情報格納部102が格納しているパラメータ情報が示すパラメータを収集するためのアセンブリプログラム命令列は、任意の記憶領域に蓄積されていてもよいし、プロファイルプログラム生成手段1063が保持していてもよい。   Further, the assembly program instruction sequence for collecting the parameters indicated by the parameter information stored in the optimization information storage unit 102 may be accumulated in an arbitrary storage area, or held by the profile program generation unit 1063. It may be.

また、最適化箇所候補の複写とは、最適化箇所候補を示す情報により特定されるアセンブリプログラム内の箇所に該当するプログラムコードを、任意の記憶領域に蓄積することである。   In addition, the copy of the optimization location candidate is to accumulate program code corresponding to the location in the assembly program specified by the information indicating the optimization location candidate in an arbitrary storage area.

なお、プロファイルプログラム生成手段1063が行うプロファイルプログラムの生成は、プロファイルプログラムが生成できればよく、その方法は問わない。   The profile program generated by the profile program generation unit 1063 may be generated by any method as long as the profile program can be generated.

プロファイルプログラム生成手段1063は、通常、MPUやメモリ等から実現され得る。プロファイルプログラム生成手段1063の処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現してもよい。   The profile program generation unit 1063 can be usually realized by an MPU, a memory, or the like. The processing procedure of the profile program generation means 1063 is usually realized by software, and the software is recorded on a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

動的解析手段1064は、プロファイルプログラムを実行し、1以上のパラメータを取得する動的解析を行う。   The dynamic analysis unit 1064 executes a profile program and performs dynamic analysis to acquire one or more parameters.

ここで、プロファイルプログラムの実行は、通常、アセンブリプログラムを機械語に変換後、実行する。また、プロファイルプログラムの実行は、アセンブリプログラムを機械語に変換するプログラムであるアセンブラを用いて、プロファイルプログラムを機械語に変換後、実行してもよい。この場合、アセンブラは、例えば、動的解析手段1064が保持していてもよいし、そうでなくてもよい。そうでない場合は、アセンブラは、任意の記憶領域に格納されていてもよい。   Here, the profile program is usually executed after the assembly program is converted into a machine language. The profile program may be executed after the profile program is converted into the machine language using an assembler that is a program for converting the assembly program into the machine language. In this case, for example, the assembler may or may not be held by the dynamic analysis means 1064. Otherwise, the assembler may be stored in any storage area.

なお、動的解析手段1064が行う動的解析は、1以上のパラメータが取得できればよく、その方法は問わない。   The dynamic analysis performed by the dynamic analysis unit 1064 is not limited as long as one or more parameters can be acquired.

動的解析手段1064は、通常、MPUやメモリ等から実現され得る。動的解析手段1064の処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現してもよい。   The dynamic analysis unit 1064 can be usually realized by an MPU, a memory, or the like. The processing procedure of the dynamic analysis means 1064 is usually realized by software, and the software is recorded on a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

判断手段1065は、動的解析手段1064が取得した1以上のパラメータが、予め決められた条件に合致するか否かを判断する。   The determination unit 1065 determines whether or not one or more parameters acquired by the dynamic analysis unit 1064 meet a predetermined condition.

ここで、予め決められた条件とは、当該パラメータを取得した最適化箇所候補を、最適化箇所に決定するための条件である。予め決められた条件は、例えば、動的解析手段1064が取得したループ回数が、閾値以上であることであってもよいし、動的解析手段1064が取得したポインタがオーバーラップするか否かを示す情報が、オーバーラップしないことを示す情報であることなどであってもよい。   Here, the predetermined condition is a condition for determining an optimization location candidate that has acquired the parameter as an optimization location. The predetermined condition may be, for example, that the number of loops acquired by the dynamic analysis unit 1064 is greater than or equal to a threshold value, and whether or not the pointers acquired by the dynamic analysis unit 1064 overlap. The information to be displayed may be information indicating that there is no overlap.

つまり、例えば、予め決められた条件が「動的解析手段1064が取得したループ回数が、閾値以上である」である場合は、判断手段1065は、動的解析手段1064が取得したループ回数が、閾値以上であるか否かの判断を行う。また、例えば、予め決められた条件が「動的解析手段1064が取得したポインタがオーバーラップするか否かを示す情報が、オーバーラップしないことを示す情報である」である場合は、判断手段1065は、動的解析手段1064が取得したポインタがオーバーラップするか否かを示す情報が、オーバーラップしないことを示す情報であるか否かの判断を行う。   That is, for example, when the predetermined condition is “the number of loops acquired by the dynamic analysis unit 1064 is equal to or greater than the threshold”, the determination unit 1065 determines that the number of loops acquired by the dynamic analysis unit 1064 is It is determined whether or not the threshold value is exceeded. For example, when the predetermined condition is “the information indicating whether or not the pointer acquired by the dynamic analysis unit 1064 overlaps is information indicating that there is no overlap”, the determination unit 1065. Determines whether or not the information indicating whether or not the pointers acquired by the dynamic analysis unit 1064 overlap is information indicating that the pointers do not overlap.

また、ポインタのオーバーラップとは、任意の2つのポインタが指し示すアドレスが、一方のポインタによって確保されるデータサイズのアドレスと重複すること、または、一方のポインタによって確保されるデータサイズのアドレスに含まれることである。ポインタがオーバーラップしているか否かの判断は、例えば、以下のような手順で行ってもよい。
(1)1つ目のポインタ(Ptr_A)から開始される配列のサイズを取得する。このとき取得できたサイズを、Size_Aとする。
(2)Ptr_Aから開始される配列の各要素のアドレスを取得する。このとき取得できたSize_A個のアドレスを、Addr_Aとし、配列の各要素に対応するアドレスは、Addr_A[1]、Addr_A[2]、・・・、Addr_A[Size_A]に格納されているものとする。
(3)2つ目のポインタ(Ptr_B)から開始される配列のサイズを取得する。このとき取得できたサイズを、Size_Bとする。
(4)Ptr_Bから開始される配列の各要素のアドレスを取得する。このとき取得できたSize_B個のアドレスを、Bddr_Bとし、配列の各要素に対応するアドレスは、Bddr_B[1]、Bddr_B[2]、・・・、Bddr_B[Size_B]に格納されているものとする。
(5)フラグにfalseをセットする。
(6)カウンタiに1をセットする。
(7)カウンタjに1をセットする。
(8)「Bddr_B[j]が、Addr_A[i]以上であり、かつAddr_A[i+1]より小さい」の条件に合致するか否かを判断する。
(9)(8)で条件に合致する場合は、フラグにtrueをセットし、条件に合致しない場合は、jを1インクリメントし、(8)に戻る。
(10)jがSize_Bに一致するまで、(8)〜(9)の処理を繰り返す。
(11)iを1インクリメントし、(7)に戻る。
(12)iがSize_A−1に一致するまで、(7)〜(11)の処理を繰り返す。
(13)フラグがtrueであるか否かを判断する。フラグがtrueである場合は、ポインタがオーバーラップすると判断し、フラグがfalseである場合は、ポインタがオーバーラップしないと判断する。
In addition, the pointer overlap means that the address pointed to by any two pointers overlaps the address of the data size secured by one pointer, or is included in the address of the data size secured by one pointer It is to be. The determination of whether or not the pointers overlap may be performed, for example, by the following procedure.
(1) The size of the array starting from the first pointer (Ptr_A) is acquired. Let the size acquired at this time be Size_A.
(2) The address of each element of the array starting from Ptr_A is acquired. Assume that the size_A addresses acquired at this time are Addr_A, and the addresses corresponding to the elements of the array are stored in Addr_A [1], Addr_A [2],..., Addr_A [Size_A]. .
(3) The size of the array starting from the second pointer (Ptr_B) is acquired. Let the size acquired at this time be Size_B.
(4) The address of each element of the array starting from Ptr_B is acquired. The size_B addresses obtained at this time are defined as Bddr_B, and the addresses corresponding to the elements of the array are stored in Bddr_B [1], Bddr_B [2],..., Bddr_B [Size_B]. .
(5) Set false to the flag.
(6) Set 1 to the counter i.
(7) Set 1 to the counter j.
(8) It is determined whether or not the condition “Bddr_B [j] is greater than or equal to Addr_A [i] and smaller than Addr_A [i + 1]” is satisfied.
(9) If the condition is met in (8), true is set in the flag. If the condition is not met, j is incremented by 1, and the process returns to (8).
(10) The processes of (8) to (9) are repeated until j matches Size_B.
(11) Increment i by 1 and return to (7).
(12) The processes of (7) to (11) are repeated until i matches Size_A-1.
(13) It is determined whether or not the flag is true. If the flag is true, it is determined that the pointers overlap. If the flag is false, it is determined that the pointers do not overlap.

このポインタがオーバーラップするか否かの判断は、ポインタがオーバーラップするか否かが判断できればよく、その方法は問わない。   The determination of whether or not the pointers overlap may be any method as long as it can be determined whether or not the pointers overlap.

また、判断手段1065が行う判断は、動的解析手段1064が取得した1以上のパラメータが、予め決められた条件に合致するか否かが判断できればよく、その方法は問わない。   The determination performed by the determination unit 1065 may be any method as long as it can be determined whether one or more parameters acquired by the dynamic analysis unit 1064 meet a predetermined condition.

判断手段1065は、通常、MPUやメモリ等から実現され得る。判断手段1065の処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現してもよい。   The determination unit 1065 can be usually realized by an MPU, a memory, or the like. The processing procedure of the determination unit 1065 is usually realized by software, and the software is recorded on a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

決定手段1066は、動的解析手段1064が取得した1以上のパラメータが、予め決められた条件に合致する場合に、当該パラメータを取得した最適化箇所候補を、最適化箇所に決定する。つまり、判断手段1065が、動的解析手段1064が取得した1以上のパラメータが、予め決められた条件に合致するか否かを判断し、合致すると判断した場合に、当該パラメータを取得した最適化箇所候補を、最適化箇所に決定する。   When one or more parameters acquired by the dynamic analysis unit 1064 meet a predetermined condition, the determination unit 1066 determines an optimization location candidate that has acquired the parameter as an optimization location. That is, when the determination unit 1065 determines whether or not one or more parameters acquired by the dynamic analysis unit 1064 match a predetermined condition, and determines that they match, the optimization that acquired the parameter Location candidates are determined as optimization locations.

決定手段1066は、通常、MPUやメモリ等から実現され得る。決定手段1066の処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現してもよい。   The determination unit 1066 can be usually realized by an MPU, a memory, or the like. The processing procedure of the determination unit 1066 is usually realized by software, and the software is recorded in a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

変更部107は、通常、最適化箇所検出部106が、最適化箇所を検出する際に用いた最適化箇所検出情報に対応する変更情報を、最適化情報格納部102から取得し、当該変更情報を用いて最適化箇所を変更し、最適化されたプログラムを取得する。   The change unit 107 normally acquires change information corresponding to the optimization location detection information used when the optimization location detection unit 106 detects the optimization location from the optimization information storage unit 102, and the change information Change the optimization location using to get the optimized program.

ここで、変更情報を用いて最適化箇所を変更するとは、例えば、変更情報が、プログラムのパターンや、プログラムの変更方法を示す情報、変更を行うためのプログラムなどである場合に、これらを用いて、最適化箇所を変更することである。   Here, changing the optimization location using the change information means, for example, that the change information is a program pattern, information indicating a program change method, a program for making a change, or the like. The optimization point is changed.

また、変更とは、置換や書換などを含む概念である。   The change is a concept including replacement and rewriting.

また、変更部107は、決定手段1066が最適化箇所に決定した最適化箇所に対して、マルチコア並列化を施し、最適化されたアセンブリプログラムを取得してもよい。   Further, the change unit 107 may perform multi-core parallelization on the optimized location determined by the determining unit 1066 as the optimized location, and obtain an optimized assembly program.

ここで、マルチコア並列化とは、複数のプロセッサにおいて並列に実行できるプログラムコードに書き換えることや、複数のプロセッサにおいて並列に実行するための命令を挿入することなどである。マルチコア並列化は、例えば、10個の要素を持つ配列に対して、カウンタを1から10まで回して処理するループを、カウンタを1から5まで回し、1度に2つの要素に対して処理が行えるようなループに変更することなどであってもよい。また、マルチコア並列化は、例えば、10個の要素を持つ配列に対して、カウンタを1から10まで回して処理するループに対して、当該ループの直前に、当該ループを並列に実行するための命令を挿入することなどであってもよい。また、マルチコア並列化は、例えば、10個の要素を持つ配列に対して、カウンタを1から10まで回して処理するループに対して、当該ループの直前に、並列実行を開始するための命令を挿入し、かつ、当該ループの直後に、並列実行を終了するための命令を挿入することなどであってもよい。   Here, multi-core parallelization includes rewriting to a program code that can be executed in parallel in a plurality of processors, or inserting an instruction to be executed in parallel in a plurality of processors. Multi-core parallelization, for example, for an array having 10 elements, loops that process by turning the counter from 1 to 10, and turns the counter from 1 to 5 to process two elements at a time. It may be changed to a loop that can be performed. In addition, multi-core parallelization is, for example, for executing a loop in parallel with a loop that performs processing by rotating a counter from 1 to 10 for an array having 10 elements, immediately before the loop. For example, an instruction may be inserted. In addition, multi-core parallelization, for example, for an array having 10 elements, for a loop that processes by rotating the counter from 1 to 10, an instruction for starting parallel execution immediately before the loop. It may be inserted and an instruction for ending parallel execution is inserted immediately after the loop.

また、マルチコア並列化においてプログラムコードを分割する数を並列数と呼ぶこととすると、当該並列数は、予め決められていてもよいし、そうでなくてもよい。予め決められている場合は、当該並列数は、任意の記憶領域に格納されていてもよい。予め決められていない場合は、当該並列数は、例えば、プロセッサ数や、ループカウンタの最大値の約数のうち、プロセッサ数を超えない最大数などであってもよい。予め決められていない場合の並列数は、変更部107が取得してもよい。   Further, if the number of program codes divided in multi-core parallelization is referred to as a parallel number, the parallel number may or may not be determined in advance. If determined in advance, the parallel number may be stored in an arbitrary storage area. If not determined in advance, the parallel number may be, for example, the maximum number that does not exceed the number of processors among the number of processors or a divisor of the maximum value of the loop counter. The changing unit 107 may acquire the parallel number when it is not determined in advance.

また、マルチコア並列化は、例えば、以下のような処理である。
(1)マルチコア並列化を施すループを検出する。
(2)(1)で検出したループのループカウンタの最大値を取得する。
(3)プロセッサ数を取得する。
(4)(2)で取得したループカウンタの最大値を、(3)で取得したプロセッサ数で割った値を取得する。ここでは、割った値、つまり商は整数値であり、小数値ではない。また、割り切れずに余った値、つまり剰余も取得するようにしてもよい。
(5)(1)で検出したループのループカウンタの最大値に、(4)で取得した値をセットする。
(6)(1)で検出したループ内の配列に対する処理を示すプログラムコードを複写する。
(7)(6)で複写したプログラムコードを、当該複写元のプログラムコードの直後に挿入する。
(8)(7)で挿入したプログラムコードが示す配列に対する処理において、配列の要素にアクセスするための変数を「+1」するように書き換える。つまり、例えば、「Array[i]」となっている場合であれば、「Array[i+1]」に書き換える。
Multi-core parallelization is, for example, the following processing.
(1) A loop that performs multi-core parallelization is detected.
(2) The maximum value of the loop counter of the loop detected in (1) is acquired.
(3) Obtain the number of processors.
(4) A value obtained by dividing the maximum value of the loop counter acquired in (2) by the number of processors acquired in (3) is acquired. Here, the divided value, that is, the quotient is an integer value, not a decimal value. Further, the remaining value without being divisible, that is, the remainder may be acquired.
(5) The value acquired in (4) is set to the maximum value of the loop counter of the loop detected in (1).
(6) Copy the program code indicating the processing for the array in the loop detected in (1).
(7) The program code copied in (6) is inserted immediately after the copy source program code.
(8) In the process for the array indicated by the program code inserted in (7), the variable for accessing the element of the array is rewritten to “+1”. That is, for example, if “Array [i]”, it is rewritten to “Array [i + 1]”.

なお、(4)において剰余が存在し、取得できた場合は、ループの直後に、当該剰余により処理されない配列に対する処理を行うプログラムコードを挿入してもよい。   In addition, when a remainder exists in (4) and can be acquired, a program code for performing processing on an array not processed by the remainder may be inserted immediately after the loop.

また、マルチコア並列化は、例えば、以下のような処理でもよい。
(1)マルチコア並列化を施すループを検出する。
(2)(1)で検出したループの直前に、並列実行を開始するためのプログラムコード(命令)を挿入する。
(3)(1)で検出したループの直後に、並列実行を終了するためのプログラムコード(命令)を挿入する。
Further, multi-core parallelization may be the following processing, for example.
(1) A loop that performs multi-core parallelization is detected.
(2) A program code (instruction) for starting parallel execution is inserted immediately before the loop detected in (1).
(3) Immediately after the loop detected in (1), a program code (instruction) for ending parallel execution is inserted.

また、変更部107は、例えば、最適化箇所検出部106が具備する各手段において、以下のような処理が行われた場合に、最終的に決定手段1066が決定した最適化箇所に対して、マルチコア並列化を施してもよい。
(1)最適化箇所候補検出手段1061が、最適化箇所候補を検出する。
(2)(1)で検出された最適化箇所候補から、静的解析手段1062が、ループ不変値と、誘導変数とを取得し、これらの情報を用いて、当該最適化箇所候補において配列に対するメモリストアが行われているか否かを判断し、行われていると判断する。
(3)(2)で行われていると判断された最適化箇所候補に対して、プロファイルプログラム生成手段1063が、ループ回数と、ポインタがオーバーラップするか否かを示す情報を取得するためのプロファイルコードを挿入し、プロファイルプログラムを生成する。
(4)(3)で生成されたプロファイルプログラムを、動的解析手段1064が実行し、ループ回数と、ポインタがオーバーラップするか否かを示す情報を取得する。
(5)(4)で取得したループ回数と、ポインタがオーバーラップするか否かを示す情報に対して、判断手段1065が、ループ回数が閾値以上であると判断し、かつ、ポインタがオーバーラップするか否かを示す情報が、ポインタがオーバーラップしないことを示す情報であると判断する。
(6)(5)で判断した結果に従い、決定手段1066が、ループ回数と、ポインタがオーバーラップするか否かを示す情報を取得した最適化箇所候補を、最適化箇所に決定する。
For example, when the following processing is performed in each unit included in the optimization location detection unit 106, the change unit 107 performs the optimization on the optimization location finally determined by the determination unit 1066. Multi-core parallelization may be performed.
(1) The optimization location candidate detection means 1061 detects an optimization location candidate.
(2) The static analysis means 1062 acquires the loop invariant value and the induction variable from the optimization location candidate detected in (1), and uses these pieces of information to determine the sequence for the optimization location candidate. It is determined whether or not memory storage is being performed, and it is determined that memory storage is being performed.
(3) For the optimization location candidate determined to be performed in (2), the profile program generation unit 1063 obtains information indicating whether the number of loops and the pointer overlap. Insert a profile code and generate a profile program.
(4) The dynamic analysis unit 1064 executes the profile program generated in (3), and obtains information indicating the number of loops and whether or not the pointers overlap.
(5) With respect to the loop count acquired in (4) and information indicating whether or not the pointer overlaps, the determination unit 1065 determines that the loop count is equal to or greater than the threshold and the pointer overlaps. It is determined that the information indicating whether or not to perform is information indicating that the pointers do not overlap.
(6) According to the result determined in (5), the determination unit 1066 determines the optimization location candidate that has acquired information indicating whether the number of loops and the pointer overlap or not as the optimization location.

また、変更部107は、決定手段1066が最適化箇所に決定した最適化箇所に対して、SIMD化を施し、最適化されたアセンブリプログラムを取得してもよい。   The changing unit 107 may obtain an optimized assembly program by applying SIMD to the optimized location determined by the determining unit 1066 as the optimized location.

ここで、SIMD化とは、1つの命令で1つのデータに対する処理を行う1以上のアセンブリプログラム命令を、1つの命令で複数データに対する処理を同時に行うことができるアセンブリプログラム命令に変更することである。具体的には、例えば、4バイトの変数に値を代入する4つの同一の命令を、16バイトのレジスタを用いて4つの4バイトの変数に対して同時に値を代入する命令に置換することなどである。   Here, SIMD conversion refers to changing one or more assembly program instructions that process one data with one instruction into assembly program instructions that can simultaneously process multiple data with one instruction. . Specifically, for example, replacing four identical instructions that assign values to 4-byte variables with instructions that simultaneously assign values to four 4-byte variables using a 16-byte register, etc. It is.

また、SIMD化において1つの命令に置換する命令の数を統合数と呼ぶこととすると、当該統合数は、予め決められていてもよいし、そうでなくてもよい。予め決められている場合は、当該統合数は、任意の記憶領域に格納されていてもよい。予め決められていない場合は、当該統合数は、例えば、プロセッサ数や、変数の型のサイズ(ビット数やバイト数)を基に算出した数などであってもよい。予め決められていない場合の統合数は、変更部107が取得してもよい。   In addition, if the number of instructions to be replaced with one instruction in SIMD conversion is called an integrated number, the integrated number may be determined in advance or not. If determined in advance, the integration number may be stored in an arbitrary storage area. If not determined in advance, the integration number may be, for example, the number of processors or a number calculated based on the size of a variable type (number of bits or number of bytes). The changing unit 107 may acquire the number of integrations when the number is not determined in advance.

また、SIMD化は、例えば、以下のような処理である。
(1)SIMD化を施すループを検出する。
(2)SIMD化により置換する命令が扱えるバイト数を取得する。
(3)統合数nを取得する。
(4)(2)で取得したバイト数を統合数nで割った値を取得する。
(5)(1)で検出したループにおいて、(4)で取得した値をバイト数とする変数に値を代入する処理を行うプログラムコードを、n以下を1組にして取得する。
(6)(5)で取得したn個のプログラムコードが処理を行うn個の変数の間に依存関係が存在しない場合に、n個の変数に対して動じに値を代入する処理を行うプログラムコードを生成する。
(7)(5)で取得したプログラムコードに該当する箇所を削除する。
(8)(7)で削除した箇所のうち、1番目のプログラムコードに該当する箇所に、(6)で生成したプログラムコードを挿入する。
Further, SIMD conversion is, for example, the following processing.
(1) A loop for applying SIMD is detected.
(2) Obtain the number of bytes that can be handled by the instruction to be replaced by SIMD conversion.
(3) The integration number n is acquired.
(4) A value obtained by dividing the number of bytes acquired in (2) by the integrated number n is acquired.
(5) In the loop detected in (1), program code for performing processing for assigning a value to a variable having the value acquired in (4) as the number of bytes is acquired as a set of n or less.
(6) A program that performs processing of assigning values to n variables when there is no dependency among n variables that are processed by n program codes acquired in (5) Generate code.
(7) Delete the part corresponding to the program code acquired in (5).
(8) The program code generated in (6) is inserted into the location corresponding to the first program code among the locations deleted in (7).

また、変更部107は、例えば、最適化箇所検出部106が具備する各手段において、以下のような処理が行われた場合に、最終的に決定手段1066が決定した最適化箇所に対して、SIMD化を施してもよい。
(1)最適化箇所候補検出手段1061が、最適化箇所候補を検出する。
(2)(1)で検出された最適化箇所候補から、静的解析手段1062が、変数名を取得し、これらの情報を用いて、当該最適化箇所候補において変数間の依存関係が存在するか否かを判断し、存在していないと判断する。
(3)(2)で存在していないと判断された最適化箇所候補に対して、プロファイルプログラム生成手段1063が、ループ回数と、ポインタがオーバーラップするか否かを示す情報を取得するためのプロファイルコードを挿入し、プロファイルプログラムを生成する。
(4)(3)で生成されたプロファイルプログラムを、動的解析手段1064が実行し、ループ回数と、ポインタがオーバーラップするか否かを示す情報を取得する。
(5)(4)で取得したループ回数と、ポインタがオーバーラップするか否かを示す情報に対して、判断手段1065が、ループ回数が閾値以上であると判断し、かつ、ポインタがオーバーラップするか否かを示す情報が、ポインタがオーバーラップしないことを示す情報であると判断する。
(6)(5)で判断した結果に従い、決定手段1066が、ループ回数と、ポインタがオーバーラップするか否かを示す情報を取得した最適化箇所候補を、最適化箇所に決定する。
For example, when the following processing is performed in each unit included in the optimization location detection unit 106, the change unit 107 performs the optimization on the optimization location finally determined by the determination unit 1066. SIMD may be applied.
(1) The optimization location candidate detection means 1061 detects an optimization location candidate.
(2) The static analysis unit 1062 obtains a variable name from the optimization location candidate detected in (1), and using this information, there is a dependency between variables in the optimization location candidate. Whether or not it exists.
(3) For the optimization location candidate determined not to exist in (2), the profile program generation unit 1063 obtains information indicating whether the number of loops and the pointer overlap. Insert a profile code and generate a profile program.
(4) The dynamic analysis unit 1064 executes the profile program generated in (3), and obtains information indicating the number of loops and whether or not the pointers overlap.
(5) With respect to the loop count acquired in (4) and information indicating whether or not the pointer overlaps, the determination unit 1065 determines that the loop count is equal to or greater than the threshold and the pointer overlaps. It is determined that the information indicating whether or not to perform is information indicating that the pointers do not overlap.
(6) According to the result determined in (5), the determination unit 1066 determines the optimization location candidate that has acquired information indicating whether the number of loops and the pointer overlap or not as the optimization location.

また、変更部107は、最適化箇所検出部106が、最適化箇所を検出する際に用いた最適化箇所検出情報に対応する変更情報を、最適化情報格納部102から取得し、当該変更情報で最適化箇所を置換し、最適化されたプログラムを取得してもよい。   Further, the change unit 107 acquires change information corresponding to the optimization location detection information used when the optimization location detection unit 106 detects the optimization location from the optimization information storage unit 102, and the change information The optimized program may be obtained by replacing the optimized part with.

ここで、変更情報で最適化箇所を変更とは、変更情報で、最適化箇所を置換することである。つまり、例えば、最適化検出情報が「MOVE」という命令であり、変更情報が「SMOVE」という命令である場合、「MOVE」を「SMOVE」に置換することである。   Here, changing the optimization location with the change information means replacing the optimization location with the change information. That is, for example, when the optimization detection information is an instruction “MOVE” and the change information is an instruction “SMOVE”, “MOVE” is replaced with “SMOVE”.

また、変更部107は、最適化箇所を検出する際に用いた最適化箇所検出情報に応じて、最適化箇所を変更してもよい。例えば、最適化箇所検出情報が、マルチコア並列化を施す箇所を検出するための情報である場合は、変更部107は、当該最適化箇所検出情報により検出された最適化箇所に対して、当該最適化箇所検出情報に対応した変更情報を用いてマルチコア並列化を施す。また、例えば、最適化箇所検出情報が、SIMD化を施す箇所を検出するための情報である場合は、変更部107は、当該最適化箇所検出情報により検出された最適化箇所に対して、当該最適化箇所検出情報に対応した変更情報を用いてSIMD並列化を施す。また、例えば、最適化箇所検出情報が、置換を行う箇所を検出するための情報である場合は、変更部107は、当該最適化箇所検出情報により検出された最適化箇所を、当該最適化箇所検出情報に対応した変更情報に置換する。   Moreover, the change part 107 may change an optimization location according to the optimization location detection information used when detecting an optimization location. For example, when the optimization location detection information is information for detecting a location to be subjected to multi-core parallelization, the changing unit 107 performs the optimization on the optimization location detected by the optimization location detection information. Multi-core parallelization is performed using the change information corresponding to the conversion location detection information. Further, for example, when the optimization location detection information is information for detecting a location to be converted to SIMD, the changing unit 107 applies the optimization location detected by the optimization location detection information to the optimization location. SIMD parallelization is performed using the change information corresponding to the optimized location detection information. For example, when the optimization location detection information is information for detecting a location to be replaced, the changing unit 107 changes the optimization location detected by the optimization location detection information to the optimization location. Replace with the change information corresponding to the detection information.

また、変更部107は、最適化箇所検出情報に対応する変更情報に応じて、最適化箇所を変更してもよい。例えば、変更情報がマルチコア並列化を行うための方法を示す情報である場合は、変更部107は、検出された最適化箇所に対して、当該変更情報を用いてマルチコア並列化を施す。また、例えば、変更情報がSIMD化を行うための方法を示す情報である場合は、変更部107は、検出された最適化箇所に対して、当該変更情報を用いてSIMD化を施す。また、例えば、変更情報が置換を行うための情報である場合は、変更部107は、検出された最適化箇所を、当該変更情報に置換する。   Moreover, the change part 107 may change an optimization location according to the change information corresponding to optimization location detection information. For example, when the change information is information indicating a method for performing multi-core parallelization, the change unit 107 performs multi-core parallelization on the detected optimization location using the change information. For example, when the change information is information indicating a method for performing SIMD conversion, the changing unit 107 performs SIMD conversion on the detected optimization location using the change information. For example, when the change information is information for replacement, the change unit 107 replaces the detected optimization location with the change information.

また、例えば、最適化箇所情報が最適化箇所に対する変更の方法を示す変更方法情報を含んでいる場合は、当該変更方法情報に応じて、最適化箇所を変更してもよい。例えば、変更方法情報が、マルチコア並列化を施すことを示す情報である場合は、変更部107は、検出された最適化箇所に対して、変更情報を用いてマルチコア並列化を施す。また、例えば、変更情報に対応する変更方法情報が、SIMD化を施すことを示す情報である場合は、変更部107は、検出された最適化箇所に対して、変更情報を用いてSIMD化を施す。また、例えば、変更情報に対応する変更方法情報が、置換を行うことを示す情報である場合は、変更部107は、検出された最適化箇所を、変更情報に置換する。   For example, when the optimization location information includes change method information indicating a method for changing the optimization location, the optimization location may be changed according to the change method information. For example, when the change method information is information indicating that multi-core parallelization is to be performed, the change unit 107 performs multi-core parallelization on the detected optimization location using the change information. Further, for example, when the change method information corresponding to the change information is information indicating that SIMD conversion is to be performed, the change unit 107 performs SIMD conversion on the detected optimization location using the change information. Apply. For example, when the change method information corresponding to the change information is information indicating that replacement is to be performed, the change unit 107 replaces the detected optimization location with the change information.

変更部107は、通常、MPUやメモリ等から実現され得る。変更部107の処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現してもよい。   The changing unit 107 can be usually realized by an MPU, a memory, or the like. The processing procedure of the changing unit 107 is usually realized by software, and the software is recorded on a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

実行部108は、最適化されたアセンブリプログラムを実行する。   The execution unit 108 executes the optimized assembly program.

ここで、アセンブリプログラムの実行は、通常、アセンブリプログラムを機械語に変換後、実行する。また、アセンブリプログラムの実行は、アセンブリプログラムを機械語に変換するプログラムであるアセンブラを用いて、アセンブリプログラムを機械語に変換後、実行してもよい。この場合、アセンブラは、例えば、実行部108が保持していてもよいし、そうでなくてもよい。そうでない場合は、アセンブラは、任意の記憶領域に格納されていてもよい。   Here, the assembly program is usually executed after the assembly program is converted into machine language. The assembly program may be executed after the assembly program is converted into the machine language by using an assembler that is a program for converting the assembly program into the machine language. In this case, for example, the execution unit 108 may or may not hold the assembler. Otherwise, the assembler may be stored in any storage area.

実行部108は、通常、MPUやメモリ等から実現され得る。実行部108の処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現してもよい。   The execution unit 108 can usually be realized by an MPU, a memory, or the like. The processing procedure of the execution unit 108 is usually realized by software, and the software is recorded on a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

次に、実行モジュール最適化装置1の動作について説明する。   Next, the operation of the execution module optimization device 1 will be described.

図7は、実行モジュール最適化装置1の全体動作を示すフローチャートである。   FIG. 7 is a flowchart showing the overall operation of the execution module optimizing apparatus 1.

(ステップS701)受付部104は、実行モジュール識別子を有する指示を受け付けたか否かを判断する。受け付けた場合は、ステップS702に進み、そうでない場合は、ステップS701に戻る。   (Step S701) The receiving unit 104 determines whether an instruction having an execution module identifier has been received. If accepted, the process proceeds to step S702; otherwise, the process returns to step S701.

(ステップS702)逆アセンブル部105は、実行モジュール格納部101に格納されている実行モジュールを取得する。ここで取得する実行モジュールは、ステップS701で受付部104が受け付けた指示に含まれる実行モジュール識別子で識別される実行モジュールである。   (Step S <b> 702) The disassembly unit 105 acquires an execution module stored in the execution module storage unit 101. The execution module acquired here is an execution module identified by an execution module identifier included in the instruction received by the receiving unit 104 in step S701.

(ステップS703)逆アセンブル部105は、ステップS702で取得した実行モジュールを、逆アセンブルし、アセンブリプログラムを取得する。   (Step S703) The disassembly unit 105 disassembles the execution module acquired in step S702, and acquires an assembly program.

(ステップS704)最適化箇所検出部106は、ステップS703で逆アセンブル部105が取得したアセンブリプログラムから、最適化箇所を検出する。この処理の詳細については、図8のフローチャートを用いて説明する。   (Step S704) The optimization location detection part 106 detects an optimization location from the assembly program which the disassembly part 105 acquired by step S703. Details of this processing will be described with reference to the flowchart of FIG.

(ステップS705)変更部107は、当該最適化箇所を変更し、最適化されたアセンブリプログラムを取得する。この処理の詳細については、図14のフローチャートを用いて説明する。   (Step S705) The changing unit 107 changes the optimization location and acquires an optimized assembly program. Details of this processing will be described with reference to the flowchart of FIG.

(ステップS706)実行部108は、変更部107が取得したアセンブリプログラムを実行する。   (Step S706) The execution unit 108 executes the assembly program acquired by the changing unit 107.

図8は、図7のフローチャートのステップS304の最適化箇所の検出処理を示すフローチャートである。   FIG. 8 is a flowchart showing the optimization location detection processing in step S304 of the flowchart of FIG.

(ステップS801)最適化箇所候補検出手段1061は、ステップS703で逆アセンブル部105が取得したアセンブリプログラムを取得する。   (Step S801) The optimization location candidate detection means 1061 acquires the assembly program acquired by the disassembly unit 105 in step S703.

(ステップS802)最適化箇所候補検出手段1061は、最適化情報格納部102に格納されている最適化情報を取得する。ここで、m個の最適化情報が取得できたものとする。   (Step S802) The optimization location candidate detection means 1061 acquires the optimization information stored in the optimization information storage unit 102. Here, it is assumed that m pieces of optimization information have been acquired.

(ステップS803)最適化箇所候補検出手段1061は、カウンタiに1をセットする。   (Step S803) The optimization location candidate detection means 1061 sets 1 to the counter i.

(ステップS804)最適化箇所候補検出手段1061は、ステップS801で取得したアセンブリプログラムから、i番目の最適化箇所検出情報(以下、最適化箇所検出情報[i])にマッチする箇所を検出する。ここで、n個のマッチする箇所が検出できたものとする。この処理の詳細については、図9のフローチャートを用いて説明する。   (Step S804) The optimization location candidate detection unit 1061 detects a location that matches the i-th optimization location detection information (hereinafter, optimization location detection information [i]) from the assembly program acquired in Step S801. Here, it is assumed that n matching locations have been detected. Details of this processing will be described with reference to the flowchart of FIG.

(ステップS805)最適化箇所候補検出手段1061は、iがmであるか否かを判断する。mである場合は、ステップS807に進み、そうでない場合は、ステップS806に進む。   (Step S805) The optimization location candidate detection means 1061 determines whether i is m. When it is m, it progresses to step S807, and when that is not right, it progresses to step S806.

(ステップS806)最適化箇所候補検出手段1061は、カウンタiを1インクリメントし、ステップS804に戻る。   (Step S806) The optimization location candidate detection means 1061 increments the counter i by 1, and returns to step S804.

(ステップS807)最適化箇所候補検出手段1061は、カウンタiに1をセットする。   (Step S807) The optimization location candidate detection means 1061 sets 1 to the counter i.

(ステップS808)最適化箇所候補検出手段1061は、カウンタjに0をセットする。   (Step S808) The optimization location candidate detection means 1061 sets 0 to the counter j.

(ステップS809)最適化箇所候補検出手段1061は、カウンタkに0をセットする。   (Step S809) The optimization location candidate detection means 1061 sets 0 to the counter k.

(ステップS810)最適化箇所候補検出手段1061は、ステップS804で検出したマッチする箇所のうち、i番目のマッチする箇所(以下、マッチする箇所[i])がループであるか否かを判断する。ループである場合は、ステップS811に進み、そうでない場合は、ステップS813に進む。   (Step S810) The optimization location candidate detection means 1061 judges whether the i-th matching location (henceforth a matching location [i]) is a loop among the matching locations detected by step S804. . When it is a loop, it progresses to step S811, and when that is not right, it progresses to step S813.

(ステップS811)最適化箇所候補検出手段1061は、jを1インクリメントする。   (Step S811) The optimization location candidate detection means 1061 increments j by 1.

(ステップS812)最適化箇所候補検出手段1061は、j番目のループとして、マッチする箇所[i]を任意の記憶領域に蓄積する。   (Step S812) The optimization location candidate detection means 1061 accumulates the matching location [i] in an arbitrary storage area as the j-th loop.

(ステップS813)最適化箇所候補検出手段1061は、kを1インクリメントする。   (Step S813) The optimization location candidate detection means 1061 increments k by 1.

(ステップS814)最適化箇所候補検出手段1061は、k番目の最適化箇所として、マッチする箇所[i]を任意の記憶領域に蓄積する。   (Step S814) The optimization location candidate detection unit 1061 accumulates the matching location [i] as an kth optimization location in an arbitrary storage area.

(ステップS815)最適化箇所候補検出手段1061は、iがnであるか否かを判断する。nである場合は、ステップS817に進み、そうでない場合は、ステップS816に進む。   (Step S815) The optimization location candidate detection means 1061 determines whether i is n. When it is n, it progresses to step S817, and when that is not right, it progresses to step S816.

(ステップS816)最適化箇所候補検出手段1061は、iを1インクリメントし、ステップS810に戻る。   (Step S816) The optimization location candidate detection means 1061 increments i by 1, and returns to step S810.

(ステップS817)最適化箇所候補検出手段1061は、ステップS812で蓄積したループから、最適化箇所を検出し、上位処理にリターンする。この処理の詳細については、図10のフローチャートを用いて説明する。   (Step S817) The optimization location candidate detection means 1061 detects an optimization location from the loop accumulate | stored at step S812, and returns to a high-order process. Details of this processing will be described with reference to the flowchart of FIG.

図9は、図8のフローチャートのステップS804の最適化箇所情報にマッチする箇所の検出処理を示すフローチャートである。   FIG. 9 is a flowchart showing a process for detecting a location that matches the optimized location information in step S804 of the flowchart of FIG.

(ステップS901)最適化箇所候補検出手段1061は、カウンタiに1をセットする。   (Step S901) The optimization location candidate detection means 1061 sets 1 to the counter i.

(ステップS902)最適化箇所候補検出手段1061は、iが、アセンブリプログラムの行数nから最適化箇所検出情報の行数mを引いた値よりも大きいか否かを判断する。大きい場合は、上位処理にリターンし、そうでない場合は、ステップS903に進む。   (Step S902) The optimization location candidate detection means 1061 determines whether i is larger than the value obtained by subtracting the number of rows m of the optimization location detection information from the number of rows n of the assembly program. If it is larger, the process returns to the upper process, and if not, the process proceeds to step S903.

(ステップS903)最適化箇所候補検出手段1061は、アセンブリプログラム中のi行目のコード(以下、コード[i])と、最適化箇所検出情報中の1行目のコードパターン(以下、コードパターン[1])とを比較し、当該コードが当該コードパターンに一致するか否かを判断する。一致する場合は、ステップS905に進み、そうでない場合は、ステップS904に進む。   (Step S903) The optimization location candidate detection unit 1061 reads the code on the i-th line (hereinafter referred to as code [i]) in the assembly program and the code pattern on the first row in the optimization location detection information (hereinafter referred to as code pattern) [1]) to determine whether or not the code matches the code pattern. If they match, the process proceeds to step S905, and if not, the process proceeds to step S904.

(ステップS904)最適化箇所候補検出手段1061は、iを1インクリメントし、ステップS902に戻る。   (Step S904) The optimization location candidate detection means 1061 increments i by 1, and returns to step S902.

(ステップS905)最適化箇所候補検出手段1061は、マッチする箇所の開始位置startにiをセットする。   (Step S905) The optimization location candidate detection means 1061 sets i to the start position start of the matching location.

(ステップS906)最適化箇所候補検出手段1061は、フラグflagにfalseをセットする。   (Step S906) The optimization location candidate detection means 1061 sets false to the flag flag.

(ステップS907)最適化箇所候補検出手段1061は、カウンタjに1をセットする。   (Step S907) The optimization location candidate detection means 1061 sets 1 to the counter j.

(ステップS908)最適化箇所候補検出手段1061は、コード[start+j−1]とコードパターン[j]とを比較し、当該コードが当該コードパターンに一致するか否かを判断する。一致する場合は、ステップS909に進み、そうでない場合は、ステップS910に進む。   (Step S908) The optimization location candidate detection unit 1061 compares the code [start + j-1] with the code pattern [j] and determines whether or not the code matches the code pattern. If they match, the process proceeds to step S909; otherwise, the process proceeds to step S910.

(ステップS909)最適化箇所候補検出手段1061は、flagにtrueをセットし、ステップS911に進む。   (Step S909) The optimization location candidate detection means 1061 sets true to flag, and progresses to step S911.

(ステップS910)最適化箇所候補検出手段1061は、flagにfalseをセットし、ステップS911に進む。   (Step S910) The optimization location candidate detection means 1061 sets false to flag, and progresses to step S911.

(ステップS911)最適化箇所候補検出手段1061は、jがmであるか否かを判断する。mである場合は、ステップS913に進み、そうでない場合は、ステップS912に進む。   (Step S911) The optimization location candidate detection means 1061 determines whether j is m. When it is m, it progresses to step S913, and when that is not right, it progresses to step S912.

(ステップS912)最適化箇所候補検出手段1061は、jを1インクリメントし、ステップS908に戻る。   (Step S912) The optimization location candidate detection means 1061 increments j by 1, and returns to step S908.

(ステップS913)最適化箇所候補検出手段1061は、flagがtureであるか否かを判断する。trueである場合は、ステップS915に進み、そうでない場合は、ステップS914に進む。   (Step S913) The optimization location candidate detection means 1061 judges whether flag is true. If true, the process proceeds to step S915, and if not, the process proceeds to step S914.

(ステップS914)最適化箇所候補検出手段1061は、iにstart+1をセットし、ステップS902に戻る。   (Step S914) The optimization location candidate detection means 1061 sets start + 1 to i, and returns to step S902.

(ステップS915)最適化箇所候補検出手段1061は、マッチする箇所の終了位置endにstart+m−1をセットする。   (Step S915) The optimization location candidate detection means 1061 sets start + m-1 to the end position end of the matching location.

(ステップS916)最適化箇所候補検出手段1061は、カウンタkに既に検出したマッチする箇所の数+1をセットする。   (Step S916) The optimization location candidate detection means 1061 sets the number of matching locations detected already + 1 to the counter k.

(ステップS917)最適化箇所候補検出手段1061は、k番目のマッチする箇所として、startとendを任意の記憶領域に蓄積する。   (Step S917) The optimization location candidate detection means 1061 accumulate | stores start and end in arbitrary storage areas as a kth matching location.

図10は、図8のフローチャートのステップS817のループからの最適化箇所の検出処理を示すフローチャートである。   FIG. 10 is a flowchart showing an optimization location detection process from the loop in step S817 in the flowchart of FIG.

(ステップS1001)最適化箇所候補検出手段1061は、プロファイラを用いた最適化箇所候補の検出を行うか否かを判断する。行う場合はステップS1002に進み、そうでない場合は、ステップS1003に進む。   (Step S1001) The optimization location candidate detection means 1061 determines whether or not to detect an optimization location candidate using a profiler. If so, the process proceeds to step S1002, and if not, the process proceeds to step S1003.

(ステップS1002)最適化箇所候補検出手段1061は、プロファイラを用いて、最適箇所候補を検出する。ここで、m個の最適化箇所候補が検出できたものとする。この処理の詳細については、図11のフローチャートを用いて説明する。   (Step S1002) The optimization location candidate detection means 1061 detects an optimal location candidate using a profiler. Here, it is assumed that m optimization location candidates have been detected. Details of this processing will be described with reference to the flowchart of FIG.

(ステップS1003)最適化箇所候補検出手段1061は、制御フローグラフを用いて、最適化箇所候補を検出する。ここで、m個の最適化箇所候補が検出できたものとする。この処理の詳細については、図12のフローチャートを用いて説明する。   (Step S1003) The optimization location candidate detection means 1061 detects an optimization location candidate using a control flow graph. Here, it is assumed that m optimization location candidates have been detected. Details of this processing will be described with reference to the flowchart of FIG.

(ステップS1004)静的解析手段1062は、ステップS1002、またはステップS1003で最適化箇所候補検出手段1061が検出した各最適化箇所候補に対して静的解析を行い、最適化箇所候補を決定する。   (Step S1004) The static analysis means 1062 performs a static analysis on each optimization location candidate detected by the optimization location candidate detection means 1061 in step S1002 or step S1003, and determines an optimization location candidate.

(ステップS1005)プロファイルプログラム生成手段1063は、ステップS1004で決定した各最適化箇所候補の前にアセンブリプログラム命令列を挿入し、プロファイルプログラムを生成する。   (Step S1005) The profile program generation means 1063 inserts an assembly program instruction sequence before each optimization location candidate determined in step S1004, and generates a profile program.

(ステップS1006)動的解析手段1064は、ステップS1005で生成したプロファイルプログラムを実行し、動的解析を行い、パラメータを取得する。   (Step S1006) The dynamic analysis means 1064 executes the profile program generated in step S1005, performs dynamic analysis, and acquires parameters.

(ステップS1007)判断手段1065は、カウンタiに1をセットする。   (Step S1007) The judgment means 1065 sets 1 to the counter i.

(ステップS1008)決定手段1066は、カウンタjに既に検出した最適化箇所の数をセットする。   (Step S1008) The determination unit 1066 sets the number of optimization points already detected in the counter j.

(ステップS1009)判断手段1065は、ステップS1006で取得できたパラメータが、予め決められた条件に合致するか否かを判断することで、i番目の最適化箇所候補(以下、最適化箇所候補[i])が最適化箇所か否かを判断する。予め決められた条件に合致し、最適化箇所である場合は、ステップS1010に進み、そうでない場合は、ステップS1012に進む。   (Step S1009) The determination unit 1065 determines whether the parameter acquired in step S1006 matches a predetermined condition, thereby determining the i-th optimized location candidate (hereinafter referred to as the optimized location candidate [ i]) is an optimization location. If the predetermined condition is met and the location is an optimization location, the process proceeds to step S1010. Otherwise, the process proceeds to step S1012.

(ステップS1010)決定手段1066は、jを1インクリメントする。   (Step S1010) The determination unit 1066 increments j by 1.

(ステップS1011)決定手段1066は、j番目の最適化箇所として、最適化箇所候補[i]を任意の記憶領域に蓄積する。   (Step S1011) The determination unit 1066 accumulates the optimization location candidate [i] in an arbitrary storage area as the j-th optimization location.

(ステップS1012)判断手段1065は、iがmであるか否かを判断する。mである場合は、上位処理にリターンし、そうでない場合は、ステップS1013に進む。   (Step S1012) The judgment means 1065 judges whether i is m. If m, the process returns to the upper process, and if not, the process proceeds to step S1013.

(ステップS1013)判断手段1065は、iを1インクリメントし、ステップS1009に戻る。   (Step S1013) The judgment means 1065 increments i by 1, and returns to step S1009.

図11は、図10のフローチャートのステップS1002のプロファイラを用いた最適化箇所の検出処理を示すフローチャートである。   FIG. 11 is a flowchart showing an optimization location detection process using the profiler in step S1002 of the flowchart of FIG.

(ステップS1101)最適化箇所候補検出手段1061は、プロファイラ格納部103に格納されているプロファイラを取得する。   (Step S1101) The optimization location candidate detection means 1061 acquires the profiler stored in the profiler storage unit 103.

(ステップS1102)最適化箇所候補検出手段1061は、ステップS801で取得したアセンブリプログラムに対し、ステップS1102で取得したプロファイラを実行し、プロファイル情報を取得する。   (Step S1102) The optimization location candidate detection means 1061 executes the profiler acquired in Step S1102 on the assembly program acquired in Step S801, and acquires profile information.

(ステップS1103)最適化箇所候補検出手段1061は、プロファイル情報中の負荷が閾値を超えているか否かを判断するための閾値を、任意の記憶領域から取得する。   (Step S1103) The optimization location candidate detection means 1061 acquires a threshold for determining whether or not the load in the profile information exceeds the threshold from an arbitrary storage area.

(ステップS1104)最適化箇所候補検出手段1061は、カウンタiに1をセットする。   (Step S1104) The optimization location candidate detection means 1061 sets 1 to the counter i.

(ステップS1105)最適化箇所候補検出手段1061は、カウンタjに0をセットする。   (Step S1105) The optimization location candidate detection means 1061 sets 0 to the counter j.

(ステップS1106)最適化箇所候補検出手段1061は、ステップS1102で取得したプロファイル情報中の、ステップS812で取得したi番目のループ(以下、ループ[i])に対応する負荷を取得し、当該負荷がステップS1103で取得した閾値より大きいか否かを判断する。大きい場合は、ステップS1107に進み、そうでない場合は、ステップS1109に進む。   (Step S1106) The optimization location candidate detection means 1061 acquires the load corresponding to the i-th loop (hereinafter referred to as loop [i]) acquired in step S812 in the profile information acquired in step S1102. Is greater than the threshold value acquired in step S1103. If so, the process proceeds to step S1107; otherwise, the process proceeds to step S1109.

(ステップS1107)最適化箇所候補検出手段1061は、jを1インクリメントする。   (Step S1107) The optimization location candidate detection means 1061 increments j by 1.

(ステップS1108)最適化箇所候補検出手段1061は、j番目の最適化箇所候補として、ループ[i]を任意の記憶領域に蓄積する。   (Step S1108) The optimization location candidate detection means 1061 accumulate | stores loop [i] in arbitrary storage areas as a jth optimization location candidate.

(ステップS1109)最適化箇所候補検出手段1061は、iがステップS812で取得したループの数nであるか否かを判断する。nである場合は、上位処理にリターンし、そうでない場合は、ステップS1110に進む。   (Step S1109) The optimization location candidate detection means 1061 determines whether i is the number n of loops acquired in step S812. When it is n, it returns to a high-order process, and when that is not right, it progresses to step S1110.

(ステップS1110)最適化箇所候補検出手段1061は、iを1インクリメントし、ステップS1105に戻る。   (Step S1110) The optimization location candidate detection means 1061 increments i by 1, and returns to step S1105.

図12は、図10のフローチャートのステップS1003の制御フローグラフを用いた最適化箇所の検出処理を示すフローチャートである。   FIG. 12 is a flowchart showing an optimization location detection process using the control flow graph in step S1003 of the flowchart of FIG.

(ステップS1201)最適化箇所候補検出手段1061は、ステップS801で取得したアセンブリプログラムから、制御フローグラフを作成する。この処理の詳細については、図13のフローチャートを用いて説明する。   (Step S1201) The optimization location candidate detection means 1061 creates a control flow graph from the assembly program acquired in step S801. Details of this processing will be described with reference to the flowchart of FIG.

(ステップS1202)最適化箇所候補検出手段1061は、ステップS1201で作成した制御フローグラフについて、各ノード間の支配関係を解析し、当該解析結果を取得する。   (Step S1202) The optimization location candidate detection means 1061 analyzes the dominance relationship between each node about the control flow graph created by step S1201, and acquires the analysis result.

(ステップS1203)最適化箇所候補検出手段1061は、カウンタiに1をセットする。   (Step S1203) The optimization location candidate detection means 1061 sets 1 to the counter i.

(ステップS1204)最適化箇所候補検出手段1061は、カウンタjに0をセットする。   (Step S1204) The optimization location candidate detection means 1061 sets 0 to the counter j.

(ステップS1205)最適化箇所候補検出手段1061は、ステップS1202で取得した支配関係を基に、ステップS812で取得したi番目のループ(以下、ループ[i])が支配ループであるか否かを判断する。支配ループである場合は、ステップS1206に進み、そうでない場合は、ステップS1208に進む。   (Step S1205) The optimization location candidate detection means 1061 determines whether or not the i-th loop acquired in step S812 (hereinafter, loop [i]) is a dominating loop based on the dominating relationship acquired in step S1202. to decide. If so, the process proceeds to step S1206. Otherwise, the process proceeds to step S1208.

(ステップS1206)最適化箇所候補検出手段1061は、jを1インクリメントする。   (Step S1206) The optimization location candidate detection means 1061 increments j by 1.

(ステップS1207)最適化箇所候補検出手段1061は、j番目の最適化箇所候補として、ループ[i]を任意の記憶領域に蓄積する。   (Step S1207) The optimization location candidate detection means 1061 accumulate | stores loop [i] in arbitrary storage areas as a jth optimization location candidate.

(ステップS1208)最適化箇所候補検出手段1061は、iがステップS812で取得したループの数nであるか否かを判断する。nである場合は、上位処理にリターンし、そうでない場合は、ステップS1209に進む。   (Step S1208) The optimization location candidate detection means 1061 determines whether i is the number n of loops acquired in step S812. When it is n, it returns to a high-order process, and when that is not right, it progresses to step S1209.

(ステップS1209)最適化箇所候補検出手段1061は、iを1インクリメントし、ステップS1204に戻る。   (Step S1209) The optimization location candidate detection means 1061 increments i by 1, and returns to step S1204.

図13は、図12のフローチャートのステップS1201の制御フローグラフの作成処理を示すフローチャートである。   FIG. 13 is a flowchart showing a control flow graph creation process in step S1201 of the flowchart of FIG.

(ステップS1301)最適化箇所候補検出手段1061は、カウンタnに0をセットする。   (Step S1301) The optimization location candidate detection means 1061 sets 0 to the counter n.

(ステップS1302)最適化箇所候補検出手段1061は、カウンタiに1をセットする。   (Step S1302) The optimization location candidate detection means 1061 sets 1 to the counter i.

(ステップS1303)最適化箇所候補検出手段1061は、カウンタjにi+1をセットする。   (Step S1303) The optimization location candidate detection means 1061 sets i + 1 to the counter j.

(ステップS1304)最適化箇所候補検出手段1061は、ステップS801で取得したアセンブリプログラムのi行目のコード中の命令(以下、命令[i])の直後に、当該アセンブリプログラムの命令[j]が実行されるか否かを判断する。実行される場合は、ステップS1305に進み、そうでない場合は、ステップS1307に進む。なお、この判断は、通常、命令[j]が命令[i]の次の行であれば、命令[j]は命令[i]の直後に実行されると判断する。また、例えば、命令[i]がジャンプ命令などの分岐命令である場合であって、命令[i]による分岐先の直後に命令[j]が実行されるのであれば、命令[j]は命令[i]の直後に実行されると判断する。   (Step S1304) The optimization location candidate detection unit 1061 receives the instruction [j] of the assembly program immediately after the instruction in the i-th line code of the assembly program acquired in Step S801 (hereinafter, instruction [i]). Determine if it will be executed. If so, the process proceeds to step S1305; otherwise, the process proceeds to step S1307. This determination is normally made when the instruction [j] is executed immediately after the instruction [i] if the instruction [j] is the next line of the instruction [i]. Further, for example, when the instruction [i] is a branch instruction such as a jump instruction and the instruction [j] is executed immediately after the branch destination by the instruction [i], the instruction [j] It is determined to be executed immediately after [i].

(ステップS1305)最適化箇所候補検出手段1061は、nを1インクリメントする。   (Step S1305) The optimization location candidate detection means 1061 increments n by 1.

(ステップS1306)最適化箇所候補検出手段1061は、n番目のノードセットとして、命令[i]と命令[j]を任意の記憶領域に蓄積する。   (Step S1306) The optimization location candidate detection unit 1061 accumulates the instruction [i] and the instruction [j] in an arbitrary storage area as the n-th node set.

(ステップS1307)最適化箇所候補検出手段1061は、jがステップS801で取得したアセンブリプログラムの行数mであるか否かを判断する。mである場合は、ステップS1309に進み、そうでない場合は、ステップS1308に進む。   (Step S1307) The optimization location candidate detection means 1061 determines whether j is the number m of lines of the assembly program acquired in step S801. When it is m, it progresses to step S1309, and when that is not right, it progresses to step S1308.

(ステップS1308)最適化箇所候補検出手段1061は、jを1インクリメントし、ステップS1304に戻る。   (Step S1308) The optimization location candidate detection means 1061 increments j by 1, and returns to step S1304.

(ステップS1309)最適化箇所候補検出手段1061は、iがm−1であるか否かを判断する。m−1である場合は、上位処理にリターンし、そうでない場合は、ステップS1310に進む。   (Step S1309) The optimization location candidate detection means 1061 determines whether i is m-1. If it is m−1, the process returns to the upper process, and if not, the process proceeds to step S1310.

(ステップS1310)最適化箇所候補検出手段1061は、iを1インクリメントし、ステップS1303に戻る。   (Step S1310) The optimization location candidate detection means 1061 increments i by 1, and returns to step S1303.

図14は、図7のフローチャートのステップS705の最適化箇所の変更処理を示すフローチャートである。   FIG. 14 is a flowchart showing the optimization location change processing in step S705 of the flowchart of FIG.

(ステップS1401)変更部107は、任意の記憶領域に蓄積されている最適化箇所を取得する。   (Step S1401) The changing unit 107 acquires optimization locations accumulated in an arbitrary storage area.

(ステップS1402)変更部107は、カウンタiに1をセットする。   (Step S1402) The changing unit 107 sets 1 to the counter i.

(ステップS1403)変更部107は、i番目の最適化箇所(以下、最適化箇所[i])を検出した際に使用した最適化箇所検出情報に対応する変更情報を、最適化情報格納部102から取得する。   (Step S <b> 1403) The changing unit 107 displays the change information corresponding to the optimized location detection information used when detecting the i-th optimized location (hereinafter referred to as the optimized location [i]) as the optimized information storage unit 102. Get from.

(ステップS1404)変更部107は、ステップS1403で取得した変更情報を基に最適化箇所[i]を変更し、上位処理にリターンする。   (Step S1404) The changing unit 107 changes the optimization location [i] based on the change information acquired in step S1403, and returns to the upper process.

なお、図10のフローチャートにおいて、ステップS1001の判断を行わず、ステップS1002とステップS1003の最適化箇所候補の検出処理を行い、当該両処理において検出された最適化箇所候補を比較し、重複する最適化箇所候補を、改めて最適化箇所候補として検出してもよい。   In the flowchart of FIG. 10, the optimization location candidate detection process in steps S1002 and S1003 is performed without performing the determination in step S1001, and the optimization location candidates detected in both the processes are compared, and overlapping optimization is performed. The optimized location candidate may be detected again as an optimized location candidate.

次に、実行モジュール最適化装置1の動作の具体例について説明する。   Next, a specific example of the operation of the execution module optimization device 1 will be described.

本具体例において、最適化情報格納部102には、図15の最適化情報が格納されているものとする。   In this specific example, it is assumed that the optimization information storage unit 102 stores the optimization information of FIG.

図15の最適化情報において、1番目と2番目の最適化箇所検出情報は、プログラムパターンである。また、当該最適化情報において、3番目から5番目までの最適化箇所検出情報は、関数である。   In the optimization information of FIG. 15, the first and second optimization location detection information are program patterns. In the optimization information, the third to fifth optimization location detection information is a function.

また、図15の最適化情報において、1番目の変更情報は、マルチコア並列化を施すためのプログラムパターンであり、2番目の変更情報は、SIMD化を施すためのプログラムパターンである。また、当該最適化情報において、3番目から5番目までの変更情報は、関数である。   In the optimization information of FIG. 15, the first change information is a program pattern for performing multi-core parallelization, and the second change information is a program pattern for performing SIMD. In the optimization information, the third to fifth change information is a function.

また、図15の最適化箇所検出情報において、「<label>」は、任意の文字列を示すパターンであり、「<...>」は、任意のプログラムコードを示すパターンである。また、図15において、「<var>」や「<var1>」、「<var2>」などは、任意の文字列(変数)を示すパターンであり、「<count>」は、任意の数値を示すパターンである。   In the optimization location detection information of FIG. 15, “<label>” is a pattern indicating an arbitrary character string, and “<...>” Is a pattern indicating an arbitrary program code. In FIG. 15, “<var>”, “<var1>”, “<var2>”, etc. are patterns indicating an arbitrary character string (variable), and “<count>” is an arbitrary numerical value. It is a pattern to show.

また、図15の変更情報において、「$code」は、プログラムパターンである最適化箇所検出情報により検出された最適化箇所に対応するプログラムコードを示す変数であり、「$label」は、「<label>」のパターンに合致した文字列を示す変数である。また、図15の変更情報において、「$var」や「$var1」、「$var2」などは、「<var>」や「<var1>」、「<var2>」などのパターンに合致した文字列(変数)を示すパターンであり、「$count」は、「<count>」のパターンに合致した数値を示す変数である。   In the change information in FIG. 15, “$ code” is a variable indicating the program code corresponding to the optimization location detected by the optimization location detection information that is a program pattern, and “$ label” is “< This is a variable indicating a character string that matches the pattern “label>”. In the change information of FIG. 15, “$ var”, “$ var1”, “$ var2”, etc. are characters that match a pattern such as “<var>”, “<var1>”, “<var2>”, etc. This is a pattern indicating a column (variable), and “$ count” is a variable indicating a numerical value matching the pattern “<count>”.

また、最適化箇所候補検出手段1061は、検出したループのうち、マルチコア並列化を施す対象となり得るループについては、プロファイラを用いて、最適化箇所候補となり得るか否かを判断し、当該ループを最適化箇所候補として検出するものとする。また、最適化箇所候補検出手段1061は、検出したループのうち、SIMD化を施す対象となり得るループについては、制御フローグラフを用いて、最適化箇所候補となり得るか否かを判断し、当該ループを最適化箇所候補として検出するものとする。また、決定手段1066が最適化箇所を決定する際に、判断手段1065においてパラメータを判断する際の条件は、「ループ回数が100以上」かつ「ポインタがオーバーラップしていないこと」であるものとする。   In addition, the optimization location candidate detection unit 1061 uses a profiler to determine whether a loop that can be subjected to multi-core parallelization among the detected loops can be an optimization location candidate. It shall be detected as an optimization location candidate. In addition, the optimization location candidate detection unit 1061 uses the control flow graph to determine whether a loop that can be subjected to SIMD among the detected loops can be an optimization location candidate. Are detected as optimization location candidates. Further, when the determining unit 1066 determines the optimization location, the condition for determining the parameter in the determining unit 1065 is “the number of loops is 100 or more” and “the pointers do not overlap”. To do.

まず、ユーザは、最適化を行いたい実行モジュールを、マウスを用いて、実行モジュール最適化装置1の上にドラッグ&ドロップする。すると、受付部104は、実行モジュール識別子を有する実行モジュールを実行する旨の指示を受け付ける。   First, the user drags and drops an execution module to be optimized onto the execution module optimization apparatus 1 using a mouse. Then, the reception unit 104 receives an instruction to execute an execution module having an execution module identifier.

次に、逆アセンブル部105は、受付部104が受け付けた指示に含まれる実行モジュール識別子で識別される実行モジュールを、実行モジュール格納部101から取得する。そして、逆アセンブル部105は、当該実行モジュールを逆アセンブルし、図16のアセンブリプログラムを取得したものとする。   Next, the disassembly unit 105 acquires the execution module identified by the execution module identifier included in the instruction received by the reception unit 104 from the execution module storage unit 101. Then, it is assumed that the disassembly unit 105 disassembles the execution module and obtains the assembly program of FIG.

次に、最適化箇所候補検出手段1061は、図15の最適化情報を取得し、当該最適化情報に含まれる最適化箇所検出情報にマッチする箇所を、図16のアセンブリプログラムから検出する。その結果、1番目の最適化箇所検出情報にマッチする箇所として、8行目から15行目、2番目の最適化箇所検出情報にマッチする箇所として、18行目から31行目、3番目の最適化箇所検出情報にマッチする箇所として、39行目を検出したものとする。   Next, the optimization location candidate detection means 1061 acquires the optimization information of FIG. 15, and detects a location that matches the optimization location detection information included in the optimization information from the assembly program of FIG. As a result, the 8th to 15th lines are matched with the first optimized part detection information, the 18th line to the 31st line, the 3rd line are matched with the second optimized part detection information. It is assumed that the 39th line is detected as a location that matches the optimized location detection information.

次に、最適化箇所候補検出手段1061は、検出した各最適化箇所検出情報にマッチする箇所がループであるか否かを判断し、図16の8行目から15行目と、18行目から31行目についてはループであると判断し、39行目についてはループでないと判断する。この結果、最適化箇所検出手段1061は、39行目を最適化箇所として任意の記憶領域に蓄積する。また、ループであると判断した箇所のうち、8行目から15行目を第一ループとし、18行目から31行目を第二ループとする。   Next, the optimization location candidate detection means 1061 determines whether or not a location that matches each detected optimization location detection information is a loop, and the 8th to 15th and 18th rows in FIG. The 31st line is judged to be a loop, and the 39th line is judged not to be a loop. As a result, the optimized location detection unit 1061 accumulates the 39th row as an optimized location in an arbitrary storage area. Of the portions determined to be loops, the 8th to 15th lines are the first loop, and the 18th to 31st lines are the second loop.

次に、最適化箇所候補検出手段1061は、図15の変更情報から判断し、第一ループについて、プロファイラを用いて第一ループ内の各命令の負荷を取得し、負荷が閾値以上である命令を有すると判断し、第一ループを最適化箇所候補として検出する。   Next, the optimization location candidate detection unit 1061 determines from the change information in FIG. 15 and acquires the load of each instruction in the first loop using the profiler for the first loop. And the first loop is detected as an optimization location candidate.

次に、最適化箇所候補検出手段1061は、図15の変更情報から判断し、第二ループについて、制御フローグラフを作成し、各ノード間の支配関係を解析し、第二ループが支配ループであると判断し、第二ループを最適化箇所候補として検出する。   Next, the optimization location candidate detection unit 1061 determines from the change information in FIG. 15, creates a control flow graph for the second loop, analyzes the dominating relationship between the nodes, and the second loop is the dominating loop. The second loop is detected as an optimization location candidate.

次に、静的解析手段1062は、最適化箇所候補検出手段1061が検出した各最適化箇所候補に対して、静的解析を行う。静的解析手段1062は、第一ループについては、ループ不変値と、配列にアクセスするための誘導変数とを取得し、これらの値から、配列に対するメモリストアが行われていると判断し、第一ループを最適化箇所候補に決定する。また、静的解析手段1062は、第二ループについては、変数名を取得し、これらの値から、変数間の依存関係が存在しないと判断し、第二ループを最適化箇所候補に決定する。   Next, the static analysis unit 1062 performs a static analysis on each optimization location candidate detected by the optimization location candidate detection unit 1061. For the first loop, the static analysis means 1062 obtains a loop invariant value and an induction variable for accessing the array, determines from these values that memory storage is being performed for the array, One loop is determined as an optimization location candidate. Further, the static analysis unit 1062 acquires a variable name for the second loop, determines that there is no dependency relationship between the variables from these values, and determines the second loop as an optimization location candidate.

次に、プロファイルプログラム生成手段1063は、ループ回数とポインタがオーバーラップするか否かを示す情報を収集する命令列を、図16のアセンブリプログラムにおける第一ループと第二ループの直前に挿入し、図17のプロファイルプログラムを生成したものとする。図17において、8行目と20行目が、ループ回数を取得するための命令であり、9行目と21行目が、ポインタがオーバーラップするか否かを示す情報を取得するための命令である。   Next, the profile program generation means 1063 inserts an instruction sequence for collecting information indicating whether or not the number of loops and the pointer overlap with each other immediately before the first loop and the second loop in the assembly program of FIG. Assume that the profile program of FIG. 17 is generated. In FIG. 17, lines 8 and 20 are instructions for acquiring the number of loops, and lines 9 and 21 are instructions for acquiring information indicating whether or not the pointers overlap. It is.

次に、動的解析手段1064は、図17のプロファイルプログラムを実行し、第一ループ、および第二ループについて、ループ回数である「100」と、ポインタがオーバーラップしないこと示す情報を取得する。ここで、第一ループについて取得したパラメータを第一パラメータとし、第二ループについて取得したパラメータを第二パラメータとする。   Next, the dynamic analysis unit 1064 executes the profile program of FIG. 17 and acquires “100” as the number of loops and information indicating that the pointers do not overlap for the first loop and the second loop. Here, the parameter acquired for the first loop is the first parameter, and the parameter acquired for the second loop is the second parameter.

次に、判断手段1065は、第一パラメータと第二パラメータが、最適化箇所であることの条件に合致するか否か判断し、第一パラメータ、第二パラメータ共に、条件に合致すると判断する。   Next, the determination unit 1065 determines whether or not the first parameter and the second parameter match the conditions for optimization, and determines that both the first parameter and the second parameter match the conditions.

次に、決定手段1066は、第一パラメータと第二パラメータを取得したループである第一ループと第二ループを、最適化箇所に決定する。ここで、第一ループに該当する最適化箇所を、第一最適化箇所とし、第二ループに該当する最適化箇所を、第二最適化箇所とする。また、前述の置換を行う箇所である最適化箇所を、第三最適化箇所とする。   Next, the determination unit 1066 determines the first loop and the second loop, which are the loops that have acquired the first parameter and the second parameter, as optimization locations. Here, the optimization location corresponding to the first loop is the first optimization location, and the optimization location corresponding to the second loop is the second optimization location. In addition, the optimization location that is the location where the above replacement is performed is set as the third optimization location.

次に、変更部107は、第一最適化箇所に対して、例えば、以下のような処理で、マルチコア並列化を施す。
(1)変更部107は、第一最適化箇所に対応する図16の8行目から15行目までのプログラムコードを取得する。
(2)変更部107は、図15の1番目の変更情報を取得する。
(3)変更部107は、(2)で取得した変更情報中の「$code」を、(1)で取得したプログラムコードで置換し、変更後のプログラムコードを生成する。
(4)変更部107は、第一最適化箇所に対応する図16の8行目から15行目までのプログラムコードを、(3)で生成したプログラムコードで置換する。
上記の処理により、第一最適化箇所のアセンブリコードは、図18に示すものに変更されたものとする。
Next, the changing unit 107 performs multi-core parallelization on the first optimization location, for example, by the following processing.
(1) The changing unit 107 acquires the program codes from the 8th line to the 15th line in FIG. 16 corresponding to the first optimization location.
(2) The change unit 107 acquires the first change information in FIG.
(3) The change unit 107 replaces “$ code” in the change information acquired in (2) with the program code acquired in (1), and generates a changed program code.
(4) The changing unit 107 replaces the program code from the 8th line to the 15th line in FIG. 16 corresponding to the first optimization location with the program code generated in (3).
It is assumed that the assembly code at the first optimization location has been changed to that shown in FIG. 18 by the above processing.

また、変更部107は、第二最適化箇所に対して、例えば、以下のような処理で、SIMD化を施す。
(1)変更部107は、第二最適化箇所に対応する図16の18行目から31行目までのプログラムコードを取得する。
(2)変更部107は、(1)で取得したプログラムコードから、図15の2番目の最適化箇所変更情報中の「<label>」や「<var>」などのパターンに合致する文字列、変数を取得する。
(3)変更部107は、図15の2番目の変更情報を取得する。
(4)変更部107は、(3)で取得した変更情報中の「$label」や「$var」などを、(2)で取得した文字列、変数で置換し、変更後のプログラムコードを生成する。
(5)変更部107は、第二最適化箇所に対応する図16の18行目から31行目までのプログラムコードを、(4)で生成したプログラムコードで置換する。
上記の処理により、第二最適化箇所のアセンブリコードは、図19に示すものに変更されたものとする。
Further, the changing unit 107 applies SIMD to the second optimization location by the following process, for example.
(1) The change unit 107 acquires program codes from the 18th line to the 31st line in FIG. 16 corresponding to the second optimization location.
(2) The changing unit 107 uses the program code acquired in (1) to match a character string that matches a pattern such as “<label>” or “<var>” in the second optimization location change information in FIG. , Get the variable.
(3) The change unit 107 acquires the second change information in FIG.
(4) The change unit 107 replaces “$ label”, “$ var”, etc. in the change information acquired in (3) with the character string and variable acquired in (2), and changes the program code after the change. Generate.
(5) The changing unit 107 replaces the program code from the 18th line to the 31st line in FIG. 16 corresponding to the second optimization location with the program code generated in (4).
It is assumed that the assembly code at the second optimization location has been changed to that shown in FIG. 19 by the above processing.

また、変更部107は、第三最適化箇所に対して、置換を行う。この結果、第三最適化箇所のアセンブリコードは、図20に示すものに変更されたものとする。   In addition, the changing unit 107 performs replacement for the third optimization location. As a result, it is assumed that the assembly code at the third optimization location is changed to that shown in FIG.

これらの結果、変更部107は、図13の最適化されたアセンブリコードを取得したものとする。   As a result, it is assumed that the changing unit 107 has acquired the optimized assembly code of FIG.

最後に、実行部108は、図21のアセンブリプログラムを実行する。   Finally, the execution unit 108 executes the assembly program of FIG.

なお、本実施の形態において、変更部107は、アセンブリプログラムを最適化した際に、受付部104が受け付けた指示に含まれる実行モジュール識別子と、当該実行モジュール識別子で識別される実行モジュールが既に最適化されたものである旨を示す最適化済情報と、最適化したアセンブリプログラムとを対応付け、任意の蓄積領域に蓄積してもよい。この場合において、受付部104は、任意の記憶領域に蓄積されている最適化済情報を基に、受け付けた指示に含まれる実行モジュール識別子で識別される実行モジュールが、最適化済であるか否かを判断してもよい。また、この場合において、受付部104が、実行モジュールが最適化済であると判断した場合は、実行モジュール最適化装置1は、逆アセンブル部105等による最適化処理を行わず、実行部108が、受付部104が受け付けた指示に含まれる実行モジュール識別子に対応する最適化済アセンブリプログラムを任意の記憶領域から取得し、当該アセンブリプログラムを実行してもよい。   In the present embodiment, the changing unit 107 has already optimized the execution module identifier included in the instruction received by the receiving unit 104 and the execution module identified by the execution module identifier when the assembly program is optimized. The optimized information indicating that the information has been converted to the optimized assembly program may be associated with each other and stored in an arbitrary storage area. In this case, the accepting unit 104 determines whether or not the execution module identified by the execution module identifier included in the accepted instruction has been optimized based on the optimized information stored in an arbitrary storage area. It may be judged. In this case, if the receiving unit 104 determines that the execution module has been optimized, the execution module optimizing device 1 does not perform the optimization process by the disassembly unit 105 or the like, and the execution unit 108 The optimized assembly program corresponding to the execution module identifier included in the instruction received by the receiving unit 104 may be acquired from an arbitrary storage area, and the assembly program may be executed.

また、本実施の形態において、変更部107は、アセンブリプログラムを最適化した際に、受付部104が受け付けた指示に含まれる実行モジュール識別子と、当該実行モジュール識別子で識別される実行モジュールが既に最適化されたものである旨を示す最適化済情報と、最適化したアセンブリプログラムをアセンブルし、実行モジュールを取得し、当該最適化済実行モジュールとを対応付け、任意の記憶領域に蓄積してもよい。この場合において、受付部104は、任意の記憶領域に蓄積されている最適化済情報を基に、受け付けた指示に含まれる実行モジュール識別子で識別される実行モジュールが、最適化済であるか否かを判断してもよい。また、この場合において、受付部104が、実行モジュールが最適化済であると判断した場合は、実行モジュール最適化装置1は、逆アセンブル部105等による最適化処理を行わず、実行部108が、受付部104が受け付けた指示に含まれる実行モジュール識別子に対応する最適化済実行モジュールを任意の記憶領域から取得し、当該実行モジュールを実行してもよい。   Further, in the present embodiment, when the changing unit 107 optimizes the assembly program, the execution module identifier included in the instruction received by the receiving unit 104 and the execution module identified by the execution module identifier are already optimal. Assembling the optimized assembly program indicating that it has been optimized and the optimized assembly program, obtaining an execution module, associating the optimized execution module, and storing it in an arbitrary storage area Good. In this case, the accepting unit 104 determines whether or not the execution module identified by the execution module identifier included in the accepted instruction has been optimized based on the optimized information stored in an arbitrary storage area. It may be judged. In this case, if the receiving unit 104 determines that the execution module has been optimized, the execution module optimizing device 1 does not perform the optimization process by the disassembly unit 105 or the like, and the execution unit 108 The optimized execution module corresponding to the execution module identifier included in the instruction received by the reception unit 104 may be acquired from an arbitrary storage area, and the execution module may be executed.

また、本実施の形態において、変更部107は、アセンブリプログラムを最適化した際に、受付部104が受け付けた指示に含まれる実行モジュール識別子と、当該実行モジュール識別子で識別される実行モジュールが既に最適化されたものである旨を示す最適化済情報とを対応付け、任意の記憶領域に蓄積し、最適化したアセンブリプログラムをアセンブルし、実行モジュールを取得し、当該最適化済実行モジュールを、受付部104が受け付けた指示に含まれる実行モジュール識別子で識別される実行モジュールと置き換えてもよい。この場合において、受付部104は、任意の記憶領域に蓄積されている最適化済情報を基に、受け付けた指示に含まれる実行モジュール識別子で識別される実行モジュールが、最適化済であるか否かを判断してもよい。また、この場合において、受付部104が、実行モジュールが最適化済であると判断した場合は、実行モジュール最適化装置1は、逆アセンブル部105等による最適化処理を行わず、実行部108が、受付部104が受け付けた指示に含まれる実行モジュール識別子で識別される実行モジュールを実行してもよい。   Further, in the present embodiment, when the changing unit 107 optimizes the assembly program, the execution module identifier included in the instruction received by the receiving unit 104 and the execution module identified by the execution module identifier are already optimal. Optimized information indicating that it has been optimized, accumulated in an arbitrary storage area, assembled an optimized assembly program, obtained an execution module, and received the optimized execution module The execution module may be replaced with an execution module identified by an execution module identifier included in the instruction received by the unit 104. In this case, the accepting unit 104 determines whether or not the execution module identified by the execution module identifier included in the accepted instruction has been optimized based on the optimized information stored in an arbitrary storage area. It may be judged. In this case, if the receiving unit 104 determines that the execution module has been optimized, the execution module optimizing device 1 does not perform the optimization process by the disassembly unit 105 or the like, and the execution unit 108 The execution module identified by the execution module identifier included in the instruction received by the reception unit 104 may be executed.

以上、本実施の形態による実行モジュール最適化装置1によれば、実行モジュールからアセンブリコードを取得し、当該アセンブリコードを最適化することができる。   As described above, according to the execution module optimizing apparatus 1 according to the present embodiment, it is possible to acquire assembly code from an execution module and optimize the assembly code.

(実施の形態2)
本実施の形態において、実行モジュールを最適化する実行モジュール最適化装置2について説明する。本実施の形態における実行モジュール最適化装置2は、実施の形態1の実行モジュール最適化装置1とは異なり、最適化されたアセンブリプログラムの実行は行わない。実行モジュール最適化装置2は、アセンブリプログラム、または実行モジュールの最適化のみを行う。
(Embodiment 2)
In the present embodiment, an execution module optimizing device 2 that optimizes an execution module will be described. Unlike the execution module optimization apparatus 1 of the first embodiment, the execution module optimization apparatus 2 in the present embodiment does not execute the optimized assembly program. The execution module optimizing device 2 only optimizes an assembly program or an execution module.

図22は、本実施の形態における実行モジュール最適化装置2のブロック図である。   FIG. 22 is a block diagram of the execution module optimizing apparatus 2 in the present embodiment.

実行モジュール最適化装置2は、実行モジュール格納部201、最適化情報格納部202、受付部203、逆アセンブル部204、最適化箇所検出部205、変更部206、コンパイル部207、蓄積部208を備える。   The execution module optimization apparatus 2 includes an execution module storage unit 201, an optimization information storage unit 202, a reception unit 203, a disassembly unit 204, an optimization location detection unit 205, a change unit 206, a compilation unit 207, and an accumulation unit 208. .

なお、実行モジュール格納部201、最適化情報格納部202、受付部203、逆アセンブル部204、最適化箇所検出部205、変更部206については、実施の形態1と同様であるので、その説明を省略する。   Note that the execution module storage unit 201, the optimization information storage unit 202, the reception unit 203, the disassembly unit 204, the optimization location detection unit 205, and the change unit 206 are the same as those in the first embodiment, so the description thereof will be given. Omitted.

コンパイル部207は、変更部206が取得した最適化されたアセンブリプログラムをコンパイルし、最適化されたの実行モジュールを取得する。   The compiling unit 207 compiles the optimized assembly program acquired by the changing unit 206 and acquires the optimized execution module.

ここで、コンパイルとは、アセンブリプログラムを、実行モジュールに変換することである。コンパイルは、公知の技術であるので、詳細な説明は省略する。   Here, compiling means converting an assembly program into an execution module. Since the compilation is a known technique, a detailed description is omitted.

また、コンパイル部207は、例えば、コンパイルを行うプログラムであるコンパイラを用いて、最適化されたアセンブリプログラムのコンパイル、および当該最適化されたアセンブリプログラムに対応する最適化された実行モジュールを得てもよい。この場合、コンパイラは、例えば、コンパイル部207が保持していてもよいし、そうでなくてもよい。そうでない場合は、コンパイラは、任意の記憶領域に格納されていてもよい。   Further, the compiling unit 207 may compile an optimized assembly program and obtain an optimized execution module corresponding to the optimized assembly program, for example, using a compiler that is a compiling program. Good. In this case, for example, the compiler may or may not be held by the compiling unit 207. Otherwise, the compiler may be stored in any storage area.

コンパイル部207は、通常、MPUやメモリ等から実現され得る。コンパイル部207の処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現してもよい。   The compiling unit 207 can usually be realized by an MPU, a memory, or the like. The processing procedure of the compiling unit 207 is usually realized by software, and the software is recorded in a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

蓄積部208は、変更部206が取得した最適化されたアセンブリプログラムを、任意の記憶領域に蓄積する。また、蓄積部208は、コンパイル部207が取得した最適化された実行モジュールを、任意の記憶領域に蓄積してもよい。   The accumulation unit 208 accumulates the optimized assembly program acquired by the changing unit 206 in an arbitrary storage area. Further, the storage unit 208 may store the optimized execution module acquired by the compiling unit 207 in an arbitrary storage area.

また、蓄積部208は、最適化された実行モジュールを、最適化前の実行モジュールに上書きして、蓄積してもよい。   Further, the storage unit 208 may store the optimized execution module by overwriting the execution module before the optimization.

蓄積部208は、通常、MPUやメモリ等から実現され得る。蓄積部208の処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現してもよい。   The storage unit 208 can usually be realized by an MPU, a memory, or the like. The processing procedure of the storage unit 208 is usually realized by software, and the software is recorded in a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

なお、実行モジュール最適化装置2の最適化処理や、実行モジュール最適化装置2の最適化処理の具体例については、実施の形態1と同様であるので、その説明を省略する。   A specific example of the optimization process of the execution module optimization device 2 and the optimization process of the execution module optimization device 2 is the same as that of the first embodiment, and thus the description thereof is omitted.

以上、本実施の形態による実行モジュール最適化装置2によれば、実行モジュールからアセンブリコードを取得し、当該アセンブリコードを最適化することができる。また、本実施の形態による実行モジュール最適化装置2によれば、実行モジュールを最適化することができる。   As described above, according to the execution module optimizing apparatus 2 according to the present embodiment, it is possible to acquire assembly code from an execution module and optimize the assembly code. Further, according to the execution module optimizing apparatus 2 according to the present embodiment, the execution module can be optimized.

なお、本実施の形態において、変更部206は、アセンブリプログラムを最適化した際に、受付部203が受け付けた指示に含まれる実行モジュール識別子と、当該実行モジュール識別子で識別される実行モジュールが既に最適化されたものである旨を示す最適化済情報と、最適化したアセンブリプログラムとを対応付け、任意の蓄積領域に蓄積してもよい。この場合において、受付部203は、任意の記憶領域に蓄積されている最適化済情報を基に、受け付けた指示に含まれる実行モジュール識別子で識別される実行モジュールが、最適化済であるか否かを判断してもよい。この場合、受付部203が、実行モジュールが最適化済であると判断した場合は、実行モジュール最適化装置2は、逆アセンブル部204等による最適化処理を行わない。   In the present embodiment, the changing unit 206 has already optimized the execution module identifier included in the instruction received by the receiving unit 203 and the execution module identified by the execution module identifier when the assembly program is optimized. The optimized information indicating that the information has been converted to the optimized assembly program may be associated with each other and stored in an arbitrary storage area. In this case, the accepting unit 203 determines whether or not the execution module identified by the execution module identifier included in the accepted instruction has been optimized based on the optimized information accumulated in an arbitrary storage area. It may be judged. In this case, when the receiving unit 203 determines that the execution module has been optimized, the execution module optimizing device 2 does not perform the optimization process by the disassembly unit 204 or the like.

また、上記各実施の形態において、一の装置に存在する2以上の通信手段は、物理的に一の媒体で実現されてもよいことは言うまでもない。   Further, in each of the above embodiments, it goes without saying that two or more communication units existing in one apparatus may be physically realized by one medium.

また、上記各実施の形態における実行モジュール最適化装置は、例えば、スタンドアロンの装置であってもよいし、サーバ・クライアントシステムにおけるサーバ装置であってもよい。後者の場合には、例えば、ASP(Application Service Provider)として実行モジュールの最適化が行われてもよい。   The execution module optimizing device in each of the above embodiments may be, for example, a stand-alone device or a server device in a server / client system. In the latter case, for example, the execution module may be optimized as an ASP (Application Service Provider).

また、上記各実施の形態において、各処理または各機能は、単一の装置または単一のシステムによって集中処理されることによって実現されてもよいし、あるいは、複数の装置または複数のシステムによって分散処理されることによって実現されてもよい。   In each of the above embodiments, each process or each function may be realized by centralized processing by a single device or a single system, or distributed by a plurality of devices or a plurality of systems. It may be realized by being processed.

また、上記各実施の形態において、各構成要素は専用のハードウェアにより構成されてもよいし、あるいは、ソフトウェアにより実現可能な構成要素については、プログラムを実行することによって実現されてもよい。例えば、ハードディスクや半導体メモリ等の記録媒体に記録されたソフトウェア・プログラムをCPU等のプログラム実行部が読み出して実行することによって、各構成要素が実現され得る。   In each of the above embodiments, each component may be configured by dedicated hardware, or a component that can be realized by software may be realized by executing a program. For example, each component can be realized by a program execution unit such as a CPU reading and executing a software program recorded on a recording medium such as a hard disk or a semiconductor memory.

また、上記各実施の形態における実行モジュール最適化装置を実現するソフトウェアは、以下のようなプログラムである。つまり、このプログラムは、記録媒体に、1以上の実行モジュールと、処理の最適化が可能な箇所である最適化箇所を検出するための情報である最適化箇所検出情報と、当該最適化箇所検出情報を用いて検出された最適化箇所を変更するための情報である変更情報とを有する1以上の最適化情報とが格納されており、コンピュータを、実行モジュールを識別する実行モジュール識別子を有する指示を受け付ける受付部と、前記指示に含まれる実行モジュール識別子で識別される実行モジュールを、記録媒体から読み出し、逆アセンブルし、前記実行モジュールに対応するアセンブリプログラムを得る逆アセンブル部と、記録媒体に格納されている1以上の最適化箇所検出情報を用いて、前記アセンブリプログラムから1以上の最適化箇所を検出する最適化箇所検出部と、前記1以上の各最適化箇所に対して、各最適化箇所を検出する際に用いられた最適化箇所検出情報に対応する変更情報を記録媒体から取得し、当該変更情報を用いて前記1以上の最適化箇所を変更し、最適化されたアセンブリプログラム取得する変更部と、前記最適化されたアセンブリプログラムを実行する実行部として機能させるためのプログラムである。   The software that implements the execution module optimizing device in each of the above embodiments is the following program. In other words, this program stores, on the recording medium, one or more execution modules, optimization location detection information that is information for detecting an optimization location that is a location where processing can be optimized, and the optimization location detection. One or more pieces of optimization information having change information which is information for changing the optimization location detected using the information is stored, and an instruction having an execution module identifier for identifying the execution module A receiving unit for receiving the program, an execution module identified by the execution module identifier included in the instruction, reading from the recording medium, disassembling, and obtaining an assembly program corresponding to the execution module, and storing in the recording medium One or more optimization locations are detected from the assembly program using one or more optimization location detection information. To obtain from the recording medium change information corresponding to the optimized location detection information used when detecting each optimized location for the optimized location detection unit and the one or more optimized locations, It is a program for functioning as an execution unit for executing the optimized assembly program, and a change unit for changing the one or more optimization locations using change information and obtaining an optimized assembly program.

また、上記プログラムは、サーバなどからダウンロードされることによって実行されてもよいし、所定の記録媒体(例えば、CD−ROMなどの光ディスクや磁気ディスク、半導体メモリなど)に記録されたプログラムが読み出されることによって実行されてもよい。また、このプログラムは、プログラムプロダクトを構成するプログラムとして用いられてもよい。   The program may be executed by being downloaded from a server or the like, or a program recorded on a predetermined recording medium (for example, an optical disk such as a CD-ROM, a magnetic disk, a semiconductor memory, or the like) is read out. May be executed. Further, this program may be used as a program constituting a program product.

また、上記プログラムを実行するコンピュータは、単数であってもよいし、複数であってもよい。つまり、集中処理を行ってもよいし、あるいは分散処理を行ってもよい。   Moreover, the computer which performs the said program may be single, and plural may be sufficient as it. That is, centralized processing may be performed, or distributed processing may be performed.

また、図23は、前述のプログラムを実行して、前述の実施の形態の実行モジュール最適化装置等を実現するコンピュータシステム9の概観図である。前述の実施の形態は、コンピュータハードウェア及びその上で実行されるコンピュータプログラムで実現され得る。   FIG. 23 is an overview of the computer system 9 that executes the above-described program to realize the execution module optimizing device and the like of the above-described embodiment. The above-described embodiments can be realized by computer hardware and a computer program executed thereon.

図23において、コンピュータシステム9は、CD−ROM(Compact Disk Read Only Memory)ドライブ9011、FD(Flexible Disk)ドライブ9012を含むコンピュータ901と、キーボード902と、マウス903と、モニタ904とを備える。   In FIG. 23, the computer system 9 includes a computer 901 including a CD-ROM (Compact Disk Read Only Memory) drive 9011, an FD (Flexible Disk) drive 9012, a keyboard 902, a mouse 903, and a monitor 904.

図24は、コンピュータシステム9のブロック図である。図24において、コンピュータ901は、CD−ROMドライブ9011、FDドライブ9012に加えて、CPU(Central Processing Unit)9013と、ブートアッププログラム等のプログラムを記憶するためのROM(Read−Only Memory)9014と、CPU9013に接続され、アプリケーションプログラムの命令を一時的に記憶するとともに一時記憶空間を提供するためのRAM(Random Access Memory)9015と、アプリケーションプログラム、システムプログラム、及びデータを記憶するためのハードディスク9016と、CD−ROMドライブ9011、FDドライブ9012、CPU9013等を相互に接続するバス9017とを備える。ここでは図示しないが、コンピュータ901は、さらに、LANへの接続を提供するネットワークカードを備えていてもよい。   FIG. 24 is a block diagram of the computer system 9. 24, in addition to the CD-ROM drive 9011 and the FD drive 9012, a computer 901 includes a CPU (Central Processing Unit) 9013 and a ROM (Read-Only Memory) 9014 for storing a program such as a boot-up program. A random access memory (RAM) 9015 connected to the CPU 9013 for temporarily storing application program instructions and providing a temporary storage space; and a hard disk 9016 for storing application programs, system programs, and data , A CD-ROM drive 9011, an FD drive 9012, a CPU 9013, and the like. Although not shown here, the computer 901 may further include a network card that provides connection to a LAN.

コンピュータシステム9に、前述の実施の形態の実行モジュール最適化装置等の機能を実行させるプログラムは、CD−ROM9101、またはFD9102に記憶されて、CD−ROMドライブ9011またはFDドライブ9012に挿入され、さらにハードディスク9016に転送されてもよい。これに代えて、プログラムは、図示しないネットワークを介してコンピュータ901に送信され、ハードディスク9016に記憶されてもよい。プログラムは実行の際にRAM9015にロードされる。プログラムは、CD−ROM9101、FD9102またはネットワークから直接、ロードされてもよい。   A program that causes the computer system 9 to execute functions such as the execution module optimization device of the above-described embodiment is stored in the CD-ROM 9101 or FD 9102, inserted into the CD-ROM drive 9011 or FD drive 9012, and It may be transferred to the hard disk 9016. Alternatively, the program may be transmitted to the computer 901 via a network (not shown) and stored in the hard disk 9016. The program is loaded into the RAM 9015 when executed. The program may be loaded directly from the CD-ROM 9101, the FD 9102, or the network.

プログラムは、コンピュータ901に、前述の実施の形態の実行モジュール最適化装置等の機能を実行させるオペレーティングシステム(OS)、またはサードパーティープログラム等は、必ずしも含まなくてもよい。プログラムは、制御された態様で適切な機能(モジュール)を呼び出し、所望の結果が得られるようにする命令の部分のみを含んでいればよい。コンピュータシステム9がどのように動作するかは周知であり、詳細な説明は省略する。   The program does not necessarily include an operating system (OS), a third-party program, or the like that causes the computer 901 to execute functions such as the execution module optimization device of the above-described embodiment. The program only needs to include an instruction portion that calls an appropriate function (module) in a controlled manner and obtains a desired result. How the computer system 9 operates is well known and will not be described in detail.

本発明は、以上の実施の形態に限定されることなく、種々の変更が可能であり、それらも本発明の範囲内に包含されるものであることは言うまでもない。   The present invention is not limited to the above-described embodiments, and various modifications are possible, and it goes without saying that these are also included in the scope of the present invention.

以上のように、本発明にかかる実行モジュール最適化装置は、ソースコードを変更することなく、実行モジュールの最適化を行うことができる。という効果を有し、実行モジュール最適化装置等として有用である。   As described above, the execution module optimization apparatus according to the present invention can optimize an execution module without changing the source code. It is useful as an execution module optimizing device.

1、2 実行モジュール最適化装置
101、201 実行モジュール格納部
102、202 最適化情報格納部
103 プロファイラ格納部
104、203 受付部
105、204 逆アセンブル部
106、205 最適化箇所検出部
107、206 変更部
108 実行部
207 コンパイル部
208 蓄積部
1061 最適化箇所候補検出手段
1062 静的解析手段
1063 プロファイルプログラム生成手段
1064 動的解析手段
1065 判断手段
1066 決定手段
1, 2 Execution module optimization device 101, 201 Execution module storage unit 102, 202 Optimization information storage unit 103 Profiler storage unit 104, 203 Reception unit 105, 204 Disassembly unit 106, 205 Optimization location detection unit 107, 206 Change Unit 108 Execution unit 207 Compiling unit 208 Storage unit 1061 Optimization location candidate detection unit 1062 Static analysis unit 1063 Profile program generation unit 1064 Dynamic analysis unit 1065 Judgment unit 1066 Determination unit

Claims (14)

1以上の実行モジュールを格納し得る実行モジュール格納部と、
処理の最適化が可能な箇所である最適化箇所を検出するための情報である最適化箇所検出情報と、当該最適化箇所検出情報を用いて検出された最適化箇所を変更するための情報である変更情報とを有する1以上の最適化情報を格納し得る最適化情報格納部と、
実行モジュールを識別する実行モジュール識別子を有する指示を受け付ける受付部と、
前記指示に含まれる実行モジュール識別子で識別される実行モジュールを、前記実行モジュール格納部から読み出し、逆アセンブルし、前記実行モジュールに対応するアセンブリプログラムを得る逆アセンブル部と、
前記最適化情報格納部の1以上の最適化箇所検出情報を用いて、前記アセンブリプログラムから1以上の最適化箇所を検出する最適化箇所検出部と、
前記1以上の各最適化箇所に対して、各最適化箇所を検出する際に用いられた最適化箇所検出情報に対応する変更情報を前記最適化情報格納部から取得し、当該変更情報を用いて前記1以上の最適化箇所を変更し、最適化されたアセンブリプログラムを取得する変更部と、
前記最適化されたアセンブリプログラムを実行する実行部とを具備する実行モジュール最適化装置。
An execution module storage that can store one or more execution modules;
Optimization location detection information that is information for detecting an optimization location that is a location where processing can be optimized, and information for changing the optimization location detected using the optimization location detection information An optimization information storage unit capable of storing one or more pieces of optimization information having certain change information;
A receiving unit that receives an instruction having an execution module identifier for identifying an execution module;
A disassembly unit that reads an execution module identified by the execution module identifier included in the instruction from the execution module storage unit, disassembles the assembly module corresponding to the execution module, and
An optimization location detection unit that detects one or more optimization locations from the assembly program using one or more optimization location detection information of the optimization information storage unit;
For each of the one or more optimization locations, change information corresponding to the optimization location detection information used when detecting each optimization location is acquired from the optimization information storage unit, and the change information is used. Changing the one or more optimization locations and obtaining an optimized assembly program;
An execution module optimization apparatus comprising: an execution unit that executes the optimized assembly program.
前記最適化情報は、
前記最適化箇所検出情報と、収集すべきパラメータを示すパラメータ情報と、前記変更情報とを有し、
前記最適化箇所検出部は、
前記最適化箇所検出情報を用いて、前記アセンブリプログラムからループである1以上の最適化箇所候補を検出する最適化箇所候補検出手段と、
前記最適化箇所候補検出手段が検出した1以上の各最適化箇所候補から、予め決められたパターンに合致する情報を取得し、当該情報が予め決められた条件に合致するか否かを判断し、合致する場合に、当該情報に対応する箇所を最適化箇所候補に決定する静的解析を行う静的解析手段と、
前記静的解析手段が決定した1以上の各最適化箇所候補に対して、前記パラメータ情報が示すパラメータを収集するためのアセンブリプログラム命令列を前記最適化箇所候補の前に挿入し、プロファイルプログラムを生成するプロファイルプログラム生成手段と、
前記プロファイルプログラムを実行し、1以上のパラメータを取得する動的解析を行う動的解析手段と、
前記1以上のパラメータが、予め決められた条件に合致するか否かを判断する判断手段と、
前記1以上のパラメータが予め決められた条件に合致する場合に、前記1以上の各最適化箇所候補を最適化箇所に決定する決定手段とを具備する請求項1記載の実行モジュール最適化装置。
The optimization information is
The optimization location detection information, parameter information indicating parameters to be collected, and the change information,
The optimization location detection unit
Using the optimized location detection information, optimized location candidate detection means for detecting one or more optimized location candidates that are loops from the assembly program;
Information that matches a predetermined pattern is acquired from one or more optimization location candidates detected by the optimization location candidate detection means, and it is determined whether or not the information matches a predetermined condition. A static analysis means for performing a static analysis to determine a location corresponding to the information as an optimization location candidate when they match,
For each one or more optimization location candidates determined by the static analysis means, an assembly program instruction sequence for collecting parameters indicated by the parameter information is inserted before the optimization location candidates, and a profile program is Profile program generating means for generating;
Dynamic analysis means for executing dynamic analysis for executing the profile program and acquiring one or more parameters;
Determination means for determining whether the one or more parameters meet a predetermined condition;
The execution module optimizing device according to claim 1, further comprising: a determining unit that determines each of the one or more optimization location candidates as an optimization location when the one or more parameters meet a predetermined condition.
前記プロファイルプログラム生成手段は、
前記1以上の各最適化箇所候補を複写し、前記複写した1以上の各最適化箇所候補の直前にパラメータ情報が示すパラメータを収集するためのアセンブリプログラム命令列を挿入し、前記1以上の元の各最適化箇所候補の直前に、前記挿入したアセンブリプログラム命令列の直前にジャンプするアセンブリプログラム命令を挿入する請求項2記載の実行モジュール最適化装置。
The profile program generation means includes
Each of the one or more optimization location candidates is copied, an assembly program instruction sequence for collecting parameters indicated by parameter information is inserted immediately before each of the one or more optimization location candidates copied, and the one or more elements 3. The execution module optimizing apparatus according to claim 2, wherein an assembly program instruction that jumps immediately before the inserted assembly program instruction sequence is inserted immediately before each optimization location candidate.
前記アセンブリプログラムを実行し、各命令の負荷を取得するプロファイラを格納し得るプロファイラ格納部をさらに具備し、
前記最適化箇所候補検出手段は、
前記最適化箇所検出情報を用いて、前記アセンブリプログラムから1以上のループを検出し、前記アセンブリプログラムに対して前記プロファイラを実行し、各命令の負荷を取得し、当該負荷が閾値を超える命令を有するループを1以上の最適化箇所候補として検出する請求項2または請求項3記載の実行モジュール最適化装置。
A profiler storage unit that can store a profiler that executes the assembly program and obtains the load of each instruction;
The optimized location candidate detection means includes:
Using the optimization location detection information, one or more loops are detected from the assembly program, the profiler is executed on the assembly program, the load of each instruction is acquired, and an instruction whose load exceeds a threshold is detected. 4. The execution module optimizing device according to claim 2, wherein a loop having the same is detected as one or more optimization location candidates.
前記最適化箇所候補検出手段は、
前記最適化箇所検出情報を用いて、前記アセンブリプログラムから1以上のループを検出し、前記アセンブリプログラムから、当該アセンブリプログラムを構成する各命令をノードとする2以上のノードを有する制御フローグラフを作成し、当該制御フローグラフから、任意の1つのノードが起点となるループであって、当該起点となるノードに戻る直前のノードと起点となるノードとが支配関係にあるループである支配ループである1以上の最適化箇所候補を検出する請求項2から請求項4いずれか記載の実行モジュール最適化装置。
The optimized location candidate detection means includes:
Using the optimization location detection information, one or more loops are detected from the assembly program, and a control flow graph having two or more nodes having each instruction constituting the assembly program as a node is created from the assembly program. Then, from the control flow graph, it is a loop starting from any one node, and is a controlling loop in which the node just before returning to the starting node and the starting node are in a controlling relationship. The execution module optimization apparatus according to claim 2, wherein one or more optimization location candidates are detected.
前記パラメータ情報は、ループ回数と、ポインタがオーバーラップするか否かを示す情報であり、
前記静的解析手段は、
前記最適化箇所候補検出手段が検出した1以上の各最適化箇所候補に対して、ループ不変値と、配列にアクセスするための誘導変数とを取得し、取得したループ不変値と誘導変数とを用いて、当該最適化箇所候補において配列に対するメモリストアが行われているか否かを判断し、行われている場合に、当該箇所を最適化箇所候補に決定する静的解析を行い、
前記判断手段は、
前記動的解析手段が取得したループ回数が閾値以上であり、かつポインタがオーバーラップするか否かを示す情報が、ポインタがオーバーラップしないことを示す情報であるか否かを判断し、
前記決定手段は、
前記判断手段が、ループ回数が閾値以上であり、かつポインタがオーバーラップするか否かを示す情報が、ポインタがオーバーラップしないことを示す情報であると判断した最適化箇所候補を、最適化箇所に決定し、
前記変更部は、
前記判断手段が最適化箇所に決定した最適化箇所に対して、複数のプロセッサにおいて並列に実行できるアセンブリプログラム命令列に変更するマルチコア並列化を施す請求項2から請求項5記載の実行モジュール最適化装置。
The parameter information is information indicating the number of loops and whether or not the pointers overlap.
The static analysis means includes
For each of one or more optimization location candidates detected by the optimization location candidate detection means, a loop invariant value and an induction variable for accessing the array are obtained, and the obtained loop invariance value and the induction variable are obtained. Using, determining whether or not a memory store for the sequence is performed in the optimization location candidate, and if so, perform a static analysis to determine the location as an optimization location candidate,
The determination means includes
Determining whether the number of loops acquired by the dynamic analysis means is equal to or greater than a threshold and whether or not the pointers overlap is information indicating that the pointers do not overlap;
The determining means includes
The optimization part candidate determined that the information indicating whether the number of loops is equal to or greater than the threshold and whether the pointers overlap is information indicating that the pointers do not overlap is determined as the optimization part. Decided on
The changing unit is
6. The execution module optimization according to claim 2, wherein the optimization part determined as the optimization part by the determining means is subjected to multi-core parallelization for changing to an assembly program instruction sequence that can be executed in parallel by a plurality of processors. apparatus.
前記パラメータ情報は、ループ回数と、ポインタがオーバーラップするか否かを示す情報であり、
前記静的解析手段は、
前記最適化箇所候補検出手段が検出した1以上の各最適化箇所候補に対して、変数名を取得し、取得した変数名を用いて、当該最適化箇所候補において変数間の依存関係が存在するか否かを判断し、存在しない場合に、当該箇所を最適化箇所候補に決定する静的解析を行い、
前記判断手段は、
前記動的解析手段が取得したループ回数が閾値以上であり、かつポインタがオーバーラップするか否かを示す情報が、ポインタがオーバーラップしないことを示す情報であるか否かを判断し、
前記決定手段は、
前記判断手段が、ループ回数が閾値以上であり、かつポインタがオーバーラップするか否かを示す情報が、ポインタがオーバーラップしないことを示す情報であると判断した最適化箇所候補を、最適化箇所に決定し、
前記変更部は、
前記判断手段が最適化箇所に決定した最適化箇所に対して、1の命令で複数データに対する処理を同時に行うことができるアセンブリプログラム命令に変更するSIMD化を施す請求項2から請求項5記載の実行モジュール最適化装置。
The parameter information is information indicating the number of loops and whether or not the pointers overlap.
The static analysis means includes
A variable name is acquired for each of one or more optimization location candidates detected by the optimization location candidate detection means, and there is a dependency between variables in the optimization location candidate using the acquired variable name. If it does not exist, perform static analysis to determine the location as an optimization location candidate,
The determination means includes
Determining whether the number of loops acquired by the dynamic analysis means is equal to or greater than a threshold and whether or not the pointers overlap is information indicating that the pointers do not overlap;
The determining means includes
The optimization part candidate determined that the information indicating whether the number of loops is equal to or greater than the threshold and whether the pointers overlap is information indicating that the pointers do not overlap is determined as the optimization part. Decided on
The changing unit is
6. The method according to claim 2, wherein the optimization part determined as the optimization part by the determination unit is subjected to SIMD conversion to an assembly program instruction that can simultaneously process a plurality of data with one instruction. Execution module optimization device.
前記最適化箇所検出情報は、
1の処理を行う関数名であり、
前記変更情報は、
前記1の処理を行い、前記最適化箇所検出情報が示す関数よりも高速に処理を行う関数名であり、
前記変更部は、
前記1以上の最適化箇所を、各最適化箇所を検出する際に用いられた最適化箇所検出情報に対応する変更情報に変更し、最適化されたアセンブリプログラムを取得する請求項1記載の実行モジュール最適化装置。
The optimized location detection information is
Is the name of the function that performs the processing of 1.
The change information is
A function name that performs the process 1 and performs the process at a higher speed than the function indicated by the optimization location detection information,
The changing unit is
2. The execution according to claim 1, wherein the one or more optimized locations are changed to change information corresponding to the optimized location detection information used when detecting each optimized location, and an optimized assembly program is acquired. Module optimization device.
1以上の実行モジュールを格納し得る実行モジュール格納部と、
処理の最適化が可能な箇所である最適化箇所を検出するための情報である最適化箇所検出情報と、当該最適化箇所検出情報を用いて検出された最適化箇所を変更するための情報である変更情報とを有する1以上の最適化情報を格納し得る最適化情報格納部と、
実行モジュールを識別する実行モジュール識別子を有する指示を受け付ける受付部と、
前記指示に含まれる実行モジュール識別子で識別される実行モジュールを、前記実行モジュール格納部から読み出し、逆アセンブルし、前記実行モジュールに対応するアセンブリプログラムを得る逆アセンブル部と、
前記最適化情報格納部の1以上の最適化箇所検出情報を用いて、前記アセンブリプログラムから1以上の最適化箇所を検出する最適化箇所検出部と、
前記1以上の各最適化箇所に対して、各最適化箇所を検出する際に用いられた最適化箇所検出情報に対応する変更情報を前記最適化情報格納部から取得し、当該変更情報を用いて前記1以上の最適化箇所を変更し、最適化されたアセンブリプログラムを取得する変更部と、
前記最適化されたアセンブリプログラムを蓄積する蓄積部とを具備する実行モジュール最適化装置。
An execution module storage that can store one or more execution modules;
Optimization location detection information that is information for detecting an optimization location that is a location where processing can be optimized, and information for changing the optimization location detected using the optimization location detection information An optimization information storage unit capable of storing one or more pieces of optimization information having certain change information;
A receiving unit that receives an instruction having an execution module identifier for identifying an execution module;
A disassembly unit that reads an execution module identified by the execution module identifier included in the instruction from the execution module storage unit, disassembles the assembly module corresponding to the execution module, and
An optimization location detection unit that detects one or more optimization locations from the assembly program using one or more optimization location detection information of the optimization information storage unit;
For each of the one or more optimization locations, change information corresponding to the optimization location detection information used when detecting each optimization location is acquired from the optimization information storage unit, and the change information is used. Changing the one or more optimization locations and obtaining an optimized assembly program;
An execution module optimizing device comprising: an accumulator that accumulates the optimized assembly program.
前記最適化されたアセンブリプログラムをコンパイルし、最適化された実行モジュールを取得するコンパイル部をさらに具備し、
前記蓄積部は、
前記最適化された実行モジュールをも蓄積する請求項9記載の実行モジュール最適化装置。
A compiling unit that compiles the optimized assembly program and obtains an optimized execution module;
The storage unit
The execution module optimization apparatus according to claim 9, wherein the optimized execution module is also accumulated.
記録媒体に、
1以上の実行モジュールと、
処理の最適化が可能な箇所である最適化箇所を検出するための情報である最適化箇所検出情報と、当該最適化箇所検出情報を用いて検出された最適化箇所を変更するための情報である変更情報とを有する1以上の最適化情報とが格納されており、
受付部と、逆アセンブル部と、最適化箇所検出部と、変更部と、実行部とを用いて行われる実行モジュール最適化方法であって、
前記受付部が、実行モジュールを識別する実行モジュール識別子を有する指示を受け付ける受付ステップと、
前記逆アセンブル部が、前記指示に含まれる実行モジュール識別子で識別される実行モジュールを、記録媒体から読み出し、逆アセンブルし、前記実行モジュールに対応するアセンブリプログラムを得る逆アセンブルステップと、
前記最適化箇所検出部が、記録媒体に格納されている1以上の最適化箇所検出情報を用いて、前記アセンブリプログラムから1以上の最適化箇所を検出する最適化箇所検出ステップと、
前記変更部が、前記1以上の各最適化箇所に対して、各最適化箇所を検出する際に用いられた最適化箇所検出情報に対応する変更情報を記録媒体から取得し、当該変更情報を用いて前記1以上の最適化箇所を変更し、最適化されたアセンブリプログラムを取得する変更ステップと、
前記実行部が、前記最適化されたアセンブリプログラムを実行する実行ステップとを具備する実行モジュール最適化方法。
On the recording medium,
One or more execution modules;
Optimization location detection information that is information for detecting an optimization location that is a location where processing can be optimized, and information for changing the optimization location detected using the optimization location detection information One or more pieces of optimization information having certain change information are stored,
An execution module optimization method performed using a reception unit, a disassembly unit, an optimization location detection unit, a change unit, and an execution unit,
A receiving step in which the receiving unit receives an instruction having an execution module identifier for identifying an execution module;
A disassembly step in which the disassembly unit reads an execution module identified by an execution module identifier included in the instruction from a recording medium, disassembles, and obtains an assembly program corresponding to the execution module;
An optimization location detection step in which the optimization location detection unit detects one or more optimization locations from the assembly program using one or more optimization location detection information stored in a recording medium;
The change unit acquires, from the recording medium, change information corresponding to the optimization location detection information used when detecting each optimization location for each of the one or more optimization locations, and A changing step of using the one or more optimization locations to change and obtaining an optimized assembly program;
An execution module optimization method, wherein the execution unit includes an execution step of executing the optimized assembly program.
記録媒体に、
1以上の実行モジュールと、
処理の最適化が可能な箇所である最適化箇所を検出するための情報である最適化箇所検出情報と、当該最適化箇所検出情報を用いて検出された最適化箇所を変更するための情報である変更情報とを有する1以上の最適化情報とが格納されており、
コンピュータを、
実行モジュールを識別する実行モジュール識別子を有する指示を受け付ける受付部と、
前記指示に含まれる実行モジュール識別子で識別される実行モジュールを、記録媒体から読み出し、逆アセンブルし、前記実行モジュールに対応するアセンブリプログラムを得る逆アセンブル部と、
記録媒体に格納されている1以上の最適化箇所検出情報を用いて、前記アセンブリプログラムから1以上の最適化箇所を検出する最適化箇所検出部と、
前記1以上の各最適化箇所に対して、各最適化箇所を検出する際に用いられた最適化箇所検出情報に対応する変更情報を記録媒体から取得し、当該変更情報を用いて前記1以上の最適化箇所を変更し、最適化されたアセンブリプログラムを取得する変更部と、
前記最適化されたアセンブリプログラムを実行する実行部として機能させるためのプログラム。
On the recording medium,
One or more execution modules;
Optimization location detection information that is information for detecting an optimization location that is a location where processing can be optimized, and information for changing the optimization location detected using the optimization location detection information One or more pieces of optimization information having certain change information are stored,
Computer
A receiving unit that receives an instruction having an execution module identifier for identifying an execution module;
A disassembly unit that reads an execution module identified by the execution module identifier included in the instruction from a recording medium, disassembles the assembly module, and obtains an assembly program corresponding to the execution module;
An optimization location detection unit that detects one or more optimization locations from the assembly program using one or more optimization location detection information stored in a recording medium;
For each of the one or more optimized locations, change information corresponding to the optimized location detection information used when detecting each optimized location is acquired from a recording medium, and the change information is used to obtain the one or more optimized locations. A change unit that changes the optimization part of, and obtains an optimized assembly program;
A program for functioning as an execution unit for executing the optimized assembly program.
記録媒体に、
1以上の実行モジュールと、
処理の最適化が可能な箇所である最適化箇所を検出するための情報である最適化箇所検出情報と、当該最適化箇所検出情報を用いて検出された最適化箇所を変更するための情報である変更情報とを有する1以上の最適化情報とが格納されており、
受付部と、逆アセンブル部と、最適化箇所検出部と、変更部と、蓄積部とを用いて行われる実行モジュール最適化方法であって、
前記受付部が、実行モジュールを識別する実行モジュール識別子を有する指示を受け付ける受付ステップと、
前記逆アセンブル部が、前記指示に含まれる実行モジュール識別子で識別される実行モジュールを、記録媒体から読み出し、逆アセンブルし、前記実行モジュールに対応するアセンブリプログラムを得る逆アセンブルステップと、
前記最適化箇所検出部が、記録媒体に格納されている1以上の最適化箇所検出情報を用いて、前記アセンブリプログラムから1以上の最適化箇所を検出する最適化箇所検出ステップと、
前記変更部が、前記1以上の各最適化箇所に対して、各最適化箇所を検出する際に用いられた最適化箇所検出情報に対応する変更情報を記録媒体から取得し、当該変更情報を用いて前記1以上の最適化箇所を変更し、最適化されたアセンブリプログラムを取得する変更ステップと、
前記蓄積部が、前記最適化されたアセンブリプログラムを蓄積する蓄積ステップとを具備する実行モジュール最適化方法。
On the recording medium,
One or more execution modules;
Optimization location detection information that is information for detecting an optimization location that is a location where processing can be optimized, and information for changing the optimization location detected using the optimization location detection information One or more pieces of optimization information having certain change information are stored,
An execution module optimization method performed using a reception unit, a disassembly unit, an optimization location detection unit, a change unit, and a storage unit,
A receiving step in which the receiving unit receives an instruction having an execution module identifier for identifying an execution module;
A disassembly step in which the disassembly unit reads an execution module identified by an execution module identifier included in the instruction from a recording medium, disassembles, and obtains an assembly program corresponding to the execution module;
An optimization location detection step in which the optimization location detection unit detects one or more optimization locations from the assembly program using one or more optimization location detection information stored in a recording medium;
The change unit acquires, from the recording medium, change information corresponding to the optimization location detection information used when detecting each optimization location for each of the one or more optimization locations, and A changing step of using the one or more optimization locations to change and obtaining an optimized assembly program;
An execution module optimizing method, wherein the accumulating unit comprises an accumulating step for accumulating the optimized assembly program.
記録媒体に、
1以上の実行モジュールと、
処理の最適化が可能な箇所である最適化箇所を検出するための情報である最適化箇所検出情報と、当該最適化箇所検出情報を用いて検出された最適化箇所を変更するための情報である変更情報とを有する1以上の最適化情報とが格納されており、
コンピュータを、
実行モジュールを識別する実行モジュール識別子を有する指示を受け付ける受付部と、
前記指示に含まれる実行モジュール識別子で識別される実行モジュールを、記録媒体から読み出し、逆アセンブルし、前記実行モジュールに対応するアセンブリプログラムを得る逆アセンブル部と、
記録媒体に格納されている1以上の最適化箇所検出情報を用いて、前記アセンブリプログラムから1以上の最適化箇所を検出する最適化箇所検出部と、
前記1以上の各最適化箇所に対して、各最適化箇所を検出する際に用いられた最適化箇所検出情報に対応する変更情報を記録媒体から取得し、当該変更情報を用いて前記1以上の最適化箇所を変更し、最適化されたアセンブリプログラムを取得する変更部と、
前記最適化されたアセンブリプログラムを蓄積する蓄積部として機能させるためのプログラム。
On the recording medium,
One or more execution modules;
Optimization location detection information that is information for detecting an optimization location that is a location where processing can be optimized, and information for changing the optimization location detected using the optimization location detection information One or more pieces of optimization information having certain change information are stored,
Computer
A receiving unit that receives an instruction having an execution module identifier for identifying an execution module;
A disassembly unit that reads an execution module identified by the execution module identifier included in the instruction from a recording medium, disassembles the assembly module, and obtains an assembly program corresponding to the execution module;
An optimization location detection unit that detects one or more optimization locations from the assembly program using one or more optimization location detection information stored in a recording medium;
For each of the one or more optimized locations, change information corresponding to the optimized location detection information used when detecting each optimized location is acquired from a recording medium, and the change information is used to obtain the one or more optimized locations. A change unit that changes the optimization part of, and obtains an optimized assembly program;
A program for functioning as a storage unit for storing the optimized assembly program.
JP2010203616A 2010-09-10 2010-09-10 Execution module optimization device, execution module optimization method and program Pending JP2013242604A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2010203616A JP2013242604A (en) 2010-09-10 2010-09-10 Execution module optimization device, execution module optimization method and program
PCT/JP2011/059387 WO2012032807A1 (en) 2010-09-10 2011-04-15 Execution module optimization device, execution module optimization method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010203616A JP2013242604A (en) 2010-09-10 2010-09-10 Execution module optimization device, execution module optimization method and program

Publications (1)

Publication Number Publication Date
JP2013242604A true JP2013242604A (en) 2013-12-05

Family

ID=45810414

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010203616A Pending JP2013242604A (en) 2010-09-10 2010-09-10 Execution module optimization device, execution module optimization method and program

Country Status (2)

Country Link
JP (1) JP2013242604A (en)
WO (1) WO2012032807A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10025368B2 (en) 2015-08-05 2018-07-17 Fujitsu Limited Computation apparatus and frequency determination method
WO2020250843A1 (en) * 2019-06-12 2020-12-17 株式会社Preferred Networks Hyperparameter tuning method, program testing system, and computer program
JP2021047480A (en) * 2019-09-17 2021-03-25 富士通株式会社 Information processing method and optimization program
US11734003B2 (en) 2021-05-28 2023-08-22 Fujitsu Limited Non-transitory computer-readable recording medium, compilation method, and compiler device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001273138A (en) * 2000-03-24 2001-10-05 Fujitsu Ltd Device and method for converting program
JP2008276735A (en) * 2007-04-03 2008-11-13 Toshiba Corp Program code converter and program code conversion method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10025368B2 (en) 2015-08-05 2018-07-17 Fujitsu Limited Computation apparatus and frequency determination method
WO2020250843A1 (en) * 2019-06-12 2020-12-17 株式会社Preferred Networks Hyperparameter tuning method, program testing system, and computer program
JPWO2020250843A1 (en) * 2019-06-12 2020-12-17
JP7303299B2 (en) 2019-06-12 2023-07-04 株式会社Preferred Networks HYPER PARAMETER TUNING METHOD, PROGRAM TRIAL SYSTEM AND COMPUTER PROGRAM
JP2021047480A (en) * 2019-09-17 2021-03-25 富士通株式会社 Information processing method and optimization program
JP7263994B2 (en) 2019-09-17 2023-04-25 富士通株式会社 Information processing method and optimization program
US11734003B2 (en) 2021-05-28 2023-08-22 Fujitsu Limited Non-transitory computer-readable recording medium, compilation method, and compiler device

Also Published As

Publication number Publication date
WO2012032807A1 (en) 2012-03-15

Similar Documents

Publication Publication Date Title
Knüpfer et al. Score-p: A joint performance measurement run-time infrastructure for periscope, scalasca, tau, and vampir
US20130080993A1 (en) Embedded system performance
EP3365772B1 (en) Missing include suggestions for external files
CN101964036B (en) Leak detection method and device
US11675575B2 (en) Checking source code validity at time of code update
Lord The semantic web takes wing: Programming ontologies with Tawny-OWL
CN106471476A (en) For to optimized code edit and continue and enhanced optimized debugging technology
JP6695437B2 (en) Management computer and test environment determination method
KR100537258B1 (en) Debug aid device, program compiler device, storage medium storing computer-readable debugger program and storage medium storing program compiler program
KR102013582B1 (en) Apparatus and method for detecting error and determining corresponding position in source code of mixed mode application program source code thereof
JP2006350686A (en) Instruction set simulator generation device and simulator generation method
JP2007293383A (en) Program development support device and method for operating same device
Sadek et al. Supporting utilities for heterogeneous embedded image processing platforms (STHEM): An overview
Zhu et al. Determining image base of firmware files for ARM devices
WO2012032807A1 (en) Execution module optimization device, execution module optimization method, and program
JP2008276735A (en) Program code converter and program code conversion method
CN112711427A (en) Method and device for acquiring mirror image file
JP4870956B2 (en) Embedded program generation method, embedded program development system, and information table section
US11947966B2 (en) Identifying computer instructions enclosed by macros and conflicting macros at build time
WO2019136014A1 (en) Reduced instructions to generate global variable addresses
JP7410269B2 (en) Automated verification of high-level construct optimization using test vectors
Linford et al. Performance analysis of openshmem applications with tau commander
Brendel et al. Generic library interception for improved performance measurement and insight
CN107562430B (en) Compiling method for file processing function of mobile pi-calculus language
JP2014099108A (en) Execution time calculating device, execution time calculating method, and program