JP2011039858A - Data processing device, data processing method, program analysis processing device, and program analysis processing method - Google Patents

Data processing device, data processing method, program analysis processing device, and program analysis processing method Download PDF

Info

Publication number
JP2011039858A
JP2011039858A JP2009187624A JP2009187624A JP2011039858A JP 2011039858 A JP2011039858 A JP 2011039858A JP 2009187624 A JP2009187624 A JP 2009187624A JP 2009187624 A JP2009187624 A JP 2009187624A JP 2011039858 A JP2011039858 A JP 2011039858A
Authority
JP
Japan
Prior art keywords
input value
instruction
execution
unit
value setting
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.)
Abandoned
Application number
JP2009187624A
Other languages
Japanese (ja)
Inventor
Motofumi Kashiwatani
元史 柏谷
Mutsuhiro Omori
睦弘 大森
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2009187624A priority Critical patent/JP2011039858A/en
Priority to KR1020127003143A priority patent/KR20120068824A/en
Priority to TW099126111A priority patent/TW201124910A/en
Priority to US13/389,134 priority patent/US20120185859A1/en
Priority to CN2010800349313A priority patent/CN102667715A/en
Priority to PCT/JP2010/063246 priority patent/WO2011018974A1/en
Priority to EP10808157A priority patent/EP2466453A1/en
Publication of JP2011039858A publication Critical patent/JP2011039858A/en
Abandoned legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To shorten a processing time of a reuse section by reuse of an execution result. <P>SOLUTION: A history memory 430 holds an input value of a function and its execution result for each section identification information of the function. An input value setting instruction address table 520 holds an address of an input value setting instruction executed before a function call instruction for each of section identification information of the function. An address determination unit 510, when an instruction address from a program counter 350 matches an instruction address in the input value setting instruction address table 520, outputs section identification information corresponding to the instruction address to an execution data holding unit 440. At the same time, the address determination unit 510 makes the execution data holding unit 440 hold an input value output from an execution unit 330. An execution history retrieval unit 410 retrieves an execution result in the history memory 430 based on the section identification information in the execution data holding unit 440 and the input value. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、データ処理装置に関し、特に複数回実行される命令区間の実行結果を再利用するデータ処理装置およびその処理方法、ならびに、このデータ処理装置に対応するプログラムに変換するデータ変換処理装置およびその処理方法に関する。   The present invention relates to a data processing apparatus, and in particular, a data processing apparatus that reuses an execution result of an instruction section that is executed a plurality of times, a processing method thereof, a data conversion processing apparatus that converts a program corresponding to the data processing apparatus, and It relates to the processing method.

従来からCPU(Central Processing Unit)などのマイクロプロセッサにおいて、演算処理の高速化技術に関する研究開発が盛んに行われている。この演算処理の高速化技術として、値再利用技術という手法が考案されている。例えば、この値再利用技術をループの命令区間に適用したデータ処理装置が提案されている(例えば、特許文献1参照。)。   2. Description of the Related Art Conventionally, research and development relating to high-speed computing processing technology has been actively performed in microprocessors such as a CPU (Central Processing Unit). As a technique for speeding up this arithmetic processing, a technique called value reuse technique has been devised. For example, a data processing apparatus in which this value reuse technique is applied to an instruction section of a loop has been proposed (for example, see Patent Document 1).

この値再利用技術では、プログラムの一部分である命令区間のうち、その命令区間における入力値が同じであれば実行結果も同一となる命令区間における入力値と、その実行結果である出力値とを関連付けて再利用表に登録する。そして、同じ命令区間を再度実行する場合に、同一の入力値が再利用表に登録されていれば、その入力値に対応する出力値を再利用表から出力することによって、過去に実行された命令区間の実行結果を再利用する。このように、複数回実行される命令区間のうち、過去に実行された命令区間の実行結果を再利用することができる命令区間をここでは再利用区間という。   In this value reuse technique, among the instruction sections that are part of the program, if the input value in the instruction section is the same, the input value in the instruction section that has the same execution result and the output value that is the execution result are Register in the reuse table in association. And when the same instruction interval is executed again, if the same input value is registered in the reuse table, it was executed in the past by outputting the output value corresponding to the input value from the reuse table. Reuse the execution result of the instruction section. As described above, an instruction interval in which an execution result of an instruction interval executed in the past among the instruction intervals executed a plurality of times can be reused is referred to as a reuse interval.

特許第3855076号公報(図1)Japanese Patent No. 3855076 (FIG. 1)

上述の従来技術では、再利用区間における処理が再度実行されたときに、その再利用区間の入力値が再利用表に登録されていれば、その再利用区間の処理を省略することができるため、再利用区間の実行に要する実行時間を短縮することができる。しかしながら、この場合、再利用区間の呼出し命令の実行後において入力値を参照する命令が実行されるまでは、その再利用区間の入力値が再利用表に登録されているか否かの判断を行うことができない。このように、入力値が使用されるまで再利用表の検索を行うことができないことから、実行結果の再利用によって短縮することができる期間が制限されてしまう。   In the above-described conventional technology, when the process in the reuse section is executed again, if the input value of the reuse section is registered in the reuse table, the process in the reuse section can be omitted. Therefore, it is possible to reduce the execution time required for executing the reuse section. However, in this case, it is determined whether or not the input value of the reuse section is registered in the reuse table until the instruction that refers to the input value is executed after the execution of the call instruction of the reuse section. I can't. Thus, since the reuse table cannot be searched until the input value is used, the period that can be shortened by reusing the execution result is limited.

本発明はこのような状況に鑑みてなされたものであり、実行結果の再利用による再利用区間の処理時間を短縮させることを目的とする。   The present invention has been made in view of such a situation, and an object thereof is to shorten the processing time of a reuse section by reusing an execution result.

本発明は、上記課題を解決するためになされたものであり、その第1の側面は、複数の命令区間が含まれる命令列に基づく処理を実行部と、上記命令区間を呼び出すための呼出し命令が実行される前に上記命令区間の入力値を設定するための入力値設定命令のアドレスである入力値設定命令アドレスを上記命令区間の区間識別情報ごとに保持する入力値設定命令アドレステーブルと、上記区間識別情報ごとに上記命令区間における入力値および実行結果を関連付けて実行履歴として保持する履歴メモリと、上記入力値設定命令アドレスにより特定された上記入力値設定命令から上記呼出し命令までの命令群のうちの上記入力値設定命令に基づいて上記実行部から出力された入力値と上記入力値設定命令アドレスに対応する上記区間識別情報とを用いて上記実行履歴における上記実行結果を検索する実行履歴検索部と、上記入力値設定命令アドレスによって特定される上記呼出し命令が実行されるときに上記実行履歴検索部により上記実行結果が抽出された場合には上記抽出された実行結果を上記実行部に出力する実行結果出力部とを具備するデータ処理装置およびその処理方法である。これにより、命令区間の実行前までに、入力値設定命令アドレステーブルにおける入力値設定命令アドレスにより特定された入力値設定命令に基づく入力値と、その入力値設定命令アドレスに関連付けられた区間識別情報とを用いて履歴メモリにおける実行結果を検索し、入力値設定命令アドレスによって特定される呼出し命令が実行されるときに、実行履歴検索部により実行結果が抽出された場合には、その実行結果を実行部に出力させるという作用をもたらす。   The present invention has been made to solve the above-mentioned problems, and a first aspect of the present invention is to execute a process based on an instruction sequence including a plurality of instruction sections and a call instruction for calling the instruction sections. An input value setting instruction address table that holds an input value setting instruction address that is an address of an input value setting instruction for setting an input value of the instruction section before the execution is executed for each section identification information of the instruction section; A history memory that associates an input value and an execution result in the instruction section for each section identification information and holds them as an execution history, and an instruction group from the input value setting instruction to the call instruction specified by the input value setting instruction address And the section identification information corresponding to the input value setting command address, and the input value output from the execution unit based on the input value setting command The execution history search unit that searches for the execution result in the execution history and the execution result is extracted by the execution history search unit when the call instruction specified by the input value setting instruction address is executed. In some cases, the data processing apparatus includes an execution result output unit that outputs the extracted execution result to the execution unit, and a processing method thereof. Thus, before the execution of the instruction section, the input value based on the input value setting instruction specified by the input value setting instruction address in the input value setting instruction address table and the section identification information associated with the input value setting instruction address When the execution result is extracted by the execution history search unit when the call instruction specified by the input value setting instruction address is executed, the execution result is extracted. This brings about the effect that the execution unit outputs.

また、この第1の側面において、上記入力値設定命令アドレステーブルは、上記複数の命令区間のうち複数回実行される命令区間である再利用区間の入力値を設定するための上記入力値設定命令の上記入力値設定命令アドレスを上記再利用区間の上記区間識別情報ごとに保持し、実行履歴検索部は、上記再利用区間における上記命令群のうちの上記入力値設定命令に基づいて上記実行部から出力された上記入力値と上記入力値設定命令アドレスに対応する上記区間識別情報とを用いて上記再利用区間における上記実行結果を検索し、実行結果出力部は、上記入力値設定命令アドレスによって特定される上記再利用区間の上記呼出し命令が実行されるときに上記実行履歴検索部により上記実行履歴における上記再利用区間の上記実行結果が抽出された場合には上記抽出された実行結果を上記実行部に出力するようにしてもよい。これにより、複数回実行される命令区間である再利用区間の呼出し命令の実行前までに、入力値設定命令アドレスにより特定される入力値設定命令により取得される入力値と、その入力値設定命令アドレスに対応する区間識別情報とを用いて履歴メモリにおける実行結果を検索し、入力値設定命令アドレスによって特定される再利用区間の呼出し命令が実行されるときに、実行履歴検索部により実行結果が抽出された場合には、その実行結果を実行部に出力させるという作用をもたらす。   In the first aspect, the input value setting instruction address table is configured to set the input value setting instruction for setting an input value of a reuse section which is an instruction section executed a plurality of times among the plurality of instruction sections. The input value setting instruction address of each of the reuse sections is held for each section identification information, and the execution history search unit is configured to execute the execution unit based on the input value setting instruction in the instruction group in the reuse section. The execution result in the reuse section is searched using the input value output from the section and the section identification information corresponding to the input value setting instruction address, and the execution result output section uses the input value setting instruction address. When the calling instruction of the specified reuse section is executed, the execution history search unit extracts the execution result of the reuse section in the execution history. The execution result of the extracted may be output to the execution unit if it is. As a result, the input value acquired by the input value setting instruction specified by the input value setting instruction address and the input value setting instruction before execution of the calling instruction of the reuse section that is an instruction section that is executed a plurality of times When the execution result in the history memory is searched using the section identification information corresponding to the address, and the calling instruction of the reuse section specified by the input value setting instruction address is executed, the execution result is obtained by the execution history search unit. When extracted, the execution result is output to the execution unit.

また、この第1の側面において、上記入力値設定命令に基づいて設定された入力値のうち上記呼出し命令により呼び出された上記命令区間において参照された入力値に対応する上記入力値設定命令アドレスと上記区間識別情報とを上記入力値設定命令アドレステーブルに出力する入力値設定命令アドレス出力部をさらに具備するようにしてもよい。これにより、入力値設定命令アドレス出力部により、呼出し命令前までの入力値設定命令により設定された入力値のうち、その呼出し命令の命令区間において参照された入力値が設定された入力値設定命令の入力値設定命令アドレスと区間識別情報とを出力させるという作用をもたらす。この場合において、上記入力値設定命令アドレス出力部は、上記命令区間において参照された複数の入力値に対応する上記入力値設定命令のうち最先の上記入力値設定命令の上記入力値設定命令アドレスと上記区間識別情報である上記命令区間の先頭アドレスとを出力するようにしてもよい。これにより、入力値設定命令アドレス出力部により、関数の命令区間において参照された複数の入力値を設定する入力値設定命令のうち、最先の入力値設定命令の入力値設定命令アドレスとその命令区間の先頭アドレスとを出力させるという作用をもたらす。   In the first aspect, the input value setting instruction address corresponding to the input value referred to in the instruction section called by the calling instruction among the input values set based on the input value setting instruction; You may make it further comprise the input value setting command address output part which outputs the said area identification information to the said input value setting command address table. As a result, the input value setting instruction address output unit sets the input value referenced by the instruction section of the calling instruction among the input values set by the input value setting instruction before the calling instruction. The input value setting command address and the section identification information are output. In this case, the input value setting instruction address output unit outputs the input value setting instruction address of the first input value setting instruction among the input value setting instructions corresponding to the plurality of input values referred to in the instruction section. And the start address of the command section, which is the section identification information, may be output. As a result, the input value setting instruction address of the earliest input value setting instruction and its instruction among the input value setting instructions for setting a plurality of input values referenced in the instruction section of the function by the input value setting instruction address output unit This produces the effect of outputting the start address of the section.

また、この第1の側面において、上記入力値設定命令アドレステーブルは、上記命令区間における複数の入力値を設定するための入力値設定命令のうち最先の上記入力値設定命令の上記入力値設定命令アドレスを上記区間識別情報ごとに保持するようにしてもよい。これにより、入力値設定命令アドレステーブルにより、命令区間における複数の入力値設定命令のうち、最先に実行された入力値設定命令の入力値設定命令アドレスを、区間識別情報ごとに保持させるという作用をもたらす。   In the first aspect, the input value setting command address table includes the input value setting command of the earliest input value setting command among the input value setting commands for setting a plurality of input values in the command section. An instruction address may be held for each section identification information. Thereby, the input value setting command address table holds the input value setting command address of the input value setting command executed first among the plurality of input value setting commands in the command interval for each section identification information. Bring.

また、この第1の側面において、上記実行部は、上記実行履歴検索部により上記実行履歴における上記実行結果が上記履歴メモリから抽出されない場合には上記入力値設定命令アドレスによって特定された上記命令区間における処理を実行し、上記実行履歴検索部は、上記入力値設定命令に基づいて上記実行部から出力された入力値と上記実行部により実行された実行結果と上記入力値設定命令アドレスに対応する上記区間識別情報とを上記履歴メモリに保持させるようにしてもよい。これにより、実行履歴検索部において実行結果が履歴メモリから抽出されない場合には、入力値設定命令アドレスによって特定された命令区間における処理を実行部により実行して、実行履歴検索部により、入力値設定命令に基づいて取得された入力値と、実行部により実行された命令区間における処理の実行結果と、入力値設定命令アドレステーブルにおける入力値設定命令アドレスに対応する区間識別情報とを履歴メモリに保持させるという作用をもたらす。   In the first aspect, the execution unit may determine the instruction section specified by the input value setting instruction address when the execution history search unit does not extract the execution result in the execution history from the history memory. The execution history search unit corresponds to the input value output from the execution unit based on the input value setting command, the execution result executed by the execution unit, and the input value setting command address. The section identification information may be held in the history memory. Thereby, when the execution result is not extracted from the history memory in the execution history search unit, the execution unit executes the process in the instruction section specified by the input value setting instruction address, and the execution history search unit sets the input value. The history value memory stores the input value acquired based on the instruction, the execution result of the process in the instruction section executed by the execution unit, and the section identification information corresponding to the input value setting instruction address in the input value setting instruction address table It brings the effect of letting.

また、この第1の側面において、上記入力値設定命令アドレステーブルは、上記命令区間である関数の上記入力値設定命令の上記入力値設定命令アドレスを上記区間識別情報である上記関数の先頭アドレスごとに保持し、上記履歴メモリは、上記関数の先頭アドレスごとに上記関数における入力値および実行結果を関連付けて上記実行履歴として保持し、上記実行履歴検索部は、上記命令群のうちの上記入力値設定命令に基づいて上記実行部から出力された上記関数の上記入力値と上記入力値設定命令アドレスに対応する上記関数の先頭アドレスとを用いて上記実行結果を検索し、上記実行結果出力部は、上記入力値設定命令アドレスによって特定される上記関数の上記呼出し命令が実行されるときに上記実行履歴検索部により上記関数の上記実行結果が抽出された場合には上記抽出された実行結果を上記実行部に出力するようにしてもよい。これにより、関数の呼出し命令の実行前までに、入力値設定命令アドレスにより特定された入力値設定命令に基づいて設定された入力値と、その入力値設定命令アドレスに関連付けられた区間識別情報とを用いて履歴メモリにおける関数の実行結果を検索し、入力値設定命令アドレスによって特定される呼出し命令が実行されるときに、実行履歴検索部により実行結果が抽出された場合には、その関数の実行結果を実行部に出力させるという作用をもたらす。   In the first aspect, the input value setting instruction address table includes the input value setting instruction address of the input value setting instruction of the function that is the instruction section for each head address of the function that is the section identification information. The history memory associates an input value and an execution result in the function for each head address of the function and holds the execution history as the execution history, and the execution history search unit stores the input value in the instruction group. The execution result is searched using the input value of the function output from the execution unit based on the setting instruction and the start address of the function corresponding to the input value setting instruction address. When the call instruction of the function specified by the input value setting instruction address is executed, the execution history search unit The execution result of the extracted may be output to the execution unit when the execution result is extracted. Thus, before the execution of the function call instruction, the input value set based on the input value setting instruction specified by the input value setting instruction address, the section identification information associated with the input value setting instruction address, and When the execution result is extracted by the execution history search unit when the call instruction specified by the input value setting instruction address is executed, the execution result of the function in the history memory is searched using The execution result is output to the execution unit.

また、本発明の第2の側面は、プログラムのうち複数回実行される命令区間における処理の実行ごとの入力値が互いに一致する度合いを示す再利用度を上記命令区間の使用態様に基づいて上記命令区間ごとに生成する再利用度生成部と、上記複数の命令区間のうち上記再利用度に基づいて抽出された再利用区間における入力値を設定するための入力値設定命令の入力値設定命令アドレスと上記再利用区間を識別するための区間識別情報とが関連付けられた再利用区間情報を生成する再利用区間情報生成部とを具備するプログラム解析処理装置およびその処理方法である。これにより、複数回実行される命令区間の各々の実行結果が互いに一致する度合いを示す再利用度に基づいて複数の命令区間のうち再利用区間が抽出されて、再利用区間情報生成部により、その再利用区間における入力値設定命令の入力値設定命令アドレスと、再利用区間の区間識別情報とが関連付けられた再利用区間情報を生成させるという作用をもたらす。   Further, the second aspect of the present invention provides a degree of reuse indicating the degree to which the input values for each execution of processing in an instruction section executed a plurality of times in the program match each other based on the usage state of the instruction section. An input value setting instruction for setting an input value in a reuse section extracted based on the reuse degree among the plurality of instruction sections, and a reuse degree generation unit that generates each instruction section A program analysis processing apparatus and a processing method therefor including a reuse section information generation unit that generates reuse section information in which an address and section identification information for identifying the reuse section are associated with each other. Thereby, based on the degree of reuse indicating the degree to which the execution results of the instruction sections executed a plurality of times match each other, the reuse section is extracted from the plurality of instruction sections, and the reuse section information generation unit There is an effect of generating reuse section information in which the input value setting instruction address of the input value setting instruction in the reuse section is associated with the section identification information of the reuse section.

本発明によれば、実行結果の再利用による再利用区間の処理時間を短縮させることができるという優れた効果を奏し得る。   According to the present invention, it is possible to achieve an excellent effect that the processing time of the reuse section due to the reuse of the execution result can be shortened.

本発明の第1の実施の形態におけるデータ処理装置の一構成例を示すブロック図である。It is a block diagram which shows the example of 1 structure of the data processor in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるデータ処理部300および実行結果再利用処理部400の一構成例を示すブロック図である。It is a block diagram which shows the example of 1 structure of the data processing part 300 and the execution result reuse process part 400 in the 1st Embodiment of this invention. 本発明の第1の実施の形態における履歴メモリ430のデータ構造の一例を示す概念図である。It is a conceptual diagram which shows an example of the data structure of the history memory 430 in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるデータ処理装置100による1回目の関数の実行における区間識別情報および実行履歴の登録手法を示す概念図である。It is a conceptual diagram which shows the registration method of the area identification information and execution history in execution of the 1st function by the data processor 100 in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるデータ処理装置100による実行結果再利用処理に関する手法の一例を示す概念図である。It is a conceptual diagram which shows an example of the method regarding the execution result reuse process by the data processor 100 in the 1st Embodiment of this invention. 実行結果再利用処理により関数の処理時間が短縮される例を示す概念図である。It is a conceptual diagram which shows the example by which the processing time of a function is shortened by execution result reuse processing. 本発明の第1の実施の形態におけるデータ処理装置100による2回目以降の関数の実行における実行履歴の登録手法を示す概念図である。It is a conceptual diagram which shows the registration method of the execution history in execution of the function after the 2nd by the data processor 100 in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるデータ処理装置100による実行結果再利用方法の処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the process sequence of the execution result reuse method by the data processor 100 in the 1st Embodiment of this invention. 本発明の第2の実施の形態におけるプログラム解析処理装置の機能構成例を示すブロック図である。It is a block diagram which shows the function structural example of the program analysis processing apparatus in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるプログラム解析処理装置600のプログラム解析処理方法の処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the process sequence of the program analysis processing method of the program analysis processing apparatus 600 in the 2nd Embodiment of this invention. 本発明の第3の実施の形態におけるデータ処理装置100の一構成例を示すブロック図である。It is a block diagram which shows the example of 1 structure of the data processor 100 in the 3rd Embodiment of this invention. 本発明の第3の実施の形態におけるデータ処理装置100による入力値設定命令アドレステーブル820に対する入力値設定命令アドレスおよび区間識別情報の登録例を示す概念図である。It is a conceptual diagram which shows the example of a registration of the input value setting command address and area identification information with respect to the input value setting command address table 820 by the data processor 100 in the 3rd Embodiment of this invention. 本発明の第3の実施の形態におけるデータ処理装置100による実行結果再利用方法の処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the process sequence of the execution result reuse method by the data processor 100 in the 3rd Embodiment of this invention. 本発明の第3の実施形態におけるデータ処理装置100による実行履歴検索処理(ステップS960)の処理手順例を示すフローチャートである。It is a flowchart which shows the example of a process sequence of the execution history search process (step S960) by the data processor 100 in the 3rd Embodiment of this invention. 本発明の第4の実施の形態におけるデータ処理装置100の外部に履歴データ記憶部を設けた場合における集積回路の一構成例を示すブロック図である。It is a block diagram which shows the example of 1 structure of the integrated circuit in the case of providing the historical data memory | storage part outside the data processing apparatus 100 in the 4th Embodiment of this invention. 本発明の第4の実施の形態におけるデータ処理装置100による履歴データ転送方法の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the historical data transfer method by the data processor 100 in the 4th Embodiment of this invention.

以下、本発明を実施するための形態(以下、実施の形態と称する)について説明する。説明は以下の順序により行う。
1.第1の実施の形態(データ処理制御:入力値設定命令アドレスの事前登録の例)
2.第2の実施の形態(プログラム解析処理:入力値設定命令アドレスの抽出例)
3.第3の実施の形態(データ処理制御:プログラムの実行中における入力値設定命令アドレスの登録例)
4.第4の実施の形態(履歴データ転送制御:プログラム実行ごとにデータ処理装置の外部から履歴データを履歴メモリに読み出す例)
Hereinafter, modes for carrying out the present invention (hereinafter referred to as embodiments) will be described. The description will be made in the following order.
1. First Embodiment (Data Processing Control: Example of Preregistration of Input Value Setting Instruction Address)
2. Second Embodiment (Program Analysis Processing: Extraction Example of Input Value Setting Instruction Address)
3. Third Embodiment (Data Processing Control: Input Value Setting Instruction Address Registration Example During Program Execution)
4). Fourth Embodiment (History Data Transfer Control: Example of Reading History Data from Outside the Data Processing Device to the History Memory for Each Program Execution)

<1.第1の実施の形態>
[データ処理装置の構成例]
図1は、本発明の第1の実施の形態におけるデータ処理装置の一構成例を示すブロック図である。ここでは、集積回路を構成するデータ処理装置100と、バス120と、主記憶部130とが示されている。この集積回路は、データ処理装置100において、バス120を介して読み出される主記憶部130からの命令列に従って、処理を実行するものである。
<1. First Embodiment>
[Configuration example of data processing device]
FIG. 1 is a block diagram showing an example of the configuration of the data processing apparatus according to the first embodiment of the present invention. Here, a data processing device 100, a bus 120, and a main storage unit 130 constituting an integrated circuit are shown. This integrated circuit performs processing in the data processing apparatus 100 in accordance with a sequence of instructions from the main storage unit 130 read via the bus 120.

データ処理装置100は、一次キャッシュ200と、データ処理部300と、実行結果再利用処理部400と、検索開始命令アドレス管理部500とを備える。なお、データ処理装置100は、特許請求の範囲に記載のデータ処理装置の一例である。   The data processing apparatus 100 includes a primary cache 200, a data processing unit 300, an execution result reuse processing unit 400, and a search start instruction address management unit 500. The data processing device 100 is an example of a data processing device described in the claims.

一次キャッシュ200は、バス120を介して主記憶部130から命令およびデータを読み出す際、または、書き込む際の処理により生じる遅延時間を軽減するためのメモリである。この一次キャッシュ200は、例えば、DRAM(Dynamic Random Access Memory)により実現される。   The primary cache 200 is a memory for reducing a delay time caused by processing when reading or writing an instruction and data from the main storage unit 130 via the bus 120. The primary cache 200 is realized by, for example, a DRAM (Dynamic Random Access Memory).

この一次キャッシュ200は、命令キャッシュ210およびデータキャッシュ220を備える。命令キャッシュ210は、主記憶部130から読み出された過去の命令を一時的に保持するものである。この命令キャッシュ210は、データ処理部300からの要求に従って、その保持された命令を、命令線219を介してデータ処理部300に出力する。   The primary cache 200 includes an instruction cache 210 and a data cache 220. The instruction cache 210 temporarily holds past instructions read from the main storage unit 130. The instruction cache 210 outputs the held instruction to the data processing unit 300 via the command line 219 in accordance with a request from the data processing unit 300.

この命令キャッシュ210は、データ処理部300から要求された命令を保持している場合には、その保持されている複数の命令のうち、その要求された命令をデータ処理部300に出力する。一方、データ処理部300から要求された命令を保持していない場合には、命令キャッシュ210は、データ処理部300によって主記憶部130から読み出された命令を保持する。   When the instruction cache 210 holds the instruction requested from the data processing unit 300, the instruction cache 210 outputs the requested instruction to the data processing unit 300 among the plurality of held instructions. On the other hand, when the instruction requested from the data processing unit 300 is not held, the instruction cache 210 holds the instruction read from the main storage unit 130 by the data processing unit 300.

データキャッシュ220は、主記憶部130から読み出された過去のデータを一時的に保持するものである。このデータキャッシュ220は、データ処理部300からの要求に従って、その保持されたデータを、データ線229を介してデータ処理部300に出力する。   The data cache 220 temporarily holds past data read from the main storage unit 130. The data cache 220 outputs the held data to the data processing unit 300 via the data line 229 in accordance with a request from the data processing unit 300.

このデータキャッシュ220は、データ処理部300から要求されたデータが保持されている場合には、その保持されている複数のデータのうち、その要求されたデータをデータ処理部300に出力する。一方、データ処理部300から要求されたデータが保持されていない場合には、データキャッシュ220は、データ処理部300により主記憶部130から読み出されたデータを保持する。また、データキャッシュ220は、主記憶部130に書き戻すためのデータがデータ処理部300から供給された場合には、そのデータを保持する。   When the data requested by the data processing unit 300 is retained, the data cache 220 outputs the requested data to the data processing unit 300 among the plurality of retained data. On the other hand, when the data requested from the data processing unit 300 is not held, the data cache 220 holds the data read from the main storage unit 130 by the data processing unit 300. Further, when data for writing back to the main storage unit 130 is supplied from the data processing unit 300, the data cache 220 holds the data.

データ処理部300は、主記憶部130から読み出された命令に基づく処理を実行するものである。このデータ処理部300は、例えば、命令キャッシュ210を介して主記憶部130から命令を読み出して、その読み出された命令に従って、データキャッシュ220を介して主記憶部130に記憶されたデータを読み出す。また、データ処理部300は、例えば、その読み出されたデータを用いて、演算命令に基づく演算処理を実行する。   The data processing unit 300 executes processing based on an instruction read from the main storage unit 130. For example, the data processing unit 300 reads an instruction from the main storage unit 130 via the instruction cache 210 and reads data stored in the main storage unit 130 via the data cache 220 according to the read instruction. . For example, the data processing unit 300 executes arithmetic processing based on the arithmetic instruction using the read data.

また、データ処理部300は、例えば、関数の命令区間における処理を実行する場合には、データキャッシュ220からの関数における引数の入力値を用いて、その関数の演算処理を実行して、その演算処理の結果である実行結果をデータキャッシュ220に出力する。このとき、データ処理部300は、その関数における入力値および実行結果を実行結果再利用処理部400に出力する。このデータ処理部300は、例えば、プロセッサコアにより実現される。   In addition, for example, when executing processing in an instruction section of a function, the data processing unit 300 executes arithmetic processing of the function using an input value of an argument in the function from the data cache 220, and performs the calculation. The execution result that is the result of the processing is output to the data cache 220. At this time, the data processing unit 300 outputs the input value and the execution result in the function to the execution result reuse processing unit 400. The data processing unit 300 is realized by, for example, a processor core.

実行結果再利用処理部400は、過去に実行された命令区間の入力値と、再び実行される命令区間の入力値とが一致した場合には、その過去に実行された命令区間の実行結果を再利用する実行結果再利用処理を実行するものである。ここでは、複数回実行される命令区間のうち、過去に実行された命令区間の実行結果を再利用することができる命令区間を再利用区間という。すなわち、この再利用区間とは、複数回実行される命令区間のうち、命令区間における入力値が同じであれば実行結果も同じとなる命令区間のことをいう。   When the input value of the instruction section executed in the past matches the input value of the instruction section executed again, the execution result reuse processing unit 400 displays the execution result of the instruction section executed in the past. The execution result reuse process to be reused is executed. Here, an instruction section in which an execution result of an instruction section executed in the past among the instruction sections executed a plurality of times can be reused is referred to as a reuse section. In other words, the reuse section refers to an instruction section that has the same execution result if the input values in the instruction section are the same among instruction sections that are executed a plurality of times.

この実行結果再利用処理部400は、複数回実行される再利用区間における入力値および実行結果を実行履歴として保持する。また、実行結果再利用処理部400は、再び実行される再利用区間の入力値と、その保持された実行履歴における入力値とが同一である場合には、その保持された実行履歴における実行結果をデータ処理部300に出力する。これとともに、実行結果再利用処理部400は、その再利用区間における処理を省略(スキップ)するための指示をデータ処理部300に通知する。   The execution result reuse processing unit 400 holds an input value and an execution result in a reuse section that is executed a plurality of times as an execution history. Further, the execution result reuse processing unit 400, when the input value of the reuse section to be executed again and the input value in the held execution history are the same, the execution result in the held execution history Is output to the data processing unit 300. At the same time, the execution result reuse processing unit 400 notifies the data processing unit 300 of an instruction to omit (skip) the processing in the reuse section.

この実行結果再利用処理部400は、例えば、再利用区間である関数の引数の入力値と、その保持された実行履歴における入力値とが同一である場合には、その保持された実行履歴における実行結果をデータ処理部300に出力する。これとともに、実行結果再利用処理部400は、その関数における処理をスキップするための指示をデータ処理部300に通知する。   For example, when the input value of the argument of the function that is the reuse section is the same as the input value in the held execution history, the execution result reuse processing unit 400 uses the The execution result is output to the data processing unit 300. At the same time, the execution result reuse processing unit 400 notifies the data processing unit 300 of an instruction for skipping the processing in the function.

検索開始命令アドレス管理部500は、実行結果再利用処理部400における実行履歴の検索を開始する基準となる命令アドレスを管理するものである。この検索開始命令アドレス管理部500は、実行結果再利用処理部400において保持された実行履歴における入力値と、再利用区間の実行のために設定された入力値との比較を開始するタイミングを示す基準として命令アドレスを再利用区間ごとに管理する。また、検索開始命令アドレス管理部500は、その管理された命令アドレスに基づいて、実行結果再利用処理部400に実行履歴の検索の開始を指示する。   The search start instruction address management unit 500 manages an instruction address serving as a reference for starting execution history search in the execution result reuse processing unit 400. The search start instruction address management unit 500 indicates a timing for starting comparison between the input value in the execution history held in the execution result reuse processing unit 400 and the input value set for the execution of the reuse section. The instruction address is managed for each reuse section as a reference. The search start instruction address management unit 500 instructs the execution result reuse processing unit 400 to start execution history search based on the managed instruction address.

バス120は、データ処理装置100と主記憶部130との間の通信を行うものである。このバス120は、主記憶部130に記憶されているプログラムをデータ処理装置100に転送する。また、このバス120は、データ処理装置100から出力されたデータを主記憶部130に転送する。   The bus 120 performs communication between the data processing apparatus 100 and the main storage unit 130. The bus 120 transfers a program stored in the main storage unit 130 to the data processing apparatus 100. In addition, the bus 120 transfers data output from the data processing apparatus 100 to the main storage unit 130.

主記憶部130は、データ処理装置100に処理を実行させるためのプログラムを記憶するものである。ここでは、このプログラムは、ABI(Application Binary Interface)の規定に基づいて生成されたプログラムであることを想定する。このプログラムは、例えば、SPARC(Scalable Processor Architecture)_ABIに基づいて生成されるものである。このようなプログラムにおいては、データ処理装置100によって、関数における入力値および実行結果が格納される場所を特定することができるため、実行結果の再利用を実現することができる。   The main storage unit 130 stores a program for causing the data processing apparatus 100 to execute processing. Here, it is assumed that this program is a program generated based on the definition of ABI (Application Binary Interface). This program is generated based on, for example, SPARC (Scalable Processor Architecture) _ABI. In such a program, the data processing apparatus 100 can specify the location where the input value and the execution result in the function are stored, so that the reuse of the execution result can be realized.

[データ処理部300および実行結果再利用処理部400の構成例]
図2は、本発明の第1の実施の形態におけるデータ処理部300および実行結果再利用処理部400の一構成例を示すブロック図である。
[Configuration Example of Data Processing Unit 300 and Execution Result Reuse Processing Unit 400]
FIG. 2 is a block diagram illustrating a configuration example of the data processing unit 300 and the execution result reuse processing unit 400 according to the first embodiment of the present invention.

データ処理部300は、フェッチ部310と、命令デコーダ320と、実行部330と、レジスタファイル340とを備える。この実行部330は、ロードユニット331と、入力選択部332と、演算回路333と、ストアユニット334と、プログラムカウンタ350とを備える。   The data processing unit 300 includes a fetch unit 310, an instruction decoder 320, an execution unit 330, and a register file 340. The execution unit 330 includes a load unit 331, an input selection unit 332, an arithmetic circuit 333, a store unit 334, and a program counter 350.

また、実行結果再利用処理部400は、実行履歴検索部410と、実行結果出力部420と、履歴メモリ430とを備える。さらに、検索開始命令アドレス管理部500は、アドレス判定部510および入力値設定命令アドレステーブル520を備える。   The execution result reuse processing unit 400 includes an execution history search unit 410, an execution result output unit 420, and a history memory 430. Further, the search start command address management unit 500 includes an address determination unit 510 and an input value setting command address table 520.

フェッチ部310は、命令キャッシュ210に保持されている命令、または、主記憶部130に記憶されている命令を、命令線219を介して読み出すものである。このフェッチ部310は、プログラムカウンタ350から出力される命令アドレスに従って、命令キャッシュ210から命令を読み出す。   The fetch unit 310 reads an instruction held in the instruction cache 210 or an instruction stored in the main storage unit 130 via the instruction line 219. The fetch unit 310 reads an instruction from the instruction cache 210 in accordance with the instruction address output from the program counter 350.

このフェッチ部310は、例えば、再利用区間である関数を呼び出すための呼出し命令の前に、その関数における引数の入力値を設定するための入力値設定命令を読み出す。そして、その入力値設定命令が読み出された後に、フェッチ部310は、その関数の呼出し命令を読み出す。   For example, the fetch unit 310 reads an input value setting instruction for setting an input value of an argument in the function before a call instruction for calling a function that is a reuse section. After the input value setting instruction is read, the fetch unit 310 reads the function call instruction.

また、フェッチ部310は、読み出された命令を命令デコーダ320に供給する。また、履歴メモリ430における実行結果を再利用するための関数省略信号が実行履歴検索部410から供給された場合には、フェッチ部310は、例えば、その実行結果を設定するための命令を命令デコーダ320に供給する。   The fetch unit 310 supplies the read instruction to the instruction decoder 320. When the function omission signal for reusing the execution result in the history memory 430 is supplied from the execution history search unit 410, the fetch unit 310, for example, sends an instruction for setting the execution result to the instruction decoder. 320 is supplied.

命令デコーダ320は、フェッチ部310から供給された命令を解読(デコード)して、その解読内容に基づいて、実行部330、レジスタファイル340およびアドレス判定部510を制御するものである。   The instruction decoder 320 decodes (decodes) the instruction supplied from the fetch unit 310 and controls the execution unit 330, the register file 340, and the address determination unit 510 based on the decoded content.

この命令デコーダ320は、フェッチ部310から入力値設定命令が供給された場合には、実行データ保持部440に関数の引数の入力値を保持させるために、入力値設定信号をアドレス判定部510に供給する。この場合において、命令デコーダ320は、フェッチ部310から供給された命令が、関数における引数の入力値を設定するための入力値設定命令であるか否かを判断する。この命令デコーダ320は、例えば、ABIの規定に基づいて、フェッチ部310からの命令が入力値設定命令であるか否かを判断する。ここで、MIPS(Microprocessor without Interlocked Pipeline Stages)のABIの規定に基づく判断例について簡単に説明する。   When the instruction value is supplied from the fetch unit 310, the instruction decoder 320 sends an input value setting signal to the address determination unit 510 so that the execution data holding unit 440 holds the input value of the argument of the function. Supply. In this case, the instruction decoder 320 determines whether or not the instruction supplied from the fetch unit 310 is an input value setting instruction for setting an input value of an argument in the function. The instruction decoder 320 determines whether or not the instruction from the fetch unit 310 is an input value setting instruction based on, for example, ABI regulations. Here, an example of determination based on the ABI rules of MIPS (Microprocessor without Interlocked Pipeline Stages) will be briefly described.

MIPSの規定では、例えば、引数の入力値が全て整数である場合において、引数が4個以下のときには、レジスタファイル340におけるレジスタ4番乃至7番に入力値が格納される。また、引数が5個以上のときには、5番目以上の引数の入力値が主記憶部130におけるスタック領域にスタックされる。具体的には、5番目以上の引数の入力値は、レジスタファイル340のレジスタ29番に格納されたスタックポイント値に16以上の値が加算された値に対応する主記憶部130のスタック領域にスタックされる。   According to the MIPS rules, for example, when all input values of arguments are integers and the number of arguments is 4 or less, the input values are stored in registers 4 to 7 in the register file 340. Further, when there are five or more arguments, the input values of the fifth or more arguments are stacked in the stack area in the main storage unit 130. Specifically, the input value of the fifth or more argument is input to the stack area of the main storage unit 130 corresponding to a value obtained by adding 16 or more to the stack point value stored in the register 29 of the register file 340. Stacked.

したがって、命令デコーダ320は、例えば、ロードワード命令(lw)に示された転送先レジスタがレジスタ4番乃至7番である場合には、入力値設定命令と判断する。また、命令デコーダ320は、引数が5個以上であり、かつ、その全ての引数が整数である場合には、ストアワード命令(sw)に示された転送先レジスタがレジスタ29番であり、かつ、そのオフセット値が「16」以上となるため、入力値設定命令と判断する。   Therefore, for example, when the transfer destination register indicated by the load word instruction (lw) is the registers 4 to 7, the instruction decoder 320 determines that the instruction is an input value setting instruction. Further, the instruction decoder 320 has the transfer destination register indicated by the store word instruction (sw) as the register 29 when the number of arguments is five or more and all the arguments are integers, and Since the offset value is “16” or more, it is determined as an input value setting command.

このようにして、命令デコーダ320は、フェッチ部310から供給された命令に示されるデータの格納先に基づいて、その命令が入力値設定命令であるか否かを判断する。そして、入力値設定命令と判断された場合には、命令デコーダ320は、入力選択部332から出力されるデータを引数の入力値として実行データ保持部440に保持させるために、入力値設定信号をアドレス判定部510に供給する。   In this way, the instruction decoder 320 determines whether or not the instruction is an input value setting instruction based on the data storage destination indicated by the instruction supplied from the fetch unit 310. If it is determined that the instruction is an input value setting instruction, the instruction decoder 320 sends an input value setting signal to the execution data holding unit 440 to hold the data output from the input selection unit 332 as an input value of an argument. This is supplied to the address determination unit 510.

この命令デコーダ320は、例えば、主記憶部130から読み出された関数の入力値を設定するための入力値設定命令を受け付けた場合には、ロードユニット331から読み出された入力値をレジスタファイル340に格納するように制御する。これとともに、命令デコーダ320は、アドレス判定部510に対し入力値設定信号を供給する。   For example, when receiving an input value setting command for setting an input value of a function read from the main storage unit 130, the instruction decoder 320 stores the input value read from the load unit 331 in a register file. It controls to store in 340. At the same time, the instruction decoder 320 supplies an input value setting signal to the address determination unit 510.

また、命令デコーダ320は、例えば、レジスタファイル340に格納されているデータを関数の入力値として設定するための入力値設定命令を受け付けた場合には、レジスタファイル340における1つのレジスタに格納された入力値を他のレジスタに転送させる。これとともに、命令デコーダ320は、アドレス判定部510に対し入力値設定信号を供給する。   For example, when the instruction decoder 320 receives an input value setting instruction for setting the data stored in the register file 340 as an input value of a function, the instruction decoder 320 stores the data in one register in the register file 340. Transfer the input value to another register. At the same time, the instruction decoder 320 supplies an input value setting signal to the address determination unit 510.

また、命令デコーダ320は、入力値設定命令の後に、関数を呼び出すための呼出し命令を受け付けた場合には、関数の先頭アドレスにジャンプする旨を示す関数呼出し信号をアドレス判定部510に供給する。すなわち、この命令デコーダ320は、関数の呼出し命令を受け付けた場合には、履歴メモリ430における実行結果の再利用処理を実行するタイミングを通知するために、関数呼出し信号をアドレス判定部510に供給する。   When the instruction decoder 320 receives a call instruction for calling a function after the input value setting instruction, the instruction decoder 320 supplies a function call signal indicating that a jump to the start address of the function is made to the address determination unit 510. That is, when the instruction decoder 320 receives a function call instruction, the instruction decoder 320 supplies a function call signal to the address determination unit 510 in order to notify the timing for executing the execution result reuse processing in the history memory 430. .

また、命令デコーダ320は、例えば、MIPSの規定に基づいて、フェッチ部310からの命令に示されるデータの格納場所により、その命令が、関数の引数である入力値を参照するための入力値参照命令か否かを判断する。この命令デコーダ320は、入力値参照命令を受け付けた場合には、入力値参照信号をアドレス判定部510に供給する。また、命令デコーダ320は、関数の戻り命令を受け付けた場合には、アドレス判定部510に関数戻り信号を供給する。   In addition, the instruction decoder 320 refers to an input value for referring to an input value that is an argument of a function according to the storage location of the data indicated by the instruction from the fetch unit 310 based on, for example, MIPS. Determine whether the command. When the instruction decoder 320 receives an input value reference instruction, the instruction decoder 320 supplies an input value reference signal to the address determination unit 510. When the instruction decoder 320 receives a function return instruction, the instruction decoder 320 supplies a function return signal to the address determination unit 510.

また、命令デコーダ320は、MIPSの規定に基づいて、フェッチ部310からの命令に示される格納場所によってその命令が、関数の実行による実行結果を設定するための実行結果設定命令か否かを判断する。この命令デコーダ320は、実行結果設定命令を受け付けた場合には、実行データ保持部440に保持させるために、実行結果設定信号をアドレス判定部510に供給する。   Further, the instruction decoder 320 determines whether or not the instruction is an execution result setting instruction for setting the execution result by the execution of the function based on the storage location indicated by the instruction from the fetch unit 310 based on the MIPS regulations. To do. When the instruction decoder 320 receives the execution result setting instruction, the instruction decoder 320 supplies an execution result setting signal to the address determination unit 510 in order to hold the execution data holding unit 440.

また、命令デコーダ320は、関数の戻り命令を受け付けた場合には、アドレス判定部510に関数戻り信号を供給する。また、命令デコーダ320は、フェッチ部310から供給された命令に基づいて、プログラムカウンタ350の値を設定する。   When the instruction decoder 320 receives a function return instruction, the instruction decoder 320 supplies a function return signal to the address determination unit 510. The instruction decoder 320 sets the value of the program counter 350 based on the instruction supplied from the fetch unit 310.

実行部330は、命令デコーダ320からの制御に従って処理を実行するものである。この実行部330は、複数の命令区間を含む命令列に基づく処理を実行する。すなわち、この実行部330は、複数回実行される命令区間である再利用区間が含まれる命令列に基づく処理を実行する。この実行部330は、再利用区間である関数の入力値および実行結果を、レジスタファイル340または主記憶部130に出力するとともに、実行データ保持部440に供給する。   The execution unit 330 executes processing in accordance with control from the instruction decoder 320. The execution unit 330 executes processing based on an instruction sequence including a plurality of instruction sections. That is, the execution unit 330 executes a process based on an instruction sequence including a reuse section that is an instruction section that is executed a plurality of times. The execution unit 330 outputs the input value and execution result of the function, which is a reuse section, to the register file 340 or the main storage unit 130 and also supplies the execution data holding unit 440.

この実行部330は、例えば、入力値設定命令の実行により、関数の呼出し命令の前にその関数の入力値を、レジスタファイル340または主記憶部130に設定するとともに、実行データ保持部440に出力する。この実行部330は、例えば、入力値設定命令により設定された入力値を、入力値参照命令の実行によって参照するとともに、実行データ保持部440にその参照した入力値を出力する。この実行部330は、例えば、関数における引数の数値、引数の型および引数の格納場所を入力値として実行データ保持部440に出力する。なお、実行部330は、特許請求の範囲に記載の実行部の一例である。   The execution unit 330 sets, for example, the input value of the function in the register file 340 or the main storage unit 130 before the function call instruction by executing the input value setting instruction, and outputs it to the execution data holding unit 440. To do. For example, the execution unit 330 refers to the input value set by the input value setting command by executing the input value reference command, and outputs the referenced input value to the execution data holding unit 440. For example, the execution unit 330 outputs the numeric value of the argument, the type of the argument, and the storage location of the argument to the execution data holding unit 440 as input values. The execution unit 330 is an example of an execution unit described in the claims.

ロードユニット331は、命令デコーダ320からの制御に従って、主記憶部130またはデータキャッシュ220からデータを読み出して、その読み出されたデータを入力選択部332に供給するものである。このロードユニット331は、例えば、命令デコーダ320からの制御に従って、主記憶部130またはデータキャッシュ220から関数における引数の入力値を読み出して、その読み出された入力値を入力選択部332に供給する。   The load unit 331 reads data from the main storage unit 130 or the data cache 220 in accordance with control from the instruction decoder 320 and supplies the read data to the input selection unit 332. For example, the load unit 331 reads an input value of an argument in a function from the main storage unit 130 or the data cache 220 according to control from the instruction decoder 320 and supplies the read input value to the input selection unit 332. .

入力選択部332は、命令デコーダ320からの制御に従って、実行結果出力部420、演算回路333、レジスタファイル340および実行結果出力部420から出力されたデータのうちいずれか1つのデータを選択するものである。   The input selection unit 332 selects one of the data output from the execution result output unit 420, the arithmetic circuit 333, the register file 340, and the execution result output unit 420 according to control from the instruction decoder 320. is there.

この入力選択部332は、その選択されたデータを、レジスタファイル340および実行データ保持部440に出力する。すなわち、この入力選択部332は、命令デコーダ320の制御に従って、実行結果出力部420、演算回路333、レジスタファイル340および実行結果出力部420の出力のうち、いずれかをレジスタファイル340および実行データ保持部440に出力する。   The input selection unit 332 outputs the selected data to the register file 340 and the execution data holding unit 440. That is, the input selection unit 332 stores one of the outputs of the execution result output unit 420, the arithmetic circuit 333, the register file 340, and the execution result output unit 420 according to the control of the instruction decoder 320. Output to the unit 440.

この入力選択部332は、例えば、入力値設定命令としてロードワード命令が命令デコーダ320に供給された場合には、命令デコーダ320の制御に従って、ロードユニット331からのデータを、レジスタファイル340および実行データ保持部440に出力する。   For example, when a load word instruction is supplied to the instruction decoder 320 as an input value setting instruction, the input selection unit 332 converts the data from the load unit 331 into the register file 340 and the execution data according to the control of the instruction decoder 320. The data is output to the holding unit 440.

また、この入力選択部332は、例えば、入力値設定命令としてムーブ命令が供給された場合には、命令デコーダ320の制御に従って、レジスタファイル340におけるデータを、レジスタファイル340および実行データ保持部440に出力する。   Further, for example, when a move command is supplied as an input value setting command, the input selection unit 332 transfers data in the register file 340 to the register file 340 and the execution data holding unit 440 under the control of the command decoder 320. Output.

また、入力選択部332は、演算処理を実行するための演算命令が命令デコーダ320に供給された場合には、命令デコーダ320の制御に従って、演算回路333から出力された演算結果を実行結果として、レジスタファイル340に出力する。また、この入力選択部332は、実行履歴検索部410により実行結果が抽出された場合には、命令デコーダ320からの制御に従って、実行結果出力部420から出力された実行結果をレジスタファイル340に出力する。   In addition, when an arithmetic instruction for executing arithmetic processing is supplied to the instruction decoder 320, the input selection unit 332 uses the arithmetic result output from the arithmetic circuit 333 as an execution result under the control of the instruction decoder 320. Output to the register file 340. Further, when the execution result is extracted by the execution history search unit 410, the input selection unit 332 outputs the execution result output from the execution result output unit 420 to the register file 340 according to the control from the instruction decoder 320. To do.

演算回路333は、命令デコーダ320からの制御に従って、演算処理を実行するものである。この演算回路333は、例えば、乗算、除算または積和などの演算処理を実行するための演算命令が命令デコーダ320に供給された場合には、命令デコーダ320の制御に従って、レジスタファイル340に格納されたデータを用いて演算処理を実行する。また、演算回路333は、その演算処理による演算結果を実行結果として、入力選択部332を介してレジスタファイル340に格納する。   The arithmetic circuit 333 executes arithmetic processing in accordance with control from the instruction decoder 320. For example, when an arithmetic instruction for executing arithmetic processing such as multiplication, division or sum of products is supplied to the instruction decoder 320, the arithmetic circuit 333 is stored in the register file 340 according to the control of the instruction decoder 320. The arithmetic processing is executed using the obtained data. In addition, the arithmetic circuit 333 stores the calculation result of the calculation processing as an execution result in the register file 340 via the input selection unit 332.

ストアユニット334は、命令デコーダ320からの制御に従って、レジスタファイル340に格納されたデータ、または、実行結果出力部420から出力された実行結果を主記憶部130に書き戻すためのものである。このストアユニット334は、主記憶部130にデータを書き戻すためのストアワード命令が命令デコーダ320に供給された場合には、命令デコーダ320からの制御に従って、書き戻すべきデータを、データ線229を介してデータキャッシュ220に出力する。   The store unit 334 is for writing back the data stored in the register file 340 or the execution result output from the execution result output unit 420 to the main storage unit 130 according to the control from the instruction decoder 320. When a store word instruction for writing data back to the main storage unit 130 is supplied to the instruction decoder 320, the store unit 334 sends data to be written back to the data line 229 according to control from the instruction decoder 320. To the data cache 220.

また、このストアユニット334は、実行履歴検索部410により履歴メモリ430から実行結果が抽出された場合には、実行結果出力部420から出力された実行結果を、データ線229を介して主記憶部130およびデータキャッシュ220に書き戻す。   In addition, when the execution result is extracted from the history memory 430 by the execution history search unit 410, the store unit 334 displays the execution result output from the execution result output unit 420 via the data line 229. 130 and data cache 220 are written back.

レジスタファイル340は、実行部330から出力されたデータを格納するものである。このレジスタファイル340は、複数のレジスタ、例えば、レジスタ0番乃至31番の32個のレジスタにより構成される。このレジスタファイル340は、命令デコーダ320からの制御に従って、実行部330から出力されたデータを、複数のレジスタのうち1つのレジスタに格納する。   The register file 340 stores data output from the execution unit 330. The register file 340 is composed of a plurality of registers, for example, 32 registers of registers 0 to 31. The register file 340 stores the data output from the execution unit 330 in one register among a plurality of registers in accordance with control from the instruction decoder 320.

また、このレジスタファイル340は、例えば、命令デコーダ320からの制御に従って、複数のレジスタのうち1つのレジスタに格納された実行結果を実行部330に、または実行部330を介して実行履歴検索部410に出力する。   The register file 340 also stores the execution result stored in one of the plurality of registers in the execution unit 330 or through the execution unit 330 according to control from the instruction decoder 320, for example. Output to.

プログラムカウンタ350は、命令デコーダ320からの制御によってカウント値が設定されるものである。このプログラムカウンタ350は、例えば、命令デコーダ320からの制御によって、1つの命令が実行されるたびにカウント値を1つ増加させる。また、このプログラムカウンタ350は、命令デコーダ320からの制御によって、関数の呼出し命令が実行された場合には、レジスタファイル340に格納された関数の先頭アドレスが設定される。このプログラムカウンタ350は、そのカウント値を、主記憶部130のメモリアドレスを示す命令アドレスとしてアドレス判定部510に出力する。   The program counter 350 is set with a count value under the control of the instruction decoder 320. The program counter 350, for example, increases the count value by one every time one instruction is executed under the control of the instruction decoder 320. The program counter 350 is set with the start address of the function stored in the register file 340 when a function call instruction is executed under the control of the instruction decoder 320. The program counter 350 outputs the count value to the address determination unit 510 as an instruction address indicating the memory address of the main storage unit 130.

アドレス判定部510は、入力値設定命令アドレステーブル520に登録された入力値設定命令アドレスに基づいて、履歴メモリ430における実行履歴を検索させるために、実行履歴検索部410および実行データ保持部440を制御するものである。すなわち、アドレス判定部510は、プログラムカウンタ350から出力された命令アドレスが、入力値設定命令アドレステーブル520に保持された入力値設定命令アドレスと一致した場合には、実行履歴の検索を開始させるものである。   The address determination unit 510 causes the execution history search unit 410 and the execution data holding unit 440 to search the execution history in the history memory 430 based on the input value setting command address registered in the input value setting command address table 520. It is something to control. That is, the address determination unit 510 starts searching for an execution history when the instruction address output from the program counter 350 matches the input value setting instruction address held in the input value setting instruction address table 520. It is.

このアドレス判定部510は、プログラムカウンタ350から出力された命令アドレスと、入力値設定命令アドレステーブル520に登録された入力値設定命令アドレスとが一致したか否かを判定する。そして、双方の命令アドレスが一致した場合には、アドレス判定部510は、入力値設定命令アドレスにより特定された入力値設定命令に基づいて、実行部330から出力された入力値を実行データ保持部440に保持させる。   The address determination unit 510 determines whether the instruction address output from the program counter 350 matches the input value setting instruction address registered in the input value setting instruction address table 520. If both instruction addresses match, the address determination unit 510 executes the input value output from the execution unit 330 based on the input value setting command specified by the input value setting command address. 440 is held.

これとともに、アドレス判定部510は、入力値設定命令アドレステーブル520におけるその一致した入力値設定命令アドレスと関連付けられた区間識別情報を実行データ保持部440に保持させる。ここにいう区間識別情報とは、複数の再利用区間を互いに識別するための識別情報である。この区間識別情報として、例えば、再利用区間である関数の先頭アドレスを用いるようにしてもよい。   At the same time, the address determination unit 510 causes the execution data holding unit 440 to hold section identification information associated with the matched input value setting command address in the input value setting command address table 520. The section identification information here is identification information for identifying a plurality of reuse sections from each other. As the section identification information, for example, the start address of a function that is a reuse section may be used.

また、双方の命令アドレスが一致した場合において、命令デコーダ320から、関数呼出し信号が供給されるまでの間に入力値設定信号が供給されたときは、アドレス判定部510は、実行部330から出力された入力値を実行データ保持部440に保持させる。すなわち、アドレス判定部510は、関数呼出し信号が供給されるまでの間、命令デコーダ320から供給された入力値設定信号に基づいて、関数における引数の入力値として実行部330からの出力を実行データ保持部440に保持させる。   Further, when both instruction addresses coincide with each other, when the input value setting signal is supplied from the instruction decoder 320 until the function call signal is supplied, the address determination unit 510 outputs from the execution unit 330. The execution data holding unit 440 holds the input value. That is, the address determination unit 510 outputs the output from the execution unit 330 as the input value of the argument in the function based on the input value setting signal supplied from the instruction decoder 320 until the function call signal is supplied. The holding unit 440 holds it.

また、アドレス判定部510は、命令デコーダ320から関数呼出し信号が供給された場合には、履歴メモリ430における実行結果の再利用処理を実行履歴検索部410に指示する。また、アドレス判定部510は、命令デコーダ320から供給される実行結果設定信号に基づいて、関数の実行結果として実行部330からの出力を実行データ保持部440に保持させる。   Further, when a function call signal is supplied from the instruction decoder 320, the address determination unit 510 instructs the execution history search unit 410 to reuse the execution result in the history memory 430. Further, the address determination unit 510 causes the execution data holding unit 440 to hold the output from the execution unit 330 as a function execution result based on the execution result setting signal supplied from the instruction decoder 320.

また、アドレス判定部510は、命令デコーダ320から供給される関数戻り信号に基づいて、実行データ保持部440における区間識別情報、入力値および実行結果を履歴メモリ430に新たに登録させるために、実行履歴検索部410に登録の指示を行う。   In addition, the address determination unit 510 executes, based on the function return signal supplied from the instruction decoder 320, to newly register the section identification information, the input value, and the execution result in the execution data holding unit 440 in the history memory 430. A registration instruction is issued to the history search unit 410.

入力値設定命令アドレステーブル520は、複数回実行される再利用区間である関数を識別するための区間識別情報ごとに、その関数における入力値を設定するための入力値設定命令のアドレスである入力値設定命令アドレスを保持するものである。ここにいうアドレスとは、入力値設定命令が、主記憶部130に記憶されているメモリアドレスを示す。   The input value setting instruction address table 520 is an input that is an address of an input value setting instruction for setting an input value in a function for each section identification information for identifying a function that is a reuse section executed a plurality of times. It holds the value setting instruction address. The address here indicates a memory address in which the input value setting command is stored in the main storage unit 130.

ここでは、入力値設定命令アドレステーブル520には、例えば、コンパイラ装置またはプログラムの事前実行により、主記憶部130に記憶されるプログラムを解析することによって抽出された再利用区間に関するデータが保持されていることを想定する。すなわち、入力値設定命令アドレステーブル520には、実行結果が再利用される度合いが高い関数の入力設定命令アドレスと、その関数を識別するための区間識別情報とが関連付けて保持されている。   Here, in the input value setting instruction address table 520, for example, data relating to a reuse section extracted by analyzing a program stored in the main storage unit 130 by pre-execution of a compiler device or a program is held. Assuming that That is, the input value setting instruction address table 520 holds an input setting instruction address of a function whose execution result is highly reused and section identification information for identifying the function in association with each other.

この入力値設定命令アドレステーブル520は、例えば、関数における入力値を設定するための入力値設定命令のうち、最初に入力値を設定する入力値設定命令の入力値設定命令アドレスを区間識別情報ごとに保持する。すなわち、この入力値設定命令アドレステーブル520は、再利用区間の区間識別情報ごとに、その再利用区間における最先の入力値設定命令アドレスを保持する。このように、最先の入力値設定命令のみを保持させることによって、入力値設定命令アドレステーブル520の容量を低減することができる。   The input value setting command address table 520 is, for example, the input value setting command address of the input value setting command that first sets the input value among the input value setting commands for setting the input value in the function for each section identification information. Hold on. That is, the input value setting instruction address table 520 holds the earliest input value setting instruction address in the reuse section for each section identification information of the reuse section. In this way, the capacity of the input value setting command address table 520 can be reduced by holding only the earliest input value setting command.

また、入力値設定命令アドレステーブル520は、その保持されたデータをアドレス判定部510に出力する。なお、入力値設定命令アドレステーブル520に、再利用区間である関数が複数の引数を持つ場合には、区間識別情報ごとに、複数の入力値設定命令アドレスを保持させるようにしてもよい。また、入力値設定命令アドレステーブル520は、特許請求の範囲に記載の入力値設定命令アドレステーブルの一例である。   Further, the input value setting instruction address table 520 outputs the held data to the address determination unit 510. If the function that is a reuse section has a plurality of arguments in the input value setting instruction address table 520, a plurality of input value setting instruction addresses may be held for each section identification information. The input value setting instruction address table 520 is an example of the input value setting instruction address table described in the claims.

なお、入力値設定命令アドレステーブル520に、区間識別情報ごとに実行履歴を削除する際の優先度をさらに保持させるようにしてもよい。この場合には、実行履歴検索部410は、アドレス判定部510からの優先度を履歴メモリ430に登録する。そして、履歴メモリ430の容量が一定の条件を超えた場合には、実行履歴検索部410は、履歴メモリ430に保持された優先度に基づいて、履歴メモリ430における実行履歴を削除する。   Note that the input value setting command address table 520 may further hold the priority when deleting the execution history for each section identification information. In this case, the execution history search unit 410 registers the priority from the address determination unit 510 in the history memory 430. Then, when the capacity of the history memory 430 exceeds a certain condition, the execution history search unit 410 deletes the execution history in the history memory 430 based on the priority stored in the history memory 430.

実行データ保持部440は、アドレス判定部510からの指示に従って、アドレス判定部510からの区間識別情報と、実行部330からの関数における入力値および実行結果とを保持するものである。この実行データ保持部440は、その保持された区間識別情報と、関数における入力値および実行結果とを実行履歴検索部410に出力する。   The execution data holding unit 440 holds the section identification information from the address determination unit 510, the input value in the function from the execution unit 330, and the execution result in accordance with the instruction from the address determination unit 510. The execution data holding unit 440 outputs the held section identification information, the input value in the function, and the execution result to the execution history search unit 410.

実行履歴検索部410は、実行データ保持部440から出力された識別情報および関数の入力値に基づいて、履歴メモリ430における実行履歴を検索するものである。この実行履歴検索部410は、履歴メモリ430において区間識別情報ごとに保持された再利用区間における入力値および実行結果である実行履歴のうち、実行データ保持部440に保持された区間識別情報および入力値と同一の実行履歴における実行結果を抽出する。   The execution history search unit 410 searches the execution history in the history memory 430 based on the identification information output from the execution data holding unit 440 and the input value of the function. The execution history search unit 410 includes, in the history memory 430, the section identification information and the input stored in the execution data storage unit 440 among the input values in the reuse section stored for each section identification information and the execution history as the execution result. The execution result in the same execution history as the value is extracted.

実行履歴検索部410は、履歴メモリ430から実行結果が抽出された場合において、アドレス判定部510からの再利用処理の指示を受け付けたときは、その実行結果を実行結果出力部420に出力する。これとともに、実行履歴検索部410は、関数の処理を省略するための関数省略信号として、その抽出された実行結果における格納場所に関する情報をフェッチ部310に供給する。   When the execution result is extracted from the history memory 430, the execution history search unit 410 outputs the execution result to the execution result output unit 420 when receiving an instruction for the reuse process from the address determination unit 510. At the same time, the execution history search unit 410 supplies information related to the storage location in the extracted execution result to the fetch unit 310 as a function omission signal for omitting the function processing.

一方、履歴メモリ430から実行結果が抽出されない場合において、アドレス判定部510からの再利用処理の指示を受け付けたときは、実行履歴検索部410は、関数省略信号をフェッチ部310に出力しない。そして、実行部330における関数の実行によって、新たに生成された実行結果が実行データ保持部440に保持された後に、実行履歴検索部410は、実行データ保持部440からの出力を履歴メモリ430に登録する。   On the other hand, when the execution result is not extracted from the history memory 430, the execution history search unit 410 does not output the function omission signal to the fetch unit 310 when an instruction for the reuse process is received from the address determination unit 510. Then, after the execution result newly generated by the execution of the function in the execution unit 330 is held in the execution data holding unit 440, the execution history search unit 410 outputs the output from the execution data holding unit 440 to the history memory 430. sign up.

すなわち、この実行履歴検索部410は、アドレス判定部510からの登録指示に基づいて、実行データ保持部440に保持された区間識別情報、入力値および実行結果を履歴メモリ430に保持させる。   That is, the execution history search unit 410 causes the history memory 430 to hold the section identification information, the input value, and the execution result held in the execution data holding unit 440 based on the registration instruction from the address determination unit 510.

実行結果出力部420は、実行履歴検索部410によって履歴メモリ430から実行結果が抽出された場合には、その実行結果を、入力選択部332を介してレジスタファイル340に、または、ストアユニット334に出力するものである。この実行結果出力部420は、履歴メモリ430からの実行結果におけるデータの格納場所に従って、ストアユニット334または入力選択部332にその実行結果におけるデータを出力する。なお、実行結果出力部420は、特許請求の範囲に記載の実行結果出力部の一例である。   If the execution result is extracted from the history memory 430 by the execution history search unit 410, the execution result output unit 420 stores the execution result in the register file 340 or the store unit 334 via the input selection unit 332. Output. The execution result output unit 420 outputs the data in the execution result to the store unit 334 or the input selection unit 332 according to the storage location of the data in the execution result from the history memory 430. The execution result output unit 420 is an example of an execution result output unit described in the claims.

履歴メモリ430は、区間識別情報ごとに、区間識別情報により識別される関数における入力値および実行結果を関連付けて実行履歴として保持するものである。この履歴メモリ430は、例えば、連想メモリ(CAM:Content Addressable Memory)により実現される。この例において、履歴メモリ430は、実行結果を検索するための検索キーである区間識別情報が実行履歴検索部410から入力されることによって、その区間識別情報に関連付けられた実行履歴の検索を開始する。   The history memory 430 stores, as execution history, the input value and the execution result in the function identified by the section identification information for each section identification information. The history memory 430 is realized by, for example, a content addressable memory (CAM). In this example, the history memory 430 starts searching for an execution history associated with the section identification information when section identification information that is a search key for searching for an execution result is input from the execution history search unit 410. To do.

また、履歴メモリ430は、実行履歴検索部410から順次供給された入力値と、履歴メモリ430に保持されている入力値とが全て一致する場合には、その履歴メモリ430における入力値に関連付けられた実行結果を実行履歴検索部410に出力する。すなわち、実行履歴検索部410から入力された区間識別情報および入力値と同一の実行履歴が履歴メモリ430から検出されることによって、実行履歴検索部410により履歴メモリ430から実行結果が抽出される。   The history memory 430 is associated with the input value in the history memory 430 when the input values sequentially supplied from the execution history search unit 410 and the input values held in the history memory 430 all match. The execution result is output to the execution history search unit 410. That is, the execution history search unit 410 extracts the execution result from the history memory 430 by detecting from the history memory 430 the same execution history as the section identification information and the input value input from the execution history search unit 410.

また、この連想メモリにより実現される履歴メモリ430は、例えば、実行履歴における入力値のパターンを木構造により保持する。なお、履歴メモリ430は、特許請求の範囲に記載の履歴メモリの一例である。   The history memory 430 realized by this associative memory holds, for example, a pattern of input values in the execution history in a tree structure. The history memory 430 is an example of a history memory described in the claims.

このように、アドレス判定部510および入力値設定命令アドレステーブル520を設けることによって、再利用区間の最先の入力値設定命令を特定することができるため、再利用区間の実行前に、履歴メモリ430における実行履歴の検索を行うことができる。次に、履歴メモリ430におけるデータ構造の例について図面を参照して以下に説明する。   Thus, by providing the address determination unit 510 and the input value setting instruction address table 520, the earliest input value setting instruction in the reuse section can be specified. An execution history search at 430 can be performed. Next, an example of a data structure in the history memory 430 will be described below with reference to the drawings.

[履歴メモリ430のデータ構造例]
図3は、本発明の第1の実施の形態における履歴メモリ430のデータ構造の一例を示す概念図である。ここでは、履歴メモリ430により、区間識別情報ごとに保持された実行履歴のうち、1つの区間識別情報における複数の実行履歴を木構造により保持する構成が示されている。この例では、引数がn個の関数であって、実行結果である出力をm個の格納先に返す関数を想定する。また、ここでは、関数の先頭アドレスである関数アドレスを区間識別情報とする。
[Data structure example of history memory 430]
FIG. 3 is a conceptual diagram showing an example of the data structure of the history memory 430 in the first embodiment of the present invention. Here, a configuration is shown in which the history memory 430 holds a plurality of execution histories in one section identification information in a tree structure among execution histories held for each section identification information. In this example, it is assumed that a function has n arguments and returns an output as an execution result to m storage destinations. Here, the function address that is the start address of the function is used as section identification information.

この例では、木構造における関数ルート460と、第1の引数ノード461および462と、第nの引数ノード471乃至474と、第1の出力ノード481乃至484と、第mの出力ノード491乃至494とが示されている。   In this example, the function route 460 in the tree structure, the first argument nodes 461 and 462, the nth argument nodes 471 to 474, the first output nodes 481 to 484, and the mth output nodes 491 to 494 are displayed. Is shown.

関数ルート460には、区間識別情報である関数アドレスと、第1の引数ノード461を指し示すポインタとが示されている。   In the function route 460, a function address that is section identification information and a pointer that points to the first argument node 461 are shown.

第1および第nの引数ノード461、462および471乃至474には、履歴メモリ430に保持されている実行履歴における引数の入力値として、引数の値を示す入力データと、その引数の型と、その引数の格納場所を示す種類とが示されている。ここにいう格納場所とは、レジスタファイル340のレジスタ番号または主記憶部130のメモリアドレスのことをいう。   The first and nth argument nodes 461, 462, and 471 to 474 include input data indicating argument values as input values of arguments in the execution history held in the history memory 430, the types of the arguments, The type indicating the storage location of the argument is shown. The storage location here refers to the register number of the register file 340 or the memory address of the main storage unit 130.

さらに、第1および第nの引数ノード461、462および471乃至474には、比較対象の入力値が互いに一致するときに、次の引数における引数ノードを指し示す右ポインタが示されている。一方、第1および第nの引数ノード461、462および471乃至474には、比較対象の入力値が不一致のときに、同一の引数における他の引数ノードを指し示す下ポインタが示されている。また、第nの引数ノード471乃至474の各々に、第1および第mの出力ノード481乃至484および491乃至494がそれぞれ連結されている。   Furthermore, the first and nth argument nodes 461, 462, and 471 to 474 show a right pointer that points to the argument node in the next argument when the input values to be compared match each other. On the other hand, the first and nth argument nodes 461, 462, and 471 to 474 show a lower pointer that points to another argument node in the same argument when the input values to be compared do not match. The first and mth output nodes 481 to 484 and 491 to 494 are connected to the nth argument nodes 471 to 474, respectively.

第1および第mの出力ノード481乃至484および491乃至494には、履歴メモリ430に保持されている実行履歴における実行結果として、実行結果の値を示す出力データと、その実行結果の格納場所を示す種類と、その実行結果の型とが示されている。さらに、第1の出力ノード481乃至484には、次の出力における出力ノードを指し示す右ポインタが示されている。この第1および第mの出力ノード481乃至484および491乃至494は、連結リストを構成している。また、第mの出力ノード491乃至494の右ポインタには、出力ノードの終端を表わすヌルが示されている。   In the first and m-th output nodes 481 to 484 and 491 to 494, output data indicating execution result values as execution results in the execution history held in the history memory 430 and storage locations of the execution results are stored. The type to be shown and the type of the execution result are shown. Further, the first output nodes 481 to 484 show a right pointer indicating the output node in the next output. The first and m-th output nodes 481 to 484 and 491 to 494 constitute a linked list. The right pointers of the m-th output nodes 491 to 494 indicate a null indicating the end of the output node.

このような木構造において、関数ルート460に示された関数アドレスと一致する関数アドレスが実行履歴検索部410から入力されると、関数ルート460のポインタによって指し示された第1の引数ノード461において入力値の比較処理が実行される。ここにいう入力値の比較処理とは、第1の引数ノード461に示された入力データ、種類および型である入力値と、実行履歴検索部410からの入力値とを比較することである。   In such a tree structure, when a function address that matches the function address indicated in the function route 460 is input from the execution history search unit 410, the first argument node 461 indicated by the pointer of the function route 460 is used. Input value comparison processing is executed. Here, the input value comparison process is to compare the input data, type, and type indicated by the first argument node 461 with the input value from the execution history search unit 410.

このとき、例えば、第1の引数ノード461に示された入力値と、実行履歴検索部410からの入力値とが一致した場合には、第1の引数ノード461の右ポインタにより指し示された次の引数ノードにおいて入力値の比較処理が実行される。一方、第1の引数ノード461に示された入力値と、実行履歴検索部410からの入力値とが一致しない場合には、第1の引数ノード461の下ポインタにより指し示された第1の引数ノード462において入力値の比較処理が実行される。   At this time, for example, when the input value indicated by the first argument node 461 matches the input value from the execution history search unit 410, the input is indicated by the right pointer of the first argument node 461. Input value comparison processing is executed at the next argument node. On the other hand, when the input value indicated by the first argument node 461 and the input value from the execution history search unit 410 do not match, the first pointer indicated by the lower pointer of the first argument node 461 is used. In the argument node 462, input value comparison processing is executed.

このようにして、各引数ノードにおける比較処理による比較結果に基づいて右または下ポインタの指し示す引数ノードが選択され、その選択された引数ノードにおいて入力値の比較処理が順次実行される。そして、第nの引数ノード471に示された入力値と、実行履歴検索部410からの入力値とが互いに一致した場合には、第nの引数ノード471の右ポインタにより第1の出力ノード481が指し示される。これにより、第1の出力ノード481に保持された出力データ、種類および型を示す実行結果から順番に、第m番の出力ノード491に保持された実行結果までが実行履歴検索部410に順次出力される。   In this way, the argument node pointed to by the right or lower pointer is selected based on the comparison result of the comparison process at each argument node, and the input value comparison process is sequentially executed at the selected argument node. If the input value indicated by the nth argument node 471 and the input value from the execution history search unit 410 match each other, the first output node 481 is set by the right pointer of the nth argument node 471. Is pointed to. As a result, the execution results indicating the output data, type and type held in the first output node 481 are sequentially output to the execution history search unit 410 from the execution result held in the mth output node 491 to the execution result. Is done.

このように、履歴メモリ430を区間識別情報ごとに木構造により構成することによって、同じ引数の入力値を重複して保持する必要が無いため、履歴メモリ430の記憶領域を節約することができる。また、区間識別情報ごとにデータ構造を分けることによって、検索速度の低下を抑制することができる。次に、この履歴メモリ430に対する登録手法として、再利用区間である関数の1回目の実行における履歴メモリ430に対する登録処理例について図面を参照して以下に説明する。   In this way, by configuring the history memory 430 with a tree structure for each section identification information, it is not necessary to hold the input values of the same argument redundantly, so that the storage area of the history memory 430 can be saved. Further, by dividing the data structure for each section identification information, it is possible to suppress a decrease in search speed. Next, as a registration method for the history memory 430, an example of registration processing for the history memory 430 in the first execution of a function that is a reuse section will be described below with reference to the drawings.

[再利用区間の1回目の実行による履歴メモリ430に対する登録例]
図4は、本発明の第1の実施の形態におけるデータ処理装置100による1回目の関数の実行における区間識別情報および実行履歴の登録手法を示す概念図である。図4(a)は、入力値設定命令アドレステーブル520のデータフォーマットの一例を示す図である。入力値設定命令アドレステーブル520には、関数における最先の入力値設定命令アドレス521と、その関数を識別するための区間識別情報である関数アドレス522との対応関係が示されている。
[Registration example for the history memory 430 by the first execution of the reuse section]
FIG. 4 is a conceptual diagram showing a method of registering section identification information and execution history in the first function execution by the data processing apparatus 100 according to the first embodiment of the present invention. FIG. 4A is a diagram illustrating an example of the data format of the input value setting instruction address table 520. The input value setting instruction address table 520 shows the correspondence between the earliest input value setting instruction address 521 in the function and the function address 522 which is section identification information for identifying the function.

図4(b)は、上位ルーチンにおいて2つの引数を持つ関数が呼出し命令(call)によって呼び出された後に、その関数の命令区間である下位ルーチンにおいて戻り命令(return)によって上位ルーチンに復帰する処理例を示す概念図である。ここでは、上位ルーチンにおける入力値A設定321および入力値B設定322と、下位ルーチンにおける入力値A参照323、入力値B参照324および実行結果C設定325とが示されている。また、ここでは、左から右に時間が経過することとする。   FIG. 4B shows a process in which a function having two arguments is called by a call instruction (call) in the upper routine and then returned to the upper routine by a return instruction (return) in a lower routine that is an instruction section of the function. It is a conceptual diagram which shows an example. Here, an input value A setting 321 and an input value B setting 322 in the upper routine, an input value A reference 323, an input value B reference 324, and an execution result C setting 325 in the lower routine are shown. Here, time passes from the left to the right.

入力値A設定321および入力値B設定322は、2つの入力値設定命令に基づいて、再利用区間である関数における入力値Aおよび入力値Bが設定されるタイミングを示す。ここでは、入力値A設定命令アドレスに対応する入力値A設定命令に基づいて入力値Aが設定される。また、入力値B設定命令アドレスに対応する入力値B設定命令に基づいて入力値Bが設定される。このように、関数の呼出し命令(call)の前に、入力値設定命令によってその関数の引数の入力値が設定されるのは、図1で述べたとおり、主記憶部130に記憶されたプログラムがABIの規定に基づいて生成されるからである。   The input value A setting 321 and the input value B setting 322 indicate the timing at which the input value A and the input value B in the function that is a reuse section are set based on two input value setting commands. Here, the input value A is set based on the input value A setting command corresponding to the input value A setting command address. The input value B is set based on the input value B setting command corresponding to the input value B setting command address. In this way, the input value of the argument of the function is set by the input value setting instruction before the function call instruction (call), as described in FIG. 1, the program stored in the main storage unit 130. This is because is generated based on the ABI rules.

入力値A参照323および入力値B参照324は、下位ルーチンによる関数の処理において、入力値参照命令の実行によって関数の入力値が参照されるタイミングを示す。ここでは、入力値A設定命令および入力値B設定命令により設定された入力値Aおよび入力値Bが、2つの入力値参照命令に基づいてそれぞれ参照される。すなわち、関数の処理において、入力値参照命令の実行により、入力値Aおよび入力値Bが設定されたレジスタファイル340におけるレジスタに格納された引数の数値が使用される。   The input value A reference 323 and the input value B reference 324 indicate the timing at which the input value of the function is referred to by executing the input value reference instruction in the processing of the function by the lower level routine. Here, the input value A and the input value B set by the input value A setting command and the input value B setting command are referred to based on the two input value reference commands, respectively. That is, in the function processing, the numerical value of the argument stored in the register in the register file 340 in which the input value A and the input value B are set is used by executing the input value reference instruction.

実行結果C設定325は、関数の処理により生成された実行結果Cが主記憶部130またはレジスタファイル340に設定されるタイミングを示す。ここでは、実行結果設定命令に基づいて実行結果Cが設定される。   The execution result C setting 325 indicates the timing at which the execution result C generated by the function processing is set in the main storage unit 130 or the register file 340. Here, the execution result C is set based on the execution result setting command.

図4(c)は、履歴メモリ430におけるデータフォーマットの一例を示す概念図である。ここでは、関数の区間識別情報である関数アドレス431と、実行履歴検索データ432との対応関係が示されている。実行履歴検索データ432は、図3に示した木構造により構成される検索データであって、実行履歴における入力値および実行結果が関連付けられた情報を含む検索データである。   FIG. 4C is a conceptual diagram illustrating an example of a data format in the history memory 430. Here, the correspondence relationship between the function address 431 that is the section identification information of the function and the execution history search data 432 is shown. The execution history search data 432 is search data constituted by the tree structure shown in FIG. 3 and includes information associated with input values and execution results in the execution history.

このような場合において、入力値A設定321では、アドレス判定部510により、プログラムカウンタ350から出力された命令アドレスが、入力値設定命令アドレステーブル520における「入力値A設定命令アドレス」と一致したと判定される。   In such a case, in the input value A setting 321, it is assumed that the instruction address output from the program counter 350 by the address determination unit 510 matches the “input value A setting instruction address” in the input value setting instruction address table 520. Determined.

これにより、その一致した入力値設定命令アドレス(入力値A設定命令アドレス)に対応する区間識別情報(関数アドレス1)が、履歴メモリ430に入力される。すなわち、アドレス判定部510により、区間識別情報(関数アドレス1)を実行データ保持部440に保持させて、その保持された「関数アドレス1」が実行履歴検索部410によって履歴メモリ430に入力される。   As a result, the section identification information (function address 1) corresponding to the matched input value setting instruction address (input value A setting instruction address) is input to the history memory 430. That is, the section determination information (function address 1) is held in the execution data holding unit 440 by the address determination unit 510, and the held “function address 1” is input to the history memory 430 by the execution history search unit 410. .

このとき、履歴メモリ430において、アドレス判定部510からの区間識別情報(関数アドレス1)と一致する区間識別情報が保持されていないため、その区間識別情報(関数アドレス1)が履歴メモリ430に登録される。   At this time, since the section identification information that matches the section identification information (function address 1) from the address determination unit 510 is not held in the history memory 430, the section identification information (function address 1) is registered in the history memory 430. Is done.

この後、入力値設定命令により設定された入力値Aおよび入力値Bと、実行結果設定命令により設定された実行結果Cが、区間識別情報(関数アドレス1)に関連付けられて履歴メモリ430に登録される。すなわち、入力設定命令の実行による命令デコーダ320からの入力値設定信号に基づいて、アドレス判定部510によって、入力値Aおよび入力値Bが、実行データ保持部440に保持される。その後、実行結果設定命令の実行による命令デコーダ320からの実行結果設定信号に基づいて、実行結果Cが実行データ保持部440に保持される。   Thereafter, the input value A and the input value B set by the input value setting command and the execution result C set by the execution result setting command are registered in the history memory 430 in association with the section identification information (function address 1). Is done. That is, the input value A and the input value B are held in the execution data holding unit 440 by the address determination unit 510 based on the input value setting signal from the instruction decoder 320 by execution of the input setting command. Thereafter, the execution result C is held in the execution data holding unit 440 based on the execution result setting signal from the instruction decoder 320 by execution of the execution result setting instruction.

そして、戻り命令(return)による命令デコーダ320からの関数戻り信号に基づいて、アドレス判定部510から実行履歴検索部410に実行履歴の登録が指示される。これにより、実行履歴検索部410によって、実行データ保持部440におけるデータ(入力値A、入力値Bおよび実行結果C)が履歴メモリ430に登録される。   Then, based on the function return signal from the instruction decoder 320 based on the return instruction (return), the address determination unit 510 instructs the execution history search unit 410 to register the execution history. As a result, the execution history search unit 410 registers the data (input value A, input value B, and execution result C) in the execution data holding unit 440 in the history memory 430.

このように、入力値設定命令アドレステーブル520を設けることによって、入力値設定命令アドレステーブル520に保持された入力値設定命令アドレスに対応する関数の実行履歴だけを履歴メモリ430に登録することができる。これにより、再利用区間の入力値設定命令アドレスを事前に登録しておくことによって、実行結果が再利用される可能性の高い実行履歴だけを履歴メモリ430に保持させることができる。このため、履歴メモリ430の容量を有効に利用することができる。次に、履歴メモリ430に保持された実行履歴における実行結果を再利用する例について次図を参照して簡単に説明する。   Thus, by providing the input value setting instruction address table 520, only the execution history of the function corresponding to the input value setting instruction address held in the input value setting instruction address table 520 can be registered in the history memory 430. . As a result, by registering the input value setting instruction address of the reuse section in advance, only the execution history with a high possibility that the execution result is reused can be held in the history memory 430. For this reason, the capacity of the history memory 430 can be used effectively. Next, an example of reusing the execution result in the execution history held in the history memory 430 will be briefly described with reference to the following diagram.

[実行結果再利用処理の例]
図5は、本発明の第1の実施の形態におけるデータ処理装置100による実行結果再利用処理に関する手法の一例を示す概念図である。ここでは、図5(a)および(c)は、図4(a)および(c)に対応するため、ここでの説明を省略する。
[Execution result reuse processing example]
FIG. 5 is a conceptual diagram showing an example of a method related to the execution result reuse process by the data processing apparatus 100 according to the first embodiment of the present invention. Here, since FIGS. 5A and 5C correspond to FIGS. 4A and 4C, description thereof is omitted here.

図5(b)は、上位ルーチンにおいて2つの引数を持つ関数が呼出し命令(call)によって呼び出された後に、その関数の命令区間である下位ルーチンにおいて戻り命令(return)によって上位ルーチンに復帰する処理例を示す概念図である。   FIG. 5B shows a process in which a function having two arguments is called by a call instruction (call) in the upper routine and then returned to the upper routine by a return instruction (return) in the lower routine that is the instruction section of the function. It is a conceptual diagram which shows an example.

ここでは、上位ルーチンにおける入力値A設定321および入力値B設定322と、関数の命令区間である下位ルーチンにおける入力値A参照323、入力値B参照324および実行結果C設定325とが示されている。これらは図4に示したものと同様であるため、同一符号を付してここでの説明を省略する。また、ここでは、左から右に時間が経過することとする。   Here, an input value A setting 321 and an input value B setting 322 in the upper routine, and an input value A reference 323, an input value B reference 324, and an execution result C setting 325 in the lower routine that is the function instruction section are shown. Yes. Since these are the same as those shown in FIG. 4, the same reference numerals are given and description thereof is omitted here. Here, time passes from the left to the right.

このような場合において、入力値A設定321では、アドレス判定部510により、プログラムカウンタ350から出力された命令アドレスが、入力値設定命令アドレステーブル520における「入力値A設定命令アドレス」と一致したと判定される。これにより、その一致した入力値設定命令アドレス(入力値A設定命令アドレス)に対応する区間識別情報(関数アドレス1)が、履歴メモリ430に入力される。すなわち、アドレス判定部510により、区間識別情報(関数アドレス1)を実行データ保持部440に保持させて、その保持された関数アドレス1が実行履歴検索部410によって履歴メモリ430に入力される。   In such a case, in the input value A setting 321, it is assumed that the instruction address output from the program counter 350 by the address determination unit 510 matches the “input value A setting instruction address” in the input value setting instruction address table 520. Determined. As a result, the section identification information (function address 1) corresponding to the matched input value setting instruction address (input value A setting instruction address) is input to the history memory 430. That is, the section determination information (function address 1) is held in the execution data holding unit 440 by the address determination unit 510, and the held function address 1 is input to the history memory 430 by the execution history search unit 410.

このとき、履歴メモリ430には、アドレス判定部510からの区間識別情報(関数アドレス1)と同一の「関数アドレス1」が既に保持されているため、これに関連付けられた「実行履歴検索データ1」による実行結果の検索が行われる。   At this time, since the same “function address 1” as the section identification information (function address 1) from the address determination unit 510 is already held in the history memory 430, the “execution history search data 1” associated therewith is stored. The execution result is searched by “”.

また、入力値A設定321では、入力値A設定命令により設定された入力値Aが、履歴メモリ430に入力される。そして、入力値B設定322では、入力値B設定命令により設定された入力値Bが、履歴メモリ430に入力される。すなわち、アドレス判定部510からの指示により、命令デコーダ320からの入力値設定信号に基づいて、入力値Aおよび入力値Bが、実行データ保持部440に順次保持される。そして、実行履歴検索部410により、実行データ保持部440における入力値Aおよび入力値Bが実行履歴検索部410に順次入力される。   In the input value A setting 321, the input value A set by the input value A setting command is input to the history memory 430. In the input value B setting 322, the input value B set by the input value B setting command is input to the history memory 430. That is, in accordance with an instruction from address determination unit 510, input value A and input value B are sequentially held in execution data holding unit 440 based on an input value setting signal from instruction decoder 320. Then, the execution history search unit 410 sequentially inputs the input value A and the input value B in the execution data holding unit 440 to the execution history search unit 410.

これにより、実行履歴検索部410からの入力値Aおよび入力値Bと、履歴メモリ430における「関数アドレス1」に対応する「実行履歴検索データ1」に保持された入力値との比較が順次行われる。ここでは、双方の入力値(入力値AおよびB)が一致するため、区間識別情報(関数アドレス1)および入力値(入力値Aおよび入力値B)に関連付けられた実行結果(実行結果C)が実行履歴検索部410に供給される。すなわち、履歴メモリ430に入力された区間識別情報(関数アドレス1)および入力値(入力値Aおよび入力値B)に関連付けられた実行結果(実行結果C)が履歴メモリ430から出力される。   As a result, the comparison between the input value A and the input value B from the execution history search unit 410 and the input value held in “execution history search data 1” corresponding to “function address 1” in the history memory 430 is sequentially performed. Is called. Here, since both input values (input values A and B) match, the section identification information (function address 1) and the execution result (execution result C) associated with the input value (input value A and input value B). Is supplied to the execution history search unit 410. That is, the section identification information (function address 1) input to the history memory 430 and the execution result (execution result C) associated with the input values (input value A and input value B) are output from the history memory 430.

この後、呼出し命令(call)による命令デコーダ320からの関数呼出し信号に基づいて、アドレス判定部510から実行履歴検索部410に実行結果の再利用指示が通知されることによって、実行結果Cの再利用処理が実行される。すなわち、実行結果出力部420により、入力値設定命令アドレスにより特定される呼出し命令が実行されるときに、実行履歴検索部410により実行結果が抽出された場合には、その抽出された実行結果が実行部330に出力される。   Thereafter, based on the function call signal from the instruction decoder 320 by the call instruction (call), the address determination unit 510 notifies the execution history search unit 410 of the execution result reuse instruction. Usage processing is executed. That is, when the execution result is extracted by the execution history search unit 410 when the execution result output unit 420 executes the call instruction specified by the input value setting instruction address, the extracted execution result is The data is output to the execution unit 330.

このように、入力値設定命令アドレステーブル520を設けることによって、関数アドレス1の関数に対する最初に実行される最先の入力値A設定命令を特定することができる。このため、入力値A設定命令から呼出し命令(call)までの命令群のうちの入力値A設定命令および入力値B設定命令に基づいて設定される入力値(入力値Aおよび入力値B)を特定することができる。これにより、入力値A設定命令アドレスにより特定される呼出し命令(call)の実行までの実行履歴検索期間Tsにおいて、履歴メモリ430における区間識別情報(関数アドレス1)に対応する実行履歴の検索を行うことができる。   Thus, by providing the input value setting instruction address table 520, the earliest input value A setting instruction to be executed first for the function at the function address 1 can be specified. Therefore, the input values (input value A and input value B) set based on the input value A setting instruction and the input value B setting instruction in the instruction group from the input value A setting instruction to the call instruction (call) are determined. Can be identified. Thereby, in the execution history search period Ts until the execution of the call instruction (call) specified by the input value A setting instruction address, the execution history corresponding to the section identification information (function address 1) in the history memory 430 is searched. be able to.

また、実行履歴検索期間Tsにおいて関数アドレス1の実行履歴検索データ1により、実行履歴検索部410からの入力値Aおよび入力値Bに関連付けられた実行結果Cが抽出されることによって、関数の実行に要する時間(短縮期間T1)を削減することができる。ここで、本発明の第1の実施の形態における短縮期間T1と、従来の実行結果再利用処理による短縮期間との差異について以下に図面を参照して簡単に説明する。   Further, the execution result C associated with the input value A and the input value B from the execution history search unit 410 is extracted from the execution history search data 1 of the function address 1 in the execution history search period Ts, thereby executing the function. Time (shortening period T1) can be reduced. Here, the difference between the shortening period T1 in the first embodiment of the present invention and the shortening period by the conventional execution result reuse process will be briefly described with reference to the drawings.

[実行結果再利用処理によって短縮される短縮期間の例]
図6は、実行結果再利用処理により関数の実行時間が短縮される例を示す概念図である。図6(a)は、入力値設定命令アドレステーブル520を設けない従来のデータ処理装置における実行結果の再利用による短縮期間を示す概念図である。図6(b)は、本発明の第1の実施の形態におけるデータ処理装置100における実行結果の再利用による短縮期間を示す概念図である。図6(a)および(b)は、図5(b)に示したものと同様であるため、同一符号を付してここでの説明を省略する。
[Example of shortening period shortened by execution result reuse processing]
FIG. 6 is a conceptual diagram illustrating an example in which the execution time of a function is shortened by the execution result reuse process. FIG. 6A is a conceptual diagram showing a shortened period due to reuse of execution results in a conventional data processing apparatus that does not have an input value setting instruction address table 520. FIG. 6B is a conceptual diagram showing a shortened period due to reuse of the execution result in the data processing apparatus 100 according to the first embodiment of the present invention. 6 (a) and 6 (b) are the same as those shown in FIG. 5 (b), and therefore the same reference numerals are given and description thereof is omitted here.

図6(a)に示す従来技術の場合には、関数の命令区間である下位ルーチンにおいて2つの引数が入力値参照命令の実行によって全て参照(入力値A参照323および入力値B参照324)されるまで、関数の引数である入力値AおよびBを特定することができない。このため、関数の入力値AおよびBが、履歴メモリ430における入力値と全て一致したときであっても、入力値B参照324から戻り命令(return)までの短縮期間T2だけしか関数の実行期間を削減することができない。   In the case of the prior art shown in FIG. 6A, all of the two arguments are referred to by the execution of the input value reference instruction (input value A reference 323 and input value B reference 324) in the lower-level routine that is the instruction section of the function. Until then, the input values A and B that are arguments of the function cannot be specified. For this reason, even when the input values A and B of the function all coincide with the input values in the history memory 430, the execution period of the function is only the shortened period T2 from the input value B reference 324 to the return instruction (return). Can not be reduced.

一方、図6(b)に示す本発明の第1の実施の形態では、図5で述べたとおり、入力値設定命令アドレステーブル520に基づいて特定された入力値A設定321によって、入力値Aおよび入力値Bを特定することができる。すなわち、入力値A設定命令から呼出し命令(call)までの実行履歴検索期間Tsにおける入力値設定命令に基づいて、関数における引数の入力値を特定することができる。   On the other hand, in the first embodiment of the present invention shown in FIG. 6B, the input value A is set by the input value A setting 321 specified based on the input value setting command address table 520 as described in FIG. And the input value B can be specified. That is, the input value of the argument in the function can be specified based on the input value setting command in the execution history search period Ts from the input value A setting command to the call command (call).

これにより、実行履歴検索期間Tsにおいて履歴メモリ430における実行結果の検索を終了させることができるため、実行結果を再利用することができる場合には、関数の実行に要する全ての期間(短縮期間T1)を削減することができる。したがって、本発明の第1の実施の形態では、データ処理装置100における実行結果再利用処理により、従来の短縮期間T2よりも長い短縮期間T1を削減することができる。次に、実行履歴検索部410および履歴メモリ430における両者の区間識別情報が一致した場合において、実行履歴検索部410からの入力値と、履歴メモリ430における入力値とが一致しないときの実行履歴の登録例について次図を参照して説明する。   As a result, the search of the execution result in the history memory 430 can be terminated in the execution history search period Ts. Therefore, when the execution result can be reused, all the periods required for executing the function (shortening period T1) ) Can be reduced. Therefore, in the first embodiment of the present invention, the execution result reuse process in the data processing apparatus 100 can reduce the shortening period T1 longer than the conventional shortening period T2. Next, when both section identification information in the execution history search unit 410 and the history memory 430 match, the input value from the execution history search unit 410 and the input value in the history memory 430 do not match. An example of registration will be described with reference to the following diagram.

[再利用区間の2回目以降の実行による履歴メモリ430に対する実行履歴の登録例]
図7は、本発明の第1の実施の形態におけるデータ処理装置100による2回目以降の関数の実行における実行履歴の登録手法を示す概念図である。ここでは、図7(a)乃至(c)は、図4(a)乃至(c)に対応するため、ここでの詳細な説明を省略する。
[Execution history registration example for the history memory 430 by the second and subsequent executions of the reuse section]
FIG. 7 is a conceptual diagram showing an execution history registration method in the second and subsequent function executions by the data processing apparatus 100 according to the first embodiment of the present invention. Here, since FIGS. 7A to 7C correspond to FIGS. 4A to 4C, detailed description thereof is omitted here.

図7(b)は、図4(b)に示した関数の処理例を示す概念図である。ここでは、関数の引数である入力値が変数であり、履歴メモリ430に保持されていない入力値が設定された場合を想定する。例えば、履歴メモリ430における入力値Aの示す値が「3」であり、ここでの関数の実行により設定された入力値Aの示す値が「5」である場合が該当する。   FIG. 7B is a conceptual diagram illustrating a processing example of the function illustrated in FIG. Here, it is assumed that an input value that is an argument of a function is a variable and an input value that is not held in the history memory 430 is set. For example, the case where the value indicated by the input value A in the history memory 430 is “3” and the value indicated by the input value A set by executing the function here is “5” is applicable.

このような場合において、入力値A設定321では、アドレス判定部510により、プログラムカウンタ350から出力された命令アドレスが、入力値設定命令アドレステーブル520における「入力値A設定命令アドレス」と一致したと判定される。   In such a case, in the input value A setting 321, it is assumed that the instruction address output from the program counter 350 by the address determination unit 510 matches the “input value A setting instruction address” in the input value setting instruction address table 520. Determined.

これにより、その一致した入力値設定命令アドレス(入力値A設定命令アドレス)に対応する区間識別情報(関数アドレス1)が、履歴メモリ430に入力される。すなわち、アドレス判定部510により、区間識別情報(関数アドレス1)を実行データ保持部440に保持させて、その保持された「関数アドレス1」が実行履歴検索部410によって履歴メモリ430に入力される。   As a result, the section identification information (function address 1) corresponding to the matched input value setting instruction address (input value A setting instruction address) is input to the history memory 430. That is, the section determination information (function address 1) is held in the execution data holding unit 440 by the address determination unit 510, and the held “function address 1” is input to the history memory 430 by the execution history search unit 410. .

このとき、履歴メモリ430において、アドレス判定部510からの区間識別情報(関数アドレス1)と一致する区間識別情報が既に保持されているため、これに関連付けられた「実行履歴検索データ1」による実行結果の検索が行われる。   At this time, since the section identification information that matches the section identification information (function address 1) from the address determination unit 510 is already held in the history memory 430, the execution by the “execution history search data 1” associated therewith is executed. A search for results is performed.

また、入力値A設定321では、入力値A設定命令により設定された入力値Aが、履歴メモリ430に入力される。このとき、実行履歴検索部410からの入力値Aと、履歴メモリ430における「実行履歴検索データ1」に保持された入力値とが一致しないため、実行履歴検索部410からの入力値Aが「実行履歴検索データ1」に新たに登録される。   In the input value A setting 321, the input value A set by the input value A setting command is input to the history memory 430. At this time, since the input value A from the execution history search unit 410 and the input value held in the “execution history search data 1” in the history memory 430 do not match, the input value A from the execution history search unit 410 is “ It is newly registered in the “execution history search data 1”.

また、入力値B設定322では、入力値B設定命令により設定された入力値Bが、実行履歴検索部410によって履歴メモリ430に登録される。すなわち、入力値Aおよび入力値Bが関連付けられた「実行履歴検索データ1」が生成される。   Further, in the input value B setting 322, the input value B set by the input value B setting command is registered in the history memory 430 by the execution history search unit 410. That is, “execution history search data 1” in which the input value A and the input value B are associated is generated.

この後、下位ルーチンにおいて関数の処理が実行され、実行結果C設定325において、実行結果設定命令により設定された実行結果Cが、実行履歴検索部410によって履歴メモリ430に登録される。すなわち、入力値A、入力値Bおよび実行結果Cが関連付けられた「実行履歴検索データ1」が生成される。   Thereafter, the processing of the function is executed in the lower-level routine, and the execution result C set by the execution result setting instruction is registered in the history memory 430 by the execution history search unit 410 in the execution result C setting 325. That is, “execution history search data 1” in which the input value A, the input value B, and the execution result C are associated is generated.

このように、同一の関数に対する2回目以降の処理において、入力値設定命令によって設定された入力値が、履歴メモリ430における入力値と一致しない場合には、関数が実行されて、その実行結果および入力値が履歴メモリ430に新たに登録される。なお、ここでは、入力値設定命令によって特定された入力値を登録する例について説明したが、入力値参照命令の実行によって特定された入力値を履歴メモリ430に登録するようにしてもよい。   As described above, when the input value set by the input value setting command does not match the input value in the history memory 430 in the second and subsequent processes for the same function, the function is executed, and the execution result and The input value is newly registered in the history memory 430. Although an example in which the input value specified by the input value setting instruction is registered has been described here, the input value specified by the execution of the input value reference instruction may be registered in the history memory 430.

[データ処理装置100の動作例]
次に本発明の第1の実施の形態におけるデータ処理装置100の動作について図面を参照して説明する。
[Operation Example of Data Processing Device 100]
Next, the operation of the data processing apparatus 100 according to the first embodiment of the present invention will be described with reference to the drawings.

図8は、本発明の第1の実施の形態におけるデータ処理装置100による実行結果再利用方法の処理手順の一例を示すフローチャートである。   FIG. 8 is a flowchart showing an example of the processing procedure of the execution result reuse method by the data processing apparatus 100 according to the first embodiment of the present invention.

まず、フェッチ部310により、主記憶部130または命令キャッシュ210から命令が読み出される(ステップS911)。このとき、アドレス判定部510により、プログラムカウンタ350から出力される命令アドレスが、入力値設定命令アドレステーブル520に登録された入力値設定命令アドレスと一致するか否かが判断される(ステップS912)。そして、入力値設定命令アドレスと一致しない場合には、ステップS911に戻り、入力値設定命令アドレスと一致するまで繰り返される。   First, the fetch unit 310 reads an instruction from the main storage unit 130 or the instruction cache 210 (step S911). At this time, the address determination unit 510 determines whether or not the instruction address output from the program counter 350 matches the input value setting instruction address registered in the input value setting instruction address table 520 (step S912). . If it does not match the input value setting instruction address, the process returns to step S911 and is repeated until it matches the input value setting instruction address.

一方、入力値設定命令アドレスと一致した場合には、アドレス判定部510により、その一致した入力値設定命令アドレスに関連付けられた区間識別情報を入力値設定命令アドレステーブル520から取得される。そして、アドレス判定部510により、その取得された区間識別情報が、実行データ保持部440に保持される(ステップS913)。   On the other hand, if the input value setting instruction address matches, the address determination unit 510 obtains the section identification information associated with the matching input value setting instruction address from the input value setting instruction address table 520. Then, the acquired section identification information is held in the execution data holding unit 440 by the address determination unit 510 (step S913).

続いて、実行履歴検索部410により、履歴メモリ430の検索キーとして、実行データ保持部440に保持された区間識別情報が履歴メモリ430に入力される(ステップS914)。これにより、履歴メモリ430における区間識別情報に対応する複数の実行履歴の検索が開始される。   Subsequently, the execution history search unit 410 inputs the section identification information held in the execution data holding unit 440 as a search key of the history memory 430 (step S914). As a result, a search for a plurality of execution histories corresponding to the section identification information in the history memory 430 is started.

次に、命令デコーダ320により、フェッチ部310から読み出された命令が入力値設定命令であるか否かが判断される(ステップS915)。そして、入力値設定命令であると判断された場合には、命令デコーダ320からの入力値設定信号に基づいて、入力値設定命令により設定された入力値が、アドレス判定部510の指示によって実行データ保持部440に保持される。   Next, the instruction decoder 320 determines whether or not the instruction read from the fetch unit 310 is an input value setting instruction (step S915). If it is determined that the instruction is an input value setting command, the input value set by the input value setting command based on the input value setting signal from the command decoder 320 is executed by the instruction of the address determination unit 510. It is held by the holding unit 440.

この後、実行履歴検索部410により、実行データ保持部440に保持された入力値が、履歴メモリ430に入力される(ステップS921)。なお、1回目のステップS915の判断については、ここでは、必ず入力値設定命令と判断されるため、その判断を省略して、ステップS921に進むようにしてもよい。   Thereafter, the execution history search unit 410 inputs the input value held in the execution data holding unit 440 into the history memory 430 (step S921). Note that the determination in step S915 for the first time is always determined as an input value setting command here, so that the determination may be omitted and the process may proceed to step S921.

続いて、実行履歴検索部410からの区間識別情報に対応する履歴メモリ430における実行履歴について、履歴メモリ430により、実行履歴検索部410からの入力値と、その実行履歴における入力値とが一致するか否かが判断される(ステップS922)。そして、両者の入力値が一致しない場合には、ステップS924の処理に進む。   Subsequently, for the execution history in the history memory 430 corresponding to the section identification information from the execution history search unit 410, the history memory 430 causes the input value from the execution history search unit 410 to match the input value in the execution history. Is determined (step S922). And when both input values do not correspond, it progresses to the process of step S924.

一方、両者の入力値が一致した場合には、履歴メモリ430において、実行履歴における次の引数の入力値を比較するために、次の引数における引数ノードにポインタが進められる(ステップS923)。すなわち、実行履歴検索部410からの入力値と一致する引数ノードがあれば、その引数ノードの右ポインタによって、次の引数ノードが指し示される。次に、フェッチ部310により、主記憶部130または命令キャッシュ210から命令が読み出され(ステップS924)、ステップS915の処理に戻る。   On the other hand, if the two input values match, the pointer is advanced to the argument node in the next argument in the history memory 430 to compare the input value of the next argument in the execution history (step S923). That is, if there is an argument node that matches the input value from the execution history search unit 410, the next argument node is indicated by the right pointer of the argument node. Next, the fetch unit 310 reads an instruction from the main storage unit 130 or the instruction cache 210 (step S924), and the process returns to step S915.

一方、ステップS915の処理において、入力値設定命令でないと判断された場合において、フェッチ部310により読み出された命令が関数の呼出し命令であるか否かが判断される(ステップS916)。そして、呼出し命令でない場合には、ステップS924に進む。   On the other hand, if it is determined in step S915 that the instruction is not an input value setting instruction, it is determined whether the instruction read by the fetch unit 310 is a function call instruction (step S916). If it is not a call instruction, the process proceeds to step S924.

このようにして、関数における全ての引数の入力値が設定されるまで、ステップS915、S916およびS921乃至S924における一連の処理が繰り返し実行される。すなわち、入力値設定命令アドレステーブル520により特定された入力値設定命令から呼出し命令までの関数の入力値設定命令に基づいて設定された入力値が実行データ保持部440に保持されて、その保持された入力値が履歴メモリ430に入力される。   In this way, a series of processes in steps S915, S916 and S921 to S924 are repeatedly executed until the input values of all the arguments in the function are set. That is, the input value set based on the input value setting command of the function from the input value setting command to the call command specified by the input value setting command address table 520 is held in the execution data holding unit 440 and held. The input value is input to the history memory 430.

このように、プログラムカウンタ350から出力される命令アドレスと一致する入力値設定命令アドレスに対応する区間識別情報が実行データ保持部440に保持される。そして、その入力値設定命令アドレスにより特定された入力値設定命令から呼出し命令までの命令群のうちの入力値設定命令に基づいて、実行部から出力された入力値が実行データ保持部440に保持される。これにより、実行履歴検索部410によって、実行データ保持部440における区間識別情報および入力値を用いて、履歴メモリ430における実行履歴に関連付けられた実行結果が検索される。なお、ステップS911乃至S916およびS921乃至S924は、特許請求の範囲に記載の実行履歴検索手順の一例である。   As described above, the section identification information corresponding to the input value setting instruction address that matches the instruction address output from the program counter 350 is held in the execution data holding unit 440. Then, based on the input value setting command in the instruction group from the input value setting command to the call command specified by the input value setting command address, the input value output from the execution unit is held in the execution data holding unit 440. Is done. As a result, the execution history search unit 410 searches for an execution result associated with the execution history in the history memory 430 using the section identification information and the input value in the execution data holding unit 440. Note that steps S911 to S916 and S921 to S924 are an example of an execution history search procedure described in the claims.

一方、ステップS916において関数の呼出し命令と判断された場合には、実行データ保持部440からの区間識別情報および入力値が、履歴メモリ430における区間識別情報に関連付けられた入力値と全て一致したか否かが判断される(ステップS917)。   On the other hand, if it is determined in step S916 that the instruction is a function call instruction, whether the section identification information and the input value from the execution data holding unit 440 all match the input value associated with the section identification information in the history memory 430. It is determined whether or not (step S917).

そして、実行履歴検索部410からの区間識別情報および入力値が全て一致した場合には、実行結果再利用処理が実行される(ステップS925)。すなわち、実行履歴検索部410からの区間識別情報および入力値に対応する履歴メモリ430における実行結果が、実行結果出力部420から出力される。そして、主記憶部130またはレジスタファイル340に書き戻されて、関数の処理をスキップする。なお、S925は、特許請求の範囲に記載の実行結果出力手順の一例である。   If all the section identification information and input values from the execution history search unit 410 match, an execution result reuse process is executed (step S925). That is, the execution result in the history memory 430 corresponding to the section identification information and the input value from the execution history search unit 410 is output from the execution result output unit 420. Then, the data is written back to the main storage unit 130 or the register file 340, and the function processing is skipped. Note that S925 is an example of an execution result output procedure described in the claims.

一方、実行履歴検索部410からの区間識別情報および入力値が全て一致しない場合には、呼出し命令により呼び出された関数が実行されて、その実行結果が実行データ保持部440に保持される(ステップS918)。そして、実行履歴検索部410により、実行データ保持部440に保持された実行結果と、ステップS913およびS921の処理によって保持された区間識別情報および入力値とが履歴メモリ430に登録される(ステップS919)。   On the other hand, if the section identification information from the execution history search unit 410 and the input values do not all match, the function called by the call instruction is executed, and the execution result is held in the execution data holding unit 440 (step). S918). Then, the execution history search unit 410 registers the execution result held in the execution data holding unit 440 and the section identification information and the input value held by the processes in steps S913 and S921 in the history memory 430 (step S919). ).

このように、本発明の第1の実施の形態では、入力値設定命令アドレステーブル520によって、再利用区間である関数の呼出し命令前に、実行データ保持部440に再利用区間の区間識別情報およびその入力値を保持させることができる。これにより、関数が呼び出される前に、実行履歴検索部410によって、その実行データ保持部440に保持された区間識別情報および入力値に基づいて、履歴メモリ430における実行履歴を検索することができる。   As described above, in the first embodiment of the present invention, the input value setting command address table 520 causes the execution data holding unit 440 to store the section identification information of the reuse section and the function call instruction that is the reuse section. The input value can be held. Thus, before the function is called, the execution history search unit 410 can search the execution history in the history memory 430 based on the section identification information and the input value held in the execution data holding unit 440.

このため、実行履歴検索部410からの区間識別情報および入力値と一致する履歴メモリ430における実行履歴に関連付けられた実行結果が抽出された場合には、呼出し命令により呼び出される関数の実行を省略することができる。これにより、実行結果の再利用による関数の処理時間を大幅に削減することができる。   For this reason, when an execution result associated with the execution history in the history memory 430 that matches the section identification information and the input value from the execution history search unit 410 is extracted, the execution of the function called by the call instruction is omitted. be able to. As a result, the processing time of the function due to the reuse of the execution result can be greatly reduced.

<2.第2の実施の形態>
[プログラム解析処理装置の構成例]
図9は、本発明の第2の実施の形態におけるプログラム解析処理装置の機能構成例を示すブロック図である。プログラム解析処理装置600は、ソースプログラム記憶部610と、コンパイル処理部620と、オブジェクトプログラム記憶部660と、再利用区間情報記憶部670とを備える。なお、プログラム解析処理装置600は、特許請求の範囲に記載のプログラム解析処理装置の一例である。
<2. Second Embodiment>
[Configuration example of program analysis processing device]
FIG. 9 is a block diagram illustrating a functional configuration example of the program analysis processing apparatus according to the second embodiment of the present invention. The program analysis processing device 600 includes a source program storage unit 610, a compile processing unit 620, an object program storage unit 660, and a reuse section information storage unit 670. The program analysis processing device 600 is an example of a program analysis processing device described in the claims.

ソースプログラム記憶部610は、コンパイル処理の対象となるソースプログラムを記憶するものである。このソースプログラムは、実行結果が再び利用される再利用区間が含まれるソースプログラムである。このソースプログラム記憶部610は、その記憶されたソースプログラムをコンパイル処理部620に供給する。   The source program storage unit 610 stores a source program to be compiled. This source program is a source program including a reuse section in which the execution result is used again. The source program storage unit 610 supplies the stored source program to the compilation processing unit 620.

コンパイル処理部620は、ソースプログラム記憶部610からのソースプログラムをコンパイルすることによって、機械語プログラムであるオブジェクトプログラムと、再利用区間情報とを生成するものである。ここにいう再利用区間情報とは、再利用区間ごとに、再利用区間における1番目の入力値設定命令の入力値設定命令アドレスと、その再利用区間を識別するための区間識別情報とが関連付けられた情報である。この再利用区間情報は、図2に示した検索開始命令アドレス管理部500における入力値設定命令アドレステーブル520に格納される。   The compile processing unit 620 generates an object program that is a machine language program and reuse section information by compiling the source program from the source program storage unit 610. The reuse section information here refers to, for each reuse section, the input value setting instruction address of the first input value setting instruction in the reuse section and the section identification information for identifying the reuse section. Information. This reuse section information is stored in the input value setting instruction address table 520 in the search start instruction address management unit 500 shown in FIG.

このコンパイル処理部620は、生成されたオブジェクトプログラムをオブジェクトプログラム記憶部660に、生成された再利用区間情報を再利用区間情報記憶部670に記憶させる。このコンパイル処理部620は、プログラム解析部630と、プログラム最適化処理部640と、コード生成部650とを備える。   The compile processing unit 620 stores the generated object program in the object program storage unit 660 and the generated reuse section information in the reuse section information storage unit 670. The compilation processing unit 620 includes a program analysis unit 630, a program optimization processing unit 640, and a code generation unit 650.

プログラム解析部630は、ソースプログラム記憶部610から読み出されたソースプログラムに基づいて、形態素解析や構文解析などの解析処理を実行するものである。このプログラム解析部630は、解析または最適化に適した形式の中間コードとして表現された中間表現によるプログラムを生成して、その生成された中間表現によるプログラムに対して解析処理を実行する。   The program analysis unit 630 executes analysis processing such as morphological analysis and syntax analysis based on the source program read from the source program storage unit 610. The program analysis unit 630 generates a program with an intermediate representation expressed as an intermediate code in a format suitable for analysis or optimization, and executes an analysis process on the generated program with the intermediate representation.

このプログラム解析部630は、再利用候補区間抽出部631および再利用候補区間解析部632を備える。再利用候補区間抽出部631は、プログラムに含まれる複数の命令区間のうち、実行結果が再利用される再利用区間の候補となる再利用候補区間を、そのプログラムから抽出するものである。この再利用候補区間抽出部631は、再利用候補区間として関数の命令区間を抽出する。   The program analysis unit 630 includes a reuse candidate section extraction unit 631 and a reuse candidate section analysis unit 632. The reuse candidate section extraction unit 631 extracts, from the program, a reuse candidate section that is a candidate for a reuse section in which an execution result is reused from among a plurality of command sections included in the program. The reuse candidate section extraction unit 631 extracts a function instruction section as a reuse candidate section.

この再利用候補区間抽出部631は、実行結果が再利用できない関数を再利用候補区間の対象から除外する。この再利用候補区間抽出部631は、命令区間の入力値が全て同じであっても異なる実行結果になる関数、例えば、命令区間に分岐命令を含むような関数を再利用候補区間の対象から除外する。この再利用候補区間抽出部631は、例えば、第1の関数の実行直後に第2の関数が実行されるため、第1の関数の呼出し命令の前に、第2の入力値設定命令が実行されるような第1および第2の関数を再利用候補区間の対象から除外する。また、再利用候補区間抽出部631は、抽出された再利用候補区間を識別するための区間識別情報を、プログラムとともに再利用候補区間解析部632に供給する。   The reuse candidate section extraction unit 631 excludes functions whose execution results cannot be reused from the reuse candidate sections. This reuse candidate section extraction unit 631 excludes functions that have different execution results even if all the input values in the instruction section are the same, for example, functions that include a branch instruction in the instruction section from the reuse candidate section targets. To do. In this reuse candidate section extraction unit 631, for example, the second function is executed immediately after the execution of the first function. Therefore, the second input value setting instruction is executed before the call instruction of the first function. The first and second functions as described above are excluded from the reuse candidate section. In addition, the reuse candidate section extraction unit 631 supplies section identification information for identifying the extracted reuse candidate section to the reuse candidate section analysis unit 632 together with the program.

再利用候補区間解析部632は、再利用候補区間抽出部631により抽出された再利用候補区間の使用態様を解析するものである。この再利用候補区間解析部632は、例えば、関数における引数の個数および型と、1つの関数が実行される回数とを使用態様として関数ごとに解析する。   The reuse candidate section analysis unit 632 analyzes the usage mode of the reuse candidate section extracted by the reuse candidate section extraction unit 631. For example, the reuse candidate section analysis unit 632 analyzes the number and types of arguments in a function and the number of times one function is executed for each function as a usage mode.

この再利用候補区間解析部632は、例えば、関数における引数が採り得る範囲を使用態様の解析結果として出力する。この再利用候補区間解析部632は、その解析結果を、再利用候補区間の区間識別情報およびプログラムとともにプログラム最適化処理部640に供給する。   For example, the reuse candidate section analysis unit 632 outputs a range that can be taken by an argument in the function as an analysis result of the usage mode. The reuse candidate section analysis unit 632 supplies the analysis result to the program optimization processing unit 640 together with the section identification information and program of the reuse candidate section.

プログラム最適化処理部640は、再利用候補区間解析部632から供給されたプログラムに基づいて、プログラムの実行速度を向上させるための最適化や、コードサイズを削減するための最適化などのプログラム最適化処理を実行するものである。このプログラム最適化処理部640は、再利用度生成部641と、再利用区間抽出部642と、再利用区間情報生成部643とを備える。   Based on the program supplied from the reuse candidate section analysis unit 632, the program optimization processing unit 640 performs program optimization such as optimization for improving the execution speed of the program and optimization for reducing the code size. The process is executed. The program optimization processing unit 640 includes a reuse degree generation unit 641, a reuse section extraction unit 642, and a reuse section information generation unit 643.

再利用度生成部641は、再利用候補区間解析部632から供給された解析結果に基づいて、再利用候補区間の実行結果が再び利用される度合いを示す再利用度を生成するものである。すなわち、再利用度生成部641は、複数回実行される命令区間における処理の実行ごとの入力値が互いに一致する度合いを示す再利用度を、命令区間の使用態様に基づいて命令区間ごとに生成する。   Based on the analysis result supplied from the reuse candidate section analysis unit 632, the reuse degree generation unit 641 generates a reuse degree indicating the degree to which the execution result of the reuse candidate section is reused. In other words, the reuse level generation unit 641 generates a reuse level for each instruction interval based on the usage of the instruction interval, indicating the degree to which the input values for each execution of processing in the instruction interval executed a plurality of times match each other. To do.

この再利用度生成部641は、例えば、1つの再利用候補区間が実行される実行回数に応じて再利用度を生成する。この場合において、再利用度生成部641は、例えば、実行回数が大きいほど、再利用度を大きく設定する。また、再利用度生成部641は、例えば、再利用候補区間の入力値が採り得る範囲に応じて、その再利用候補区間に対する再利用度を生成する。この場合には、再利用度は、例えば、その採り得る範囲の数の逆数に定数を乗算することによって算出される。これにより、再利用候補区間の再利用度が大きいほど、その再利用候補区間の実行結果は再利用される確率が高いことを示す。   For example, the reuse degree generation unit 641 generates a reuse degree according to the number of executions of one reuse candidate section. In this case, for example, the reuse level generation unit 641 sets the reuse level larger as the number of executions is larger. In addition, the reuse degree generation unit 641 generates a reuse degree for the reuse candidate section, for example, according to a range that can be taken by the input value of the reuse candidate section. In this case, the degree of reuse is calculated, for example, by multiplying a reciprocal of the number of possible ranges by a constant. Thus, the larger the reuse degree of the reuse candidate section, the higher the probability that the reuse result of the reuse candidate section will be reused.

また、再利用度生成部641は、生成された再利用候補区間に関する再利用度を、プログラムおよび再利用候補区間の区間識別情報とともに再利用区間抽出部642に供給する。なお、再利用度生成部641は、特許請求の範囲に記載の再利用度生成部の一例である。   In addition, the reuse degree generation unit 641 supplies the reuse degree related to the generated reuse candidate section to the reuse section extraction unit 642 together with the program and the section identification information of the reuse candidate section. The reuse level generation unit 641 is an example of a reuse level generation unit described in the claims.

再利用区間抽出部642は、再利用候補区間解析部632により抽出された複数の再利用候補区間のうち、再利用度生成部641からの各再利用候補区間に関する再利用度に基づいて、再利用区間を抽出するものである。この再利用区間抽出部642は、例えば、再利用度に関する一定の閾値(再利用閾値)以上である再利用候補区間を再利用区間として抽出する。   The reuse section extraction unit 642 re-uses the reuse section based on the reuse degree related to each reuse candidate section from the reuse degree generation section 641 among the plurality of reuse candidate sections extracted by the reuse candidate section analysis unit 632. This is to extract the usage section. For example, the reuse section extraction unit 642 extracts a reuse candidate section that is equal to or greater than a certain threshold (reuse threshold) regarding the degree of reuse as a reuse section.

また、再利用区間抽出部642は、その抽出された再利用区間に関する区間識別情報を、プログラムとともに再利用区間情報生成部643に供給する。なお、再利用区間抽出部642は、例えば、図2に示した履歴メモリ430における区間識別情報ごとの実行履歴を削除する際の優先度を再利用度に基づいて生成するようにしてもよい。この場合、再利用区間抽出部642は、再利用度が高いほど優先度が低くなるように優先度を生成する。   In addition, the reuse interval extraction unit 642 supplies the extracted interval identification information regarding the reuse interval to the reuse interval information generation unit 643 together with the program. Note that the reuse section extraction unit 642 may generate, for example, the priority when deleting the execution history for each section identification information in the history memory 430 illustrated in FIG. 2 based on the degree of reuse. In this case, the reuse section extraction unit 642 generates the priority so that the higher the reuse degree, the lower the priority.

再利用区間情報生成部643は、再利用区間抽出部642により抽出された再利用区間の区間識別情報と、その再利用区間における最先の入力値設定命令アドレスとを関連付けて再利用区間情報として生成するものである。この再利用区間情報生成部643は、再利用区間抽出部642により抽出された再利用区間における入力値設定命令のうち、時間軸上において最初に実行される最先の入力値設定命令のメモリアドレスである入力値設定命令アドレスを再利用区間ごとに抽出する。   The reuse section information generation unit 643 associates the section identification information of the reuse section extracted by the reuse section extraction unit 642 and the earliest input value setting command address in the reuse section as reuse section information. Is to be generated. The reuse section information generation unit 643 is the memory address of the earliest input value setting instruction that is executed first on the time axis among the input value setting instructions in the reuse section extracted by the reuse section extraction unit 642. The input value setting instruction address is extracted for each reuse section.

また、再利用区間情報生成部643は、その抽出された最先の入力値設定命令アドレスおよび区間識別情報を再利用区間ごとに関連付けた再利用区間識別情報を生成する。また、再利用区間情報生成部643は、その生成された再利用区間識別情報を再利用区間情報記憶部670に記憶させる。なお、ここでは、再利用区間情報として、区間識別情報ごとに最先の入力値設定命令アドレスを関連付けて生成する例について説明したが、区間識別情報ごとに、全ての入力値設定命令アドレスを関連付けて生成するようにしてもよい。   Further, the reuse section information generation unit 643 generates reuse section identification information in which the extracted input value setting command address and section identification information extracted are associated with each reuse section. Further, the reuse interval information generation unit 643 stores the generated reuse interval identification information in the reuse interval information storage unit 670. Here, the example in which the earliest input value setting command address is associated with each piece of section identification information has been described as the reuse section information. However, all input value setting instruction addresses are associated with each piece of section identification information. May be generated.

また、再利用区間情報生成部643は、例えば、再利用区間抽出部642から供給されたプログラムに対して、再利用区間における最先の入力値設定命令からその再利用区間の呼出し命令までの命令群の数が極力少なくなるように、命令コードを並び替える。これにより、図2に示した履歴メモリ430における実行履歴の検索期間を短縮することができるため、データ処理装置100における履歴メモリ430による消費電力を低減することができる。   In addition, the reuse interval information generation unit 643, for example, with respect to the program supplied from the reuse interval extraction unit 642, commands from the earliest input value setting command in the reuse interval to the call instruction of the reuse interval Rearrange the instruction codes so that the number of groups is as small as possible. Thereby, the search period of the execution history in the history memory 430 shown in FIG. 2 can be shortened, so that the power consumption by the history memory 430 in the data processing apparatus 100 can be reduced.

また、再利用区間情報生成部643は、その命令コードが並び替えられたプログラムをコード生成部650に供給する。なお、再利用区間情報生成部643は、特許請求の範囲に記載の再利用区間情報生成部の一例である。   In addition, the reuse section information generation unit 643 supplies the code generation unit 650 with a program in which the instruction code is rearranged. The reuse section information generation unit 643 is an example of a reuse section information generation unit described in the claims.

なお、再利用区間情報生成部643は、再利用度生成部641からの再利用度に基づいて、履歴メモリ430の実行履歴を削除する際の優先度と、区間識別情報と、最先の入力値設定命令アドレスとを関連付けて再利用区間情報を生成するようにしてもよい。   Note that the reuse section information generation unit 643 uses the priority when deleting the execution history of the history memory 430, the section identification information, and the earliest input based on the reuse degree from the reuse degree generation unit 641. The reuse section information may be generated in association with the value setting instruction address.

これにより、履歴メモリ430の容量が一定の条件を超えた場合には、実行履歴検索部410により、その優先度に従って履歴メモリ430の実行履歴を削除させることができる。このため、再利用度の高い実行履歴を優先的に履歴メモリ430に保持させることができる。   As a result, when the capacity of the history memory 430 exceeds a certain condition, the execution history search unit 410 can delete the execution history of the history memory 430 according to the priority. For this reason, it is possible to preferentially hold an execution history with a high degree of reuse in the history memory 430.

コード生成部650は、再利用区間情報生成部643から供給されたプログラムに基づいて、機械語プログラムのコードであるオブジェクトプログラムを生成するものである。このコード生成部650は、その生成されたオブジェクトプログラムをオブジェクトプログラム記憶部660に記憶させる。   The code generation unit 650 generates an object program that is a code of a machine language program based on the program supplied from the reuse section information generation unit 643. The code generation unit 650 stores the generated object program in the object program storage unit 660.

オブジェクトプログラム記憶部660は、コード生成部650から出力されたオブジェクトプログラムを記憶するものである。このオブジェクトプログラム記憶部660に記憶されたオブジェクトプログラムが、図1に示した主記憶部130に記憶される。   The object program storage unit 660 stores the object program output from the code generation unit 650. The object program stored in the object program storage unit 660 is stored in the main storage unit 130 shown in FIG.

再利用区間情報記憶部670は、再利用区間情報生成部643から出力された再利用区間情報を記憶するものである。この再利用区間情報記憶部670に記憶された再利用区間情報が図2に示した入力値設定命令アドレステーブル520に転送される。   The reuse section information storage unit 670 stores the reuse section information output from the reuse section information generation unit 643. The reuse section information stored in the reuse section information storage unit 670 is transferred to the input value setting command address table 520 shown in FIG.

このように、再利用度生成部641を設けることによって、複数回実行される命令区間の使用態様に基づいて再利用度が生成されるため、複数の命令区間のうち、実行結果が再利用される確率の高い命令区間を再利用区間として抽出することができる。また、再利用区間情報生成部643を設けることによって、その抽出された再利用区間ごとに再利用区間における入力値設定命令アドレスおよび区間識別情報が関連付けられた再利用区間情報を生成することができる。   As described above, by providing the reuse level generation unit 641, the reuse level is generated based on the usage mode of the command interval that is executed a plurality of times. Therefore, the execution result is reused among the plurality of command intervals. It is possible to extract an instruction section having a high probability of being used as a reuse section. Further, by providing the reuse section information generation unit 643, it is possible to generate reuse section information in which the input value setting command address and section identification information in the reuse section are associated with each extracted reuse section. .

[プログラム解析処理装置600の動作例]
次に本発明の第2の実施の形態におけるプログラム解析処理装置600の動作について図面を参照して説明する。
[Operation Example of Program Analysis Processing Device 600]
Next, the operation of the program analysis processing apparatus 600 according to the second embodiment of the present invention will be described with reference to the drawings.

図10は、本発明の第2の実施の形態におけるプログラム解析処理装置600のプログラム解析処理方法の処理手順の一例を示すフローチャートである。   FIG. 10 is a flowchart showing an example of the processing procedure of the program analysis processing method of the program analysis processing device 600 according to the second embodiment of the present invention.

まず、再利用候補区間抽出部631により、ソースプログラム記憶部610からソースプログラムが読み出される(ステップS931)。そして、再利用候補区間抽出部631により、プログラムに含まれる複数の関数である命令区間のうち、再利用候補区間となる関数が抽出される(ステップS932)。   First, the reuse candidate section extraction unit 631 reads the source program from the source program storage unit 610 (step S931). Then, the reuse candidate section extraction unit 631 extracts a function that becomes a reuse candidate section from among the instruction sections that are a plurality of functions included in the program (step S932).

続いて、再利用候補区間解析部632により、再利用候補区間抽出部631において抽出された再利用候補区間に関する使用態様が解析される(ステップS933)。この後、再利用度生成部641により、再利用候補区間解析部632により解析された再利用候補区間の使用態様に基づいて、再利用候補区間ごとに再利用度が生成される(ステップS934)。なお、ステップS934は、特許請求の範囲に記載の再利用度生成手順の一例である。   Subsequently, the reuse candidate section analysis unit 632 analyzes the usage mode related to the reuse candidate section extracted by the reuse candidate section extraction unit 631 (step S933). Thereafter, the reuse degree is generated for each reuse candidate section by the reuse degree generation unit 641 based on the usage mode of the reuse candidate section analyzed by the reuse candidate section analysis unit 632 (step S934). . Note that step S934 is an example of a reuse degree generation procedure described in the claims.

そして、再利用区間抽出部642により、再利用候補区間ごとの再利用度に基づいて、再利用区間が抽出される(ステップS935)。次に、再利用区間情報生成部643により、再利用区間における最先の入力値設定命令アドレスと、その再利用区間の区間識別情報とが再利用区間ごとに関連付けられた再利用区間情報が生成される(ステップS936)。そして、再利用区間情報生成部643により、その生成された再利用区間情報が再利用区間情報記憶部670に記憶される。なお、ステップS936は、特許請求の範囲に記載の再利用区間情報生成手順の一例である。   Then, the reuse section extraction unit 642 extracts a reuse section based on the reuse degree for each reuse candidate section (step S935). Next, the reuse section information generation unit 643 generates reuse section information in which the earliest input value setting instruction address in the reuse section and the section identification information of the reuse section are associated with each reuse section. (Step S936). Then, the reuse interval information generation unit 643 stores the generated reuse interval information in the reuse interval information storage unit 670. Note that step S936 is an example of a reuse section information generation procedure described in the claims.

その後、コード生成部650により、再利用区間情報生成部643から供給されたプログラムに基づいてオブジェクトプログラムが生成されて、その生成されたオブジェクトプログラムがオブジェクトプログラム記憶部660に記憶される(ステップS937)。   Thereafter, the code generation unit 650 generates an object program based on the program supplied from the reuse section information generation unit 643, and the generated object program is stored in the object program storage unit 660 (step S937). .

このように、本発明の第2の実施の形態では、再利用度の高い再利用区間である関数における入力値設定命令アドレスおよびその区間識別情報が関連付けられた再利用区間情報を生成することができる。これにより、図2に示した履歴メモリ430において実行結果が再利用される可能性の高い関数に対する実行履歴が保持されるため、実行結果の再利用処理による実行時間の削減を向上させることができる。   As described above, in the second embodiment of the present invention, it is possible to generate reuse section information in which an input value setting instruction address in a function that is a reuse section having a high reuse degree and its section identification information are associated with each other. it can. Thereby, since the execution history for the function whose execution result is highly likely to be reused is held in the history memory 430 shown in FIG. 2, the reduction in execution time by the execution result reuse processing can be improved. .

なお、本発明の第1および第2の実施の形態では、プログラム解析処理装置600によって生成された再利用区間情報を、データ処理装置100における入力値設定命令アドレステーブル520に登録する例について説明したが、これに限られるものではない。例えば、データ処理装置100において、主記憶部130に記憶されたプログラムを実行しているときに、入力値設定命令アドレステーブル520に再利用区間情報を登録するようにしてもよい。そこで、プログラムの実行中に入力値設定命令アドレステーブル520に入力値設定命令アドレスおよび区間識別情報を登録するように改良したデータ処理装置100を、第3の実施の形態として以下に説明する。   In the first and second embodiments of the present invention, the example in which the reuse section information generated by the program analysis processing device 600 is registered in the input value setting instruction address table 520 in the data processing device 100 has been described. However, it is not limited to this. For example, in the data processing apparatus 100, the reuse section information may be registered in the input value setting command address table 520 while executing a program stored in the main storage unit 130. Accordingly, a data processing apparatus 100 improved so as to register the input value setting instruction address and the section identification information in the input value setting instruction address table 520 during the execution of the program will be described below as a third embodiment.

<3.第3の実施の形態>
[データ処理装置100の構成例]
図11は、本発明の第3の実施の形態におけるデータ処理装置100の一構成例を示すブロック図である。ここでは、図1に示したデータ処理装置100のうち、データ処理部300、実行結果再利用処理部700および検索開始命令アドレス管理部800が示されている。ここでは、データ処理部300は、図2と同じものであるため、図2と同一符号を付してここでの説明を省略する。
<3. Third Embodiment>
[Configuration Example of Data Processing Device 100]
FIG. 11 is a block diagram showing a configuration example of the data processing apparatus 100 according to the third embodiment of the present invention. Here, of the data processing apparatus 100 shown in FIG. 1, a data processing unit 300, an execution result reuse processing unit 700, and a search start instruction address management unit 800 are shown. Here, since the data processing unit 300 is the same as that in FIG. 2, the same reference numerals as those in FIG.

実行結果再利用処理部700は、実行履歴検索部710と、実行結果出力部720と、履歴メモリ730と、実行データ保持部740とを備える。実行履歴検索部710、実行結果出力部720、履歴メモリ730および実行データ保持部740は、図2に示した実行履歴検索部410、実行結果出力部420、履歴メモリ430および実行データ保持部440に対応する。また、実行結果出力部720および履歴メモリ730の構成は、図2に示した実行結果出力部420および履歴メモリ430と同様のものであるため、ここでの説明を省略する。   The execution result reuse processing unit 700 includes an execution history search unit 710, an execution result output unit 720, a history memory 730, and an execution data holding unit 740. The execution history search unit 710, the execution result output unit 720, the history memory 730, and the execution data holding unit 740 are added to the execution history search unit 410, the execution result output unit 420, the history memory 430, and the execution data holding unit 440 shown in FIG. Correspond. The configuration of the execution result output unit 720 and the history memory 730 is the same as that of the execution result output unit 420 and the history memory 430 shown in FIG.

検索開始命令アドレス管理部800は、アドレス判定部810と、入力値設定命令アドレステーブル820と、入力値設定命令アドレス出力部830と、設定入力値保持部840と、検索開始命令決定部850とを備える。アドレス判定部810および入力値設定命令アドレステーブル820は、図2に示したアドレス判定部510および入力値設定命令アドレステーブル520に対応する。   The search start command address management unit 800 includes an address determination unit 810, an input value setting command address table 820, an input value setting command address output unit 830, a set input value holding unit 840, and a search start command determining unit 850. Prepare. Address determination unit 810 and input value setting instruction address table 820 correspond to address determination unit 510 and input value setting instruction address table 520 shown in FIG.

ここでは、入力値設定命令アドレスおよび区間識別情報を入力値設定命令アドレステーブル820に登録する機能を中心に説明する。また、入力値設定命令アドレステーブル820に登録された入力値設定命令アドレスに基づいて、履歴メモリ730における実行結果を検索する手法については、図2と同様の構成により実現されるため、ここでの説明を省略する。   Here, the description will focus on the function of registering the input value setting command address and the section identification information in the input value setting command address table 820. Further, the method for searching the execution result in the history memory 730 based on the input value setting command address registered in the input value setting command address table 820 is realized by the same configuration as in FIG. Description is omitted.

実行データ保持部740は、アドレス判定部810からの指示に従って、実行結果再利用処理に用いるデータを保持して、その保持されたデータを実行履歴検索部710、設定入力値保持部840および検索開始命令決定部850に出力するものである。この実行データ保持部740は、アドレス判定部810からの入力値設定信号に基づく指示に従って、実行部330からの出力を、設定入力値として保持する。   The execution data holding unit 740 holds data used for the execution result reuse process in accordance with an instruction from the address determination unit 810, and uses the held data as an execution history search unit 710, a set input value holding unit 840, and a search start. This is output to the instruction determination unit 850. The execution data holding unit 740 holds the output from the execution unit 330 as a set input value in accordance with an instruction based on the input value setting signal from the address determination unit 810.

この実行データ保持部740は、時間軸上においてその設定入力値を保持した順番を、入力値設定命令により入力値が設定された設定順番として、その設定入力値とともに保持する。この実行データ保持部740は、例えば、アドレス判定部810からの入力値設定信号に基づく指示に従って、最初に保持した設定入力値を、1番目の設定入力値として保持する。   The execution data holding unit 740 holds the order in which the set input values are held on the time axis together with the set input values as the set order in which the input values are set by the input value setting command. For example, the execution data holding unit 740 holds the first set input value as the first set input value in accordance with an instruction based on the input value setting signal from the address determination unit 810, for example.

また、実行データ保持部740は、アドレス判定部810からの関数呼出し信号に基づく指示に従って、その保持された設定入力値およびその設定順番を、設定入力値保持部840に出力する。この実行データ保持部740は、例えば、設定入力値に含まれる格納場所およびその設定順番を、設定入力値保持部840に出力する。ここにいう格納場所とは、レジスタファイル340のレジスタ番号または主記憶部130のメモリアドレスのことをいう。   Further, the execution data holding unit 740 outputs the held setting input values and the setting order thereof to the setting input value holding unit 840 according to an instruction based on the function call signal from the address determination unit 810. For example, the execution data holding unit 740 outputs the storage location included in the set input value and the setting order thereof to the set input value holding unit 840. The storage location here refers to the register number of the register file 340 or the memory address of the main storage unit 130.

このとき、実行データ保持部740は、同一の格納場所を示す複数の設定入力値がある場合には、その複数の設定入力値のうち、最も大きい数(最大)の設定順番の設定入力値およびその設定順番だけを設定入力値保持部840に出力する。すなわち、実行データ保持部740は、同一の格納場所を示す複数の設定入力値がある場合には、その複数の設定入力値のうち、最後に設定された設定入力値およびその設定順番を出力する。あるいは、実行データ保持部740は、同一の格納場所を示す設定入力値を設定入力値保持部840に新たに保持させる場合には、その新たな設定入力値の設定順番を、既に保持されている設定入力値の設定順番の保持領域に重ねて保持させる(上書きする)。   At this time, when there are a plurality of setting input values indicating the same storage location, the execution data holding unit 740 includes the setting input values of the largest number (maximum) setting order among the plurality of setting input values and Only the setting order is output to the setting input value holding unit 840. That is, when there are a plurality of setting input values indicating the same storage location, the execution data holding unit 740 outputs the last set input value and the setting order among the plurality of setting input values. . Alternatively, the execution data holding unit 740 already holds the setting order of the new setting input value when the setting input value indicating the same storage location is newly held in the setting input value holding unit 840. Overlays (overwrites) the setting input value in the setting order holding area.

このように、同一の格納場所を示す複数の設定入力値のうち、最大の設定順番の設定入力値のみを設定入力値保持部840に保持させることによって、関数の入力値として参照されなかった入力値設定命令を登録の対象から除外することができる。これは、命令デコーダ320では、命令に示されたデータの格納先によってその命令が入力値設定命令か否かを判断するが、関数の命令区間以外では、関数の入力値が格納されるレジスタは、他の処理によっても参照される。このため、同一の格納場所を示す設定入力値のうち、関数の呼出し命令の直前に設定された設定入力値以外は、関数の入力値の設定ではないと判断できるからである。   In this way, the input that is not referred to as the input value of the function by causing the setting input value holding unit 840 to hold only the setting input value in the maximum setting order among the plurality of setting input values indicating the same storage location. Value setting instructions can be excluded from registration targets. This is because the instruction decoder 320 determines whether or not the instruction is an input value setting instruction depending on the storage location of the data indicated in the instruction. It is also referred to by other processes. For this reason, it can be determined that the setting input values indicating the same storage location other than the setting input value set immediately before the function call instruction are not the setting of the function input value.

また、実行データ保持部740は、アドレス判定部810からの関数呼出し信号に基づく指示に従って、例えば、実行部330からの出力を、関数の区間識別情報として保持する。この実行データ保持部740は、アドレス判定部810からの関数呼出し信号に基づく指示に従って、例えば、プログラムカウンタ350からの命令アドレスを、関数の区間識別情報として保持する。   Further, the execution data holding unit 740 holds, for example, an output from the execution unit 330 as function section identification information in accordance with an instruction based on the function call signal from the address determination unit 810. The execution data holding unit 740 holds, for example, an instruction address from the program counter 350 as function section identification information in accordance with an instruction based on the function call signal from the address determination unit 810.

また、実行データ保持部740は、アドレス判定部810からの入力値参照信号に基づく指示に従って、実行部330からの出力を、参照入力値として保持する。また、実行データ保持部740は、アドレス判定部810からの実行結果設定信号に基づく指示に従って、実行部330からの出力を、関数の実行結果として保持する。   The execution data holding unit 740 holds the output from the execution unit 330 as a reference input value in accordance with an instruction based on the input value reference signal from the address determination unit 810. Further, the execution data holding unit 740 holds the output from the execution unit 330 as the execution result of the function in accordance with the instruction based on the execution result setting signal from the address determination unit 810.

また、実行データ保持部740は、アドレス判定部810からの関数戻り信号に基づく指示に従って、その保持された区間識別情報および参照入力値を、検索開始命令決定部850に出力する。この実行データ保持部740は、例えば、アドレス判定部810からの関数戻り信号に基づく指示に従って、参照入力値に示される格納場所を検索開始命令決定部850に出力する。   The execution data holding unit 740 outputs the held section identification information and reference input value to the search start instruction determination unit 850 in accordance with an instruction based on the function return signal from the address determination unit 810. For example, the execution data holding unit 740 outputs the storage location indicated by the reference input value to the search start instruction determination unit 850 in accordance with an instruction based on the function return signal from the address determination unit 810.

また、実行データ保持部740は、アドレス判定部810からの関数戻り信号に基づく指示に従って、その保持された区間識別情報、参照入力値および実行結果を、実行履歴検索部710に出力する。   The execution data holding unit 740 outputs the held section identification information, reference input value, and execution result to the execution history search unit 710 in accordance with an instruction based on the function return signal from the address determination unit 810.

また、実行データ保持部740は、アドレス判定部810からの関数戻り信号に基づく指示に従って、その保持されたデータを実行履歴検索部710に出力した後に、実行データ保持部740に保持されたデータを消去する。   Further, the execution data holding unit 740 outputs the held data to the execution history search unit 710 in accordance with an instruction based on the function return signal from the address determination unit 810, and then stores the data held in the execution data holding unit 740. to erase.

アドレス判定部810は、プログラムに含まれる複数の命令区間である関数の入力値設定命令アドレスを入力値設定命令アドレス出力部830に保持させるものである。このアドレス判定部810は、命令デコーダ320から供給される入力値設定信号に基づいて、プログラムカウンタ350から出力された命令アドレスを、入力値命令アドレスとして入力値設定命令アドレス出力部830に保持させる。これとともに、このアドレス判定部810は、命令デコーダ320からの入力値設定信号に基づいて、実行部330から出力される入力値を、設定入力値として実行データ保持部740に保持させる。   The address determination unit 810 causes the input value setting instruction address output unit 830 to hold an input value setting instruction address of a function that is a plurality of instruction sections included in the program. The address determination unit 810 causes the input value setting instruction address output unit 830 to hold the instruction address output from the program counter 350 based on the input value setting signal supplied from the instruction decoder 320 as an input value instruction address. At the same time, the address determination unit 810 causes the execution data holding unit 740 to hold the input value output from the execution unit 330 based on the input value setting signal from the instruction decoder 320 as a set input value.

また、アドレス判定部810は、例えば、命令デコーダ320から供給される関数呼出し信号に基づいて、関数の命令区間である先頭アドレスを区間識別情報として実行データ保持部740に保持させる。このアドレス判定部810は、例えば、命令デコーダ320からの関数呼出し信号に基づいて、プログラムカウンタ350からの命令アドレスを区間識別情報として実行データ保持部740に保持させる。あるいは、このアドレス判定部810は、例えば、命令デコーダ320からの関数呼出し信号に基づいて、実行部330から出力される関数の先頭アドレスを区間識別情報として実行データ保持部440に保持させる。   For example, the address determination unit 810 causes the execution data holding unit 740 to hold, as section identification information, the start address that is the instruction section of the function based on the function call signal supplied from the instruction decoder 320. For example, based on the function call signal from the instruction decoder 320, the address determination unit 810 causes the execution data holding unit 740 to hold the instruction address from the program counter 350 as section identification information. Alternatively, the address determination unit 810 causes the execution data holding unit 440 to hold the start address of the function output from the execution unit 330 as section identification information based on a function call signal from the instruction decoder 320, for example.

また、アドレス判定部810は、命令デコーダ320から供給される入力値参照信号に基づいて、実行部330から出力される入力値を、参照入力値として実行データ保持部740に保持させる。また、アドレス判定部810は、命令デコーダ320から供給される実行結果設定信号に基づいて、実行部330から出力された実行結果を実行データ保持部740に保持させる。   Further, the address determination unit 810 causes the execution data holding unit 740 to hold the input value output from the execution unit 330 based on the input value reference signal supplied from the instruction decoder 320 as a reference input value. The address determination unit 810 also causes the execution data holding unit 740 to hold the execution result output from the execution unit 330 based on the execution result setting signal supplied from the instruction decoder 320.

入力値設定命令アドレステーブル820は、命令区間である関数を識別するための区間識別情報ごとに、その関数における入力値を設定するための入力値設定命令のアドレスである入力値設定命令アドレスを保持するものである。この入力値設定命令アドレステーブル820は、例えば、関数における入力値を設定するための入力値設定命令のうち、最初に入力値を設定する最先の入力値設定命令のアドレスを入力値設定命令アドレスとして区間識別情報ごとに保持する。   The input value setting instruction address table 820 holds, for each section identification information for identifying a function that is an instruction section, an input value setting instruction address that is an address of an input value setting instruction for setting an input value in the function. To do. This input value setting command address table 820 is, for example, the address of the earliest input value setting command for setting the input value first among the input value setting commands for setting the input value in the function. Is stored for each section identification information.

また、入力値設定命令アドレステーブル820は、その保持されたデータをアドレス判定部810に出力する。なお、入力値設定命令アドレステーブル820には、関数が複数の引数を持つ場合には、その関数の区間識別情報ごとに、複数の引数に対応する入力値設定命令アドレスを複数保持させるようにしてもよい。また、入力値設定命令アドレステーブル820は、特許請求の範囲に記載の入力値設定命令アドレステーブルの一例である。   Further, the input value setting instruction address table 820 outputs the held data to the address determination unit 810. If the function has a plurality of arguments, the input value setting instruction address table 820 stores a plurality of input value setting instruction addresses corresponding to the plurality of arguments for each section identification information of the function. Also good. The input value setting command address table 820 is an example of the input value setting command address table described in the claims.

入力値設定命令アドレス出力部830は、アドレス判定部810から供給された入力値設定命令アドレスと、検索開始命令決定部850から供給された区間識別情報とを関連付けて入力値設定命令アドレステーブル820に出力するものである。この入力値設定命令アドレス出力部830は、アドレス判定部810から供給された入力値設定命令アドレスを保持する。   The input value setting command address output unit 830 associates the input value setting command address supplied from the address determination unit 810 with the section identification information supplied from the search start command determination unit 850 in the input value setting command address table 820. Output. The input value setting command address output unit 830 holds the input value setting command address supplied from the address determination unit 810.

この入力値設定命令アドレス出力部830は、時間軸上においてその入力値設定命令アドレスを保持した順番である設定順番を、その入力値設定命令アドレスとともに保持する。この実行データ保持部740は、例えば、アドレス判定部810から供給された最初の入力値設定命令アドレスを1番目の入力値設定命令アドレスとして保持する。   The input value setting command address output unit 830 holds the setting order, which is the order in which the input value setting command address is held on the time axis, together with the input value setting command address. The execution data holding unit 740 holds, for example, the first input value setting command address supplied from the address determination unit 810 as the first input value setting command address.

また、入力値設定命令アドレス出力部830は、その保持された入力値設定命令アドレスのうち、検索開始命令決定部850により決定された設定順番の入力値設定命令アドレスと、検索開始命令決定部850からの区間識別情報とを関連付けて出力する。すなわち、入力値設定命令アドレス出力部830は、関数における入力値設定命令アドレスと、その関数の区間識別情報である関数の先頭アドレスとを関連付けて、関数ごとに入力値設定命令アドレステーブル820に登録する。   The input value setting instruction address output unit 830 also sets the input value setting instruction address in the setting order determined by the search start instruction determining unit 850 and the search start instruction determining unit 850 among the held input value setting instruction addresses. Are output in association with the section identification information from. That is, the input value setting instruction address output unit 830 associates the input value setting instruction address in the function with the start address of the function that is the section identification information of the function, and registers it in the input value setting instruction address table 820 for each function. To do.

また、入力値設定命令アドレス出力部830は、アドレス判定部810からの関数戻り信号に基づく指示に従って、その保持されたデータを登録した後に、入力値設定命令アドレス出力部830に保持されたデータを消去する。   The input value setting command address output unit 830 registers the held data in accordance with an instruction based on the function return signal from the address determination unit 810, and then stores the data held in the input value setting command address output unit 830. to erase.

設定入力値保持部840は、実行データ保持部740から出力された設定入力値およびその設定順番を関連付けて保持するものである。この設定入力値保持部840は、その保持された設定入力値およびその設定順番を検索開始命令決定部850に出力する。   The setting input value holding unit 840 holds the setting input value output from the execution data holding unit 740 and the setting order in association with each other. The set input value holding unit 840 outputs the held set input values and the setting order to the search start instruction determining unit 850.

検索開始命令決定部850は、関数の実行における入力値参照命令の実行により参照された参照入力値に含まれる格納場所に基づいて、検索開始命令としてその関数における最先の入力値設定命令を決定するためのものである。この検索開始命令決定部850は、関数の呼出し命令前の入力値設定命令に基づく設定入力値に含まれる格納場所と、呼出し命令後の入力値参照命令に基づく参照入力値に含まれる格納場所とに基づいて、最先の入力値設定命令の設定順番を特定する。   The search start instruction determination unit 850 determines the earliest input value setting instruction in the function as a search start instruction based on the storage location included in the reference input value referenced by the execution of the input value reference instruction in the execution of the function. Is to do. The search start instruction determination unit 850 includes a storage location included in the set input value based on the input value setting instruction before the function call instruction, and a storage location included in the reference input value based on the input value reference instruction after the call instruction. Based on the above, the setting order of the earliest input value setting command is specified.

この検索開始命令決定部850は、例えば、設定入力値保持部840における設定入力値のうち、実行データ保持部740からの参照入力値の格納場所に基づいて、関数の命令区間において参照された設定入力値の設定順番が抽出される。そして、この検索開始命令決定部850は、その抽出された設定入力値の設定順番のうち、最も小さい設定順番を特定する。   The search start instruction determination unit 850, for example, among the set input values in the set input value holding unit 840, based on the storage location of the reference input value from the execution data holding unit 740, the setting referred to in the command section of the function The setting order of input values is extracted. Then, the search start instruction determination unit 850 specifies the smallest setting order among the setting orders of the extracted setting input values.

すなわち、検索開始命令決定部850は、命令デコーダ320において入力値設定命令と判断された命令のうち、関数の命令区間において参照された入力値の格納場所に、最初に入力値を設定した入力値設定命令を、最先の入力値設定命令として特定する。   That is, the search start instruction determination unit 850 first sets the input value in the storage location of the input value referred to in the instruction section of the function among the instructions determined by the instruction decoder 320 as the input value setting instruction. The setting command is specified as the earliest input value setting command.

また、検索開始命令決定部850は、その特定された最も小さい設定順番を入力値設定命令アドレス出力部830に通知する。これとともに、検索開始命令決定部850は、実行データ保持部740から出力された区間識別情報を入力値設定命令アドレス出力部830に出力する。   In addition, the search start command determination unit 850 notifies the input value setting command address output unit 830 of the specified smallest setting order. At the same time, the search start command determination unit 850 outputs the section identification information output from the execution data holding unit 740 to the input value setting command address output unit 830.

また、検索開始命令決定部850は、実行データ保持部740から参照入力値の格納場所が出力され場合には、入力値設定命令アドレス出力部830に入力値設定命令アドレステーブル820に対する入力値設定命令アドレスの登録を抑制する。これにより、入力値設定命令アドレステーブル820に対する無駄な入力値設定命令アドレスの登録を低減することができる。   Further, when the storage location of the reference input value is output from the execution data holding unit 740, the search start command determining unit 850 sends the input value setting command for the input value setting command address table 820 to the input value setting command address output unit 830. Suppress address registration. Thereby, registration of useless input value setting instruction addresses in the input value setting instruction address table 820 can be reduced.

実行履歴検索部710は、アドレス判定部810からの関数戻り信号に基づく登録指示に従って、実行データ保持部740からの区間識別情報、参照入力値および実行結果を履歴メモリ730に登録するものである。この実行履歴検索部710の他の機能は、図2に示した実行履歴検索部410と同様のものであるため、ここでの説明を省略する。   The execution history search unit 710 registers the section identification information, the reference input value, and the execution result from the execution data holding unit 740 in the history memory 730 in accordance with a registration instruction based on the function return signal from the address determination unit 810. The other functions of the execution history search unit 710 are the same as those of the execution history search unit 410 shown in FIG.

このように、入力値設定命令アドレス出力部830を設けることによって、主記憶部130からのプログラムを実行している間において、入力値設定命令アドレステーブル820に、入力値設定命令アドレスおよび区間識情報を登録することができる。すなわち、入力値設定命令アドレス出力部830を設けることによって、入力値設定命令により保持された入力値設定命令アドレスと、その入力値設定命令により特定された命令区間の区間識別情報とを入力値設定命令アドレステーブル820に出力することができる。   As described above, by providing the input value setting command address output unit 830, the input value setting command address and the section identification information are stored in the input value setting command address table 820 while the program from the main storage unit 130 is being executed. Can be registered. That is, by providing the input value setting command address output unit 830, the input value setting command address held by the input value setting command and the section identification information of the command section specified by the input value setting command are input value setting. It can be output to the instruction address table 820.

また、入力値設定命令アドレス出力部830は、検索開始命令決定部850によって、入力値設定命令により設定された入力値のうち、呼出し命令により呼び出された命令区間において参照された入力値に対応する入力値設定命令アドレスを出力することができる。すなわち、入力値設定命令アドレス出力部830は、命令区間において参照された複数の入力値に対応する入力値設定命令のうち、最先の入力値設定命令の入力値設定命令アドレスと区間識別情報である命令区間の先頭アドレスとを出力することができる。次に、入力値設定命令アドレステーブル820に入力値設定命令アドレスおよび区間識別情報を登録する例について以下に図面を参照して説明する。   Further, the input value setting instruction address output unit 830 corresponds to the input value referred to in the instruction section called by the calling instruction among the input values set by the search start instruction determining unit 850 by the input value setting instruction. An input value setting instruction address can be output. That is, the input value setting command address output unit 830 includes the input value setting command address and the section identification information of the first input value setting command among the input value setting commands corresponding to the plurality of input values referred to in the command section. The start address of a certain instruction section can be output. Next, an example of registering an input value setting command address and section identification information in the input value setting command address table 820 will be described below with reference to the drawings.

[入力値設定命令アドレステーブル820への登録例]
図12は、本発明の第3の実施の形態におけるデータ処理装置100による入力値設定命令アドレステーブル820に対する入力値設定命令アドレスおよび区間識別情報の登録例を示す概念図である。図12(a)は、入力値設定命令アドレステーブル820のデータフォーマットの一例を示す図である。入力値設定命令アドレステーブル820には、関数である命令区間における最先の入力値設定命令アドレス821と、その関数を識別するための区間識別情報である関数アドレス822との対応関係が示されている。
[Example of registration in input value setting instruction address table 820]
FIG. 12 is a conceptual diagram showing an example of registering an input value setting command address and section identification information in the input value setting command address table 820 by the data processing apparatus 100 according to the third embodiment of the present invention. FIG. 12A is a diagram showing an example of the data format of the input value setting instruction address table 820. The input value setting instruction address table 820 shows the correspondence between the earliest input value setting instruction address 821 in the instruction section that is a function and the function address 822 that is section identification information for identifying the function. Yes.

図12(b)は、入力値設定命令の実行のたびに保持された入力値設定命令アドレスおよび設定入力値との対応関係を示す図である。図12(b)には、設定順番811と、入力値設定命令アドレス831と、設定入力値841とが示されている。   FIG. 12B is a diagram showing a correspondence relationship between the input value setting instruction address and the set input value held every time the input value setting instruction is executed. FIG. 12B shows a setting order 811, an input value setting command address 831, and a setting input value 841.

設定順番811は、入力値設定命令が実行された順番を示す。入力値設定命令アドレス831は、入力値設定命令に基づいて、入力値設定命令アドレス出力部830に保持された、プログラムカウンタ350からの命令アドレスを示す。設定入力値841は、入力値設定命令に基づいて、設定入力値保持部840に保持された入力値を示す。なお、この入力値は、入力値の格納場所を示す情報だけでもよい。入力値の格納場所が分かれば、関数における入力値が参照されたか否かを判断することができるからである。   The setting order 811 indicates the order in which the input value setting instructions are executed. The input value setting instruction address 831 indicates an instruction address from the program counter 350 held in the input value setting instruction address output unit 830 based on the input value setting instruction. The set input value 841 indicates an input value held in the set input value holding unit 840 based on the input value setting command. The input value may be only information indicating the storage location of the input value. This is because if the storage location of the input value is known, it can be determined whether or not the input value in the function has been referenced.

図12(c)は、上位ルーチンにおいて2つの引数を持つ関数が呼出し命令(call)によって呼び出された後に、その関数の命令区間である下位ルーチンにおいて戻り命令(return)によって上位ルーチンに復帰する一連の処理例を示す概念図である。   FIG. 12C shows a sequence in which a function having two arguments is called by a call instruction (call) in the upper routine and then returned to the upper routine by a return instruction (return) in the lower routine that is the instruction section of the function. It is a conceptual diagram which shows the example of a process.

ここでは、関数の呼出し命令(call)311および戻り命令(retuen)312が示されている。また、上位ルーチンにおける入力値A設定321および入力値B設定322と、下位ルーチンにおける入力値A参照323、入力値B参照324および実行結果C設定325とが示されている。これらは、図4(b)に示したものと同様であるため、ここでの説明を省略する。   Here, a function call instruction (call) 311 and a return instruction (return) 312 are shown. Further, an input value A setting 321 and an input value B setting 322 in the upper routine, an input value A reference 323, an input value B reference 324, and an execution result C setting 325 in the lower routine are shown. Since these are the same as those shown in FIG. 4B, description thereof is omitted here.

図12(d)は、履歴メモリ730におけるデータフォーマットの一例を示す概念図である。ここでは、関数の区間識別情報である関数アドレス731と、実行履歴検索データ732との対応関係が示されている。実行履歴検索データ732は、図3に示した木構造により構成される検索データであって、実行履歴における入力値および実行結果が関連付けられた情報を含む検索データである。   FIG. 12D is a conceptual diagram illustrating an example of a data format in the history memory 730. Here, the correspondence relationship between the function address 731 which is function section identification information and the execution history search data 732 is shown. The execution history search data 732 is search data configured by the tree structure shown in FIG. 3 and includes information associated with input values and execution results in the execution history.

このような場合において、入力値A設定321では、アドレス判定部810からの指示により、プログラムカウンタ350から出力された命令アドレス(入力値A設定命令アドレス)が、入力値設定命令アドレス出力部830に保持される。このとき、アドレス判定部810からの指示により、実行データ保持部740に保持された1番目の設定入力値(入力値A)が、設定入力値保持部840に出力される。   In such a case, in the input value A setting 321, the instruction address (input value A setting instruction address) output from the program counter 350 is input to the input value setting instruction address output unit 830 according to an instruction from the address determination unit 810. Retained. At this time, the first set input value (input value A) held in the execution data holding unit 740 is output to the set input value holding unit 840 according to an instruction from the address determination unit 810.

入力値B設定322では、アドレス判定部810の指示により、プログラムカウンタ350から出力された命令アドレス(入力値B設定命令アドレス)が、入力値設定命令アドレス出力部830に保持される。このとき、アドレス判定部810からの指示により、実行データ保持部740に保持された2番目の設定入力値(入力値B)が、設定入力値保持部840に出力される。   In the input value B setting 322, the instruction address (input value B setting instruction address) output from the program counter 350 is held in the input value setting instruction address output unit 830 according to an instruction from the address determination unit 810. At this time, the second set input value (input value B) held in the execution data holding unit 740 is output to the set input value holding unit 840 according to an instruction from the address determination unit 810.

呼出し命令(call)311では、アドレス判定部810からの指示により、実行データ保持部740に区間識別情報(関数アドレス1)が保持される。入力値A参照323、入力値B参照324および実行結果C設定325では、アドレス判定部810の指示により、1番目の参照入力値(入力値A)、2番目の参照入力値(入力値B)および実行結果(実行結果C)が実行データ保持部740に保持される。   In the call instruction (call) 311, the section identification information (function address 1) is held in the execution data holding unit 740 according to an instruction from the address determination unit 810. In the input value A reference 323, the input value B reference 324, and the execution result C setting 325, the first reference input value (input value A) and the second reference input value (input value B) are instructed by the address determination unit 810. The execution result (execution result C) is held in the execution data holding unit 740.

戻り命令(return)312では、アドレス判定部810からの指示により、実行データ保持部740における区間識別情報(関数アドレス1)、1番目および2番目の参照入力値(入力値Aおよび入力値B)が、検索開始命令決定部850に出力される。これにより、検索開始命令決定部850によって、1番目および2番目の参照入力値(入力値Aおよび入力値B)に対応する設定入力値保持部840における1番目および2番目の設定入力値(入力値Aおよび入力値B)が抽出される。   In the return instruction (return) 312, section identification information (function address 1) in the execution data holding unit 740, first and second reference input values (input value A and input value B) according to an instruction from the address determination unit 810. Is output to the search start instruction determination unit 850. As a result, the search start command determination unit 850 causes the first and second set input values (inputs) in the set input value holding unit 840 corresponding to the first and second reference input values (input value A and input value B). The value A and the input value B) are extracted.

すなわち、実行データ保持部740における参照入力値の格納場所に基づいて、設定入力値保持部840における設定入力値のうち、関数の実行により参照された入力値が特定される。これは、命令デコーダ320により入力値設定命令と判断された命令であっても、関数に対する入力値を設定する命令でない場合があるからである。例えば、レジスタ4番にデータを格納する命令は、命令デコーダ320によって入力値設定命令と判断されるが、関数の命令区間外では、他の処理によっても使用される場合がある。   That is, based on the storage location of the reference input value in the execution data holding unit 740, the input value referred to by the execution of the function among the set input values in the set input value holding unit 840 is specified. This is because even an instruction determined to be an input value setting instruction by the instruction decoder 320 may not be an instruction for setting an input value for a function. For example, an instruction to store data in the register 4 is determined as an input value setting instruction by the instruction decoder 320, but may be used by other processing outside the instruction section of the function.

そして、検索開始命令決定部850によって、その抽出された設定入力値の設定順番(1および2)のうち、最も小さい設定順番(1)が選択される。すなわち、検索開始命令決定部850により、関数における最先の入力値設定命令に基づいて設定された設定入力値に対応する設定順番(1)が選択される。   Then, search start command determination unit 850 selects the smallest setting order (1) among the setting orders (1 and 2) of the extracted setting input values. That is, the search start command determination unit 850 selects the setting order (1) corresponding to the set input value set based on the earliest input value setting command in the function.

これにより、検索開始命令決定部850から設定順番(1)および区間識別情報(関数アドレス1)が、入力値設定命令アドレス出力部830に供給される。そして、入力値設定命令アドレス出力部830により、検索開始命令決定部850からの設定順番(1)に対応する「入力値A設定命令アドレス」と、「関数アドレス1」とが関連付けられて入力値設定命令アドレステーブル820に出力される。   Accordingly, the setting order (1) and the section identification information (function address 1) are supplied from the search start instruction determination unit 850 to the input value setting instruction address output unit 830. Then, the input value setting command address output unit 830 associates the “input value A setting command address” corresponding to the setting order (1) from the search start command determination unit 850 and “function address 1” with the input value. It is output to the setting command address table 820.

また、アドレス判定部810からの指示により、実行データ保持部740における区間識別情報(関数アドレス1)、参照入力値(入力値Aおよび入力値B)および実行結果(実行結果C)が、実行履歴検索部710に出力される。そして、実行履歴検索部710により、その出力されたデータが履歴メモリ730に登録される。   Further, according to an instruction from the address determination unit 810, the section identification information (function address 1), the reference input value (input value A and input value B) and the execution result (execution result C) in the execution data holding unit 740 are executed. The data is output to the search unit 710. Then, the execution history search unit 710 registers the output data in the history memory 730.

[データ処理装置100の動作例]
次に本発明の第3の実施の形態におけるデータ処理装置100の動作について図面を参照して説明する。
[Operation Example of Data Processing Device 100]
Next, the operation of the data processing apparatus 100 according to the third embodiment of the present invention will be described with reference to the drawings.

図13は、本発明の第3の実施の形態におけるデータ処理装置100による実行結果再利用方法の処理手順の一例を示すフローチャートである。   FIG. 13 is a flowchart illustrating an example of a processing procedure of an execution result reuse method by the data processing apparatus 100 according to the third embodiment of the present invention.

まず、フェッチ部310により、主記憶部130または命令キャッシュ210から命令が読み出される(ステップS941)。続いて、アドレス判定部810により、プログラムカウンタ350から出力される命令アドレスが、入力値設定命令アドレステーブル820における入力値設定命令アドレスと一致するか否かが判断される(ステップS942)。   First, the fetch unit 310 reads an instruction from the main storage unit 130 or the instruction cache 210 (step S941). Subsequently, the address determination unit 810 determines whether or not the instruction address output from the program counter 350 matches the input value setting instruction address in the input value setting instruction address table 820 (step S942).

そして、プログラムカウンタ350からの命令アドレスが入力値設定命令アドレスと一致する場合には、実行履歴検索処理(ステップS960)が実行される。一方、入力値設定命令アドレスと一致しない場合には、命令デコーダ320により、入力値設定命令か否かが判断される(ステップS943)。   If the instruction address from the program counter 350 matches the input value setting instruction address, an execution history search process (step S960) is executed. On the other hand, if it does not match the input value setting instruction address, the instruction decoder 320 determines whether or not it is an input value setting instruction (step S943).

そして、入力値設定命令と判断された場合には、アドレス判定部810からの指示により、プログラムカウンタ350からの命令アドレスが、入力値設定命令アドレスとして入力値設定命令アドレス出力部830に保持される(ステップS954)。続いて、アドレス判定部810からの指示によって実行部330からの出力が設定入力値として実行データ保持部740に保持されて、その保持された設定入力値が、設定入力値保持部840に保持される(ステップS955)。   If it is determined that the instruction is an input value setting instruction, an instruction address from the program counter 350 is held in the input value setting instruction address output unit 830 as an input value setting instruction address by an instruction from the address determination unit 810. (Step S954). Subsequently, in response to an instruction from the address determination unit 810, the output from the execution unit 330 is held as a set input value in the execution data holding unit 740, and the held set input value is held in the set input value holding unit 840. (Step S955).

一方、入力値設定命令でないと判断された場合には、命令デコーダ320により、関数の呼出し命令か否かが判断される(ステップS944)。そして、関数の呼出し命令でないと判断された場合には、ステップS941に戻る。   On the other hand, if it is determined that the instruction is not an input value setting instruction, the instruction decoder 320 determines whether it is a function call instruction (step S944). If it is determined that the instruction is not a function call instruction, the process returns to step S941.

このようにして、関数の呼出し命令が読み出されるまでの間、入力値設定命令が読み出されるたびに、プログラムカウンタ350からの命令が、入力値設定命令アドレス出力部830に、設定入力値およびその設定順番が、設定入力値保持部840に保持される。この場合において、設定入力値の格納場所が同一の設定入力値が、設定入力値保持部840に既に保持されているときは、既に保持されている設定入力値およびその設定順番の保持領域に重ねて、新たな設定入力値およびその設定順番が保持される。   In this way, every time the input value setting instruction is read until the function call instruction is read, the instruction from the program counter 350 is sent to the input value setting instruction address output unit 830 and the set input value and its setting. The order is held in the set input value holding unit 840. In this case, when a setting input value having the same storage location of the setting input value is already held in the setting input value holding unit 840, it is overlaid on the holding area of the setting input value already held and its setting order. Thus, the new setting input value and its setting order are held.

一方、関数の呼出し命令でないと判断された場合には、アドレス判定部810により、関数の先頭アドレスが、区間識別情報として実行データ保持部740に保持される(ステップS945)。次に、関数の命令区間において、フェッチ部310により、主記憶部130または命令キャッシュ210から命令が読み出される(ステップS946)。続いて、命令デコーダ320により、その読み出された命令が入力値参照命令であるか否かが判断される(ステップS947)。   On the other hand, if it is determined that the instruction is not a function call instruction, the address determination unit 810 holds the start address of the function in the execution data holding unit 740 as section identification information (step S945). Next, in the instruction section of the function, the fetch unit 310 reads an instruction from the main storage unit 130 or the instruction cache 210 (step S946). Subsequently, the instruction decoder 320 determines whether or not the read instruction is an input value reference instruction (step S947).

そして、入力値参照命令と判断された場合には、アドレス判定部810からの指示により、実行部330からの出力を、参照入力値としてその順番とともに実行データ保持部740に保持されて(ステップS956)、ステップS946の処理に戻る。一方、入力値参照命令でないと判断された場合には、命令デコーダ320により、読み出された命令が、実行結果設定命令か否かが判断される(ステップS948)。   If it is determined that the instruction is an input value reference command, the output from the execution unit 330 is stored in the execution data storage unit 740 as a reference input value together with the order in accordance with an instruction from the address determination unit 810 (step S956). ), The process returns to step S946. On the other hand, if it is determined that the instruction is not an input value reference instruction, the instruction decoder 320 determines whether or not the read instruction is an execution result setting instruction (step S948).

そして、実行結果設定命令であると判断された場合には、アドレス判定部810からの指示により、実行部330からの出力を、実行結果として実行データ保持部740に保持させて(ステップS957)、ステップS946の処理に戻る。一方、実行結果設定命令でないと判断された場合には、命令デコーダ320により、読み出された命令が、関数の戻り命令であるか否かが判断される(ステップS949)。   If it is determined that the instruction is an execution result setting instruction, an output from the execution unit 330 is held in the execution data holding unit 740 as an execution result in accordance with an instruction from the address determination unit 810 (step S957). The process returns to step S946. On the other hand, if it is determined that the instruction is not an execution result setting instruction, the instruction decoder 320 determines whether or not the read instruction is a function return instruction (step S949).

そして、関数の戻り命令でないと判断された場合には、ステップS946に戻り、関数の呼出し命令が読み出されるまで、参照入力値および実行結果が、実行データ保持部740に保持される。   If it is determined that the instruction is not a function return instruction, the process returns to step S946, and the reference input value and the execution result are held in the execution data holding unit 740 until the function call instruction is read.

一方、関数の呼出し命令と判断された場合には、検索開始命令決定部850により、設定入力値保持部840に保持された設定入力値のうち、実行データ保持部740に保持された参照入力値に基づいて、関数における最先の設定入力値の設定順番が特定される。そして、入力値設定命令アドレス出力部830における入力値設定命令アドレスのうち、検索開始命令決定部850により特定された設定順番に対応する入力値設定命令アドレスが、最先の入力値設定命令アドレスとして抽出される。   On the other hand, if it is determined that the instruction is a function call instruction, the reference input value held in the execution data holding unit 740 among the set input values held in the set input value holding unit 840 by the search start instruction determining unit 850. Based on the above, the setting order of the earliest setting input value in the function is specified. Of the input value setting instruction addresses in the input value setting instruction address output unit 830, the input value setting instruction address corresponding to the setting order specified by the search start instruction determining unit 850 is the earliest input value setting instruction address. Extracted.

これにより、入力値設定命令アドレス出力部830により、最先の入力値設定命令アドレスと、実行データ保持部740からの区間識別情報とが関連付けられて入力値設定命令アドレステーブル820に登録される(ステップS951)。また、アドレス判定部810からの登録指示により、実行履歴検索部710によって実行データ保持部740における区間識別情報、参照入力値および実行結果が、履歴メモリ730に登録される(ステップS952)。   As a result, the input value setting command address output unit 830 associates the earliest input value setting command address with the section identification information from the execution data holding unit 740 and registers it in the input value setting command address table 820 ( Step S951). Further, according to a registration instruction from the address determination unit 810, the section identification information, the reference input value, and the execution result in the execution data holding unit 740 are registered in the history memory 730 by the execution history search unit 710 (step S952).

そして、履歴メモリ730および入力値設定命令アドレステーブル820への登録が終了した後に、実行データ保持部740、設定入力値保持部840および入力値設定命令アドレス出力部830におけるデータが消去される(ステップS953)。そして、実行結果再利用方法の処理を終了する。   Then, after the registration in the history memory 730 and the input value setting command address table 820 is completed, the data in the execution data holding unit 740, the set input value holding unit 840, and the input value setting command address output unit 830 is erased (step) S953). Then, the processing of the execution result reuse method is terminated.

[データ処理装置100における実行履歴検索処理の例]
図14は、本発明の第3の実施形態におけるデータ処理装置100による実行履歴検索処理(ステップS960)の処理手順例を示すフローチャートである。
[Example of execution history search processing in data processing apparatus 100]
FIG. 14 is a flowchart illustrating an example of a processing procedure of an execution history search process (step S960) by the data processing apparatus 100 according to the third embodiment of the present invention.

まず、アドレス判定部810により、プログラムカウンタ350からの命令アドレスと一致する入力値設定命令アドレスに対応する区間識別情報が、入力値設定命令アドレステーブル820から実行データ保持部740に出力される(ステップS963)。続いて、実行履歴検索部710により、履歴メモリ730の検索キーとして、実行データ保持部740に保持された区間識別情報が履歴メモリ730に入力される(ステップS964)。これにより、履歴メモリ730における区間識別情報に対応する複数の実行履歴の検索が開始される。   First, the address determination unit 810 outputs the section identification information corresponding to the input value setting command address that matches the command address from the program counter 350 from the input value setting command address table 820 to the execution data holding unit 740 (step S110). S963). Subsequently, the section identification information held in the execution data holding unit 740 is input to the history memory 730 as a search key of the history memory 730 by the execution history search unit 710 (step S964). As a result, a search for a plurality of execution histories corresponding to the section identification information in the history memory 730 is started.

次に、命令デコーダ320により、フェッチ部310から読み出された命令が、入力値設定命令であるか否かが判断される(ステップS965)。そして、入力値設定命令であると判断された場合には、命令デコーダ320からの入力値設定信号に基づいて、入力値設定命令により設定された入力値が、アドレス判定部810によって実行データ保持部740に保持される。   Next, the instruction decoder 320 determines whether or not the instruction read from the fetch unit 310 is an input value setting instruction (step S965). If it is determined that the instruction is an input value setting instruction, the input value set by the input value setting instruction is changed by the address determination unit 810 based on the input value setting signal from the instruction decoder 320. 740.

この後、実行履歴検索部710により、実行データ保持部740に保持された入力値が、履歴メモリ730に入力される(ステップS971)。なお、1回目のステップS965の判断については、ここでは、必ず入力値設定命令と判断されるため、その判断を省略して、ステップS971に進むようにしてもよい。   Thereafter, the execution history search unit 710 inputs the input value held in the execution data holding unit 740 into the history memory 730 (step S971). Note that the determination in step S965 for the first time is always determined to be an input value setting command here, so that the determination may be omitted and the process may proceed to step S971.

続いて、実行履歴検索部710からの区間識別情報に対応する履歴メモリ730における実行履歴について、履歴メモリ730により、実行履歴検索部710からの入力値と、その実行履歴における入力値とが一致するか否かが判断される(ステップS972)。そして、両者の入力値が一致しない場合には、ステップS974の処理に進む。   Subsequently, for the execution history in the history memory 730 corresponding to the section identification information from the execution history search unit 710, the input value from the execution history search unit 710 matches the input value in the execution history by the history memory 730. Is determined (step S972). And when both input values do not correspond, it progresses to the process of step S974.

一方、両者の入力値が一致した場合には、履歴メモリ730において、実行履歴における次の引数の入力値を比較するために、次の引数における引数ノードにポインタが進められる(ステップS973)。すなわち、実行履歴検索部710からの入力値と一致する引数ノードがあれば、その引数ノードの右ポインタによって、次の引数ノードが指し示される。次に、フェッチ部310により、主記憶部130または命令キャッシュ210から命令が読み出され(ステップS974)、ステップS915の処理に戻る。   On the other hand, if the two input values match, the history memory 730 advances the pointer to the argument node in the next argument in order to compare the input value of the next argument in the execution history (step S973). That is, if there is an argument node that matches the input value from the execution history search unit 710, the next argument node is indicated by the right pointer of the argument node. Next, the fetch unit 310 reads an instruction from the main storage unit 130 or the instruction cache 210 (step S974), and the process returns to step S915.

一方、ステップS965の処理において、入力値設定命令でないと判断された場合において、フェッチ部310により読み出された命令が関数の呼出し命令であるか否かが判断される(ステップS966)。そして、関数の呼出し命令でない場合には、ステップS974に進む。   On the other hand, if it is determined in step S965 that the instruction is not an input value setting instruction, it is determined whether the instruction read by the fetch unit 310 is a function call instruction (step S966). If it is not a function call instruction, the process proceeds to step S974.

このようにして、関数における全ての入力値が設定されるまで、ステップS965、S966およびS971乃至S974における一連の処理が繰り返し実行される。すなわち、入力値設定命令アドレステーブル820により特定された入力値設定命令から呼出し命令までの関数の入力値設定命令に基づいて設定された入力値が、実行データ保持部740に保持されて、その保持された入力値が履歴メモリ730に入力される。   In this way, a series of processes in steps S965, S966, and S971 to S974 are repeatedly executed until all input values in the function are set. In other words, the input value set based on the input value setting command of the function from the input value setting command to the call command specified by the input value setting command address table 820 is held in the execution data holding unit 740 and held. The input value is input to the history memory 730.

このように、プログラムカウンタ350から出力される命令アドレスと一致する入力値設定命令アドレスに対応する区間識別情報が実行データ保持部740に保持される。そして、その入力値設定命令アドレスにより特定された入力値設定命令から呼出し命令までの命令群のうちの入力値設定命令に基づいて実行部から出力された入力値が、実行データ保持部740に保持される。   As described above, the section identification information corresponding to the input value setting instruction address that matches the instruction address output from the program counter 350 is held in the execution data holding unit 740. Then, the input value output from the execution unit based on the input value setting command in the instruction group from the input value setting command to the call command specified by the input value setting command address is held in the execution data holding unit 740. Is done.

これにより、実行履歴検索部710によって、実行データ保持部740における区間識別情報および入力値を用いて、履歴メモリ730における実行履歴に関連付けられた実行結果が検索される。なお、ステップS963乃至S966およびS971乃至S974は、特許請求の範囲に記載の実行履歴検索手順の一例である。   As a result, the execution history search unit 710 searches for an execution result associated with the execution history in the history memory 730 using the section identification information and the input value in the execution data holding unit 740. Note that steps S963 to S966 and S971 to S974 are an example of an execution history search procedure described in the claims.

一方、ステップS966において、関数の呼出し命令と判断された場合には、実行データ保持部740における区間識別情報および入力値が、履歴メモリ730における区間識別情報に関連付けられた入力値と全て一致したか否かが判断される(ステップS967)。   On the other hand, if it is determined in step S966 that the instruction is a function call instruction, whether the section identification information and the input value in the execution data holding unit 740 all match the input value associated with the section identification information in the history memory 730. It is determined whether or not (step S967).

そして、実行履歴検索部710からの区間識別情報および入力値が全て一致した場合には、実行結果再利用処理が実行される(ステップS975)。すなわち、実行履歴検索部710からの区間識別情報および入力値に対応する履歴メモリ730における実行結果が、実行結果出力部720から出力される。そして、主記憶部130またはレジスタファイル340に書き戻されて、関数の処理をスキップする。なお、S975は、特許請求の範囲に記載の実行結果出力手順の一例である。   If all the section identification information and input values from the execution history search unit 710 match, an execution result reuse process is executed (step S975). That is, the execution result in the history memory 730 corresponding to the section identification information and the input value from the execution history search unit 710 is output from the execution result output unit 720. Then, the data is written back to the main storage unit 130 or the register file 340, and the function processing is skipped. Note that S975 is an example of an execution result output procedure described in the claims.

一方、実行履歴検索部710からの区間識別情報および入力値が全て一致しない場合には、呼出し命令により呼び出された関数が実行されて、その実行結果が実行データ保持部740に保持される(ステップS968)。そして、実行履歴検索部710により、実行データ保持部740に保持された実行結果と、ステップS963およびS971の処理によって保持された区間識別情報および入力値とが、履歴メモリ730に登録される(ステップS919)。   On the other hand, when the section identification information from the execution history search unit 710 and the input values do not all match, the function called by the call instruction is executed and the execution result is held in the execution data holding unit 740 (step S968). Then, the execution history search unit 710 registers the execution result held in the execution data holding unit 740 and the section identification information and the input value held by the processes of steps S963 and S971 in the history memory 730 (step S919).

このように、本発明の第3の実施の形態では、検索開始命令アドレス管理部800は、プログラムの実行中において、関数における最先の入力値設定命令アドレスを入力値設定命令アドレステーブル820に登録することができる。   As described above, in the third embodiment of the present invention, the search start instruction address management unit 800 registers the first input value setting instruction address in the function in the input value setting instruction address table 820 during the execution of the program. can do.

このように、本発明の実施の形態によれば、命令区間の呼出し命令の実行の前に、履歴メモリ430または730における実行履歴を検索することができるため、実行結果の再利用によるプログラムの処理時間を短縮することができる。また、入力値設定命令アドレステーブル520および720を設けることによって、プログラム自体に専用命令を埋め込むことなく、関数の呼出し命令の実行前に、履歴メモリ430または730における実行履歴を検索することができる。   As described above, according to the embodiment of the present invention, the execution history in the history memory 430 or 730 can be searched before executing the calling instruction in the instruction section. Time can be shortened. Further, by providing the input value setting instruction address tables 520 and 720, the execution history in the history memory 430 or 730 can be searched before the function call instruction is executed without embedding a dedicated instruction in the program itself.

なお、本発明の実施の形態では、履歴メモリ430または730を、SRAM(Static Random Access Memory)やROM(Read Only Memory)などの不揮発メモリにより実現するようにしてもよい。これにより、データ処理装置100の電源がオフされた場合であっても、履歴メモリ430または730に保持された実行履歴は消失しないため、データ処理装置100の起動直後においても、過去の実行結果を有効に利用することができる。このため、データ処理装置100の起動直後における実行結果再利用処理による実行時間の削減効果の低下を抑制することができる。   In the embodiment of the present invention, the history memory 430 or 730 may be realized by a nonvolatile memory such as an SRAM (Static Random Access Memory) or a ROM (Read Only Memory). As a result, even when the data processing apparatus 100 is turned off, the execution history held in the history memory 430 or 730 is not lost. It can be used effectively. For this reason, it is possible to suppress a decrease in execution time reduction effect due to the execution result reuse process immediately after the data processing apparatus 100 is activated.

また、プログラムの実行後に、データ処理装置100の外部に設けた記憶部に履歴メモリ430または730に保持された履歴データを転送するようにしてもよい。ここで、履歴データを記憶する記憶部をデータ処理装置100の外部に設けた場合を、第4の実施の形態として、次図を参照して簡単に説明する。   In addition, after the program is executed, the history data held in the history memory 430 or 730 may be transferred to a storage unit provided outside the data processing apparatus 100. Here, the case where the memory | storage part which memorize | stores historical data is provided in the exterior of the data processor 100 is demonstrated easily with reference to the next figure as 4th Embodiment.

<4.第4の実施の形態>
[データ処理装置100の外部に履歴データ記憶部を設けた例]
図15は、本発明の第4の実施の形態におけるデータ処理装置100の外部に履歴データ記憶部を設けた場合における集積回路の一構成例を示すブロック図である。ここでは、図1に示した集積回路の構成に加えて履歴データ記憶部140が示されている。この履歴データ記憶部140以外の構成は、図1に示したものと同様であるため、ここでの説明を省略する。
<4. Fourth Embodiment>
[Example in which a history data storage unit is provided outside the data processing apparatus 100]
FIG. 15 is a block diagram showing a configuration example of an integrated circuit when a history data storage unit is provided outside the data processing apparatus 100 according to the fourth embodiment of the present invention. Here, in addition to the configuration of the integrated circuit shown in FIG. 1, a history data storage unit 140 is shown. Since the configuration other than the history data storage unit 140 is the same as that shown in FIG. 1, the description thereof is omitted here.

履歴データ記憶部140は、主記憶部130に記憶されたプログラムが実行された後に、データ処理装置100から転送された履歴メモリ430または730における履歴データを記憶するものである。この履歴データ記憶部140は、例えば、不揮発性メモリにより実現される。   The history data storage unit 140 stores history data in the history memory 430 or 730 transferred from the data processing device 100 after the program stored in the main storage unit 130 is executed. The history data storage unit 140 is realized by, for example, a nonvolatile memory.

このように、不揮発性メモリにより実現される履歴データ記憶部140をデータ処理装置100の外部に設けて、履歴メモリ430または730の履歴データを転送することによって、電源オフによる履歴データの消失を回避することができる。次に、履歴データの転送方法について、次図を参照して簡単に説明する。   As described above, by providing the history data storage unit 140 realized by the non-volatile memory outside the data processing apparatus 100 and transferring the history data of the history memory 430 or 730, the loss of the history data due to power-off is avoided. can do. Next, a history data transfer method will be briefly described with reference to the following diagram.

図16は、本発明の第4の実施の形態におけるデータ処理装置100による履歴データ転送方法の処理手順を示すフローチャートである。   FIG. 16 is a flowchart illustrating a processing procedure of the history data transfer method by the data processing device 100 according to the fourth embodiment of the present invention.

まず、アプリケーションが起動されて(ステップS991)、データ処理部300により、履歴データ記憶部140に履歴データがあるか否かが判断される(ステップS992)。   First, an application is activated (step S991), and the data processing unit 300 determines whether there is history data in the history data storage unit 140 (step S992).

そして、履歴データ記憶部140に履歴データが記憶されている場合には、データ処理部300により、その記憶された履歴データが履歴メモリ430または730に転送される(ステップS993)。一方、履歴データが記憶されていない場合には、ステップS994に進む。   If the history data is stored in the history data storage unit 140, the stored history data is transferred to the history memory 430 or 730 by the data processing unit 300 (step S993). On the other hand, if no history data is stored, the process proceeds to step S994.

そして、データ処理部300により、主記憶部130に記憶されたプログラムであるアプリケーションが実行される(ステップS994)。このアプリケーションの実行後に、データ処理部300により、履歴データ記憶部140および履歴メモリ430または730における両者の履歴データに基づいて、履歴データ記憶部140に記憶させる新たに履歴データが再構築される(ステップS995)。そして、その再構築された履歴データを履歴データ記憶部140に記憶する。   Then, the data processing unit 300 executes an application that is a program stored in the main storage unit 130 (step S994). After execution of this application, the data processing unit 300 reconstructs new history data to be stored in the history data storage unit 140 based on both the history data in the history data storage unit 140 and the history memory 430 or 730 ( Step S995). Then, the reconstructed history data is stored in the history data storage unit 140.

このように、プログラムの実行前に、履歴データ記憶部140に記憶された過去の履歴データを履歴メモリ430または730に転送することによって、プログラムの起動直後における再利用処理による実行時間の短縮効果を向上させることができる。   As described above, by transferring the past history data stored in the history data storage unit 140 to the history memory 430 or 730 before the execution of the program, the effect of shortening the execution time by the reuse processing immediately after the program is started can be obtained. Can be improved.

なお、本発明の実施の形態では、1つの関数の命令区間に対する実行結果に再利用の例について説明したが、関数の命令区間において、さらに複数回関数を呼び出すような多重構造の関数に対しても適用することができる。   In the embodiment of the present invention, an example of reusing the execution result for the instruction section of one function has been described. However, for a function having a multiple structure that calls a function more than once in the instruction section of a function. Can also be applied.

なお、本発明の実施の形態は本発明を具現化するための一例を示したものであり、本発明の実施の形態において明示したように、本発明の実施の形態における事項と、特許請求の範囲における発明特定事項とはそれぞれ対応関係を有する。同様に、特許請求の範囲における発明特定事項と、これと同一名称を付した本発明の実施の形態における事項とはそれぞれ対応関係を有する。ただし、本発明は実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において実施の形態に種々の変形を施すことにより具現化することができる。   The embodiment of the present invention shows an example for embodying the present invention. As clearly shown in the embodiment of the present invention, the matters in the embodiment of the present invention and the claims Each invention-specific matter in the scope has a corresponding relationship. Similarly, the matters specifying the invention in the claims and the matters in the embodiment of the present invention having the same names as the claims have a corresponding relationship. However, the present invention is not limited to the embodiments, and can be embodied by making various modifications to the embodiments without departing from the gist of the present invention.

また、本発明の実施の形態において説明した処理手順は、これら一連の手順を有する方法として捉えてもよく、また、これら一連の手順をコンピュータに実行させるためのプログラム乃至そのプログラムを記憶する記録媒体として捉えてもよい。この記録媒体として、例えば、CD(Compact Disc)、MD(MiniDisc)、DVD(Digital Versatile Disk)、メモリカード、ブルーレイディスク(Blu-ray Disc(登録商標))等を用いることができる。   The processing procedure described in the embodiment of the present invention may be regarded as a method having a series of these procedures, and a program for causing a computer to execute the series of procedures or a recording medium storing the program May be taken as As this recording medium, for example, a CD (Compact Disc), an MD (MiniDisc), a DVD (Digital Versatile Disk), a memory card, a Blu-ray Disc (registered trademark), or the like can be used.

100 データ処理装置
120 バス
130 主記憶部
200 一次キャッシュ
210 命令キャッシュ
220 データキャッシュ
300 データ処理部
310 フェッチ部
320 命令デコーダ
330 実行部
331 ロードユニット
332 入力選択部
333 演算回路
334 ストアユニット
340 レジスタファイル
350 プログラムカウンタ
400、700 実行結果再利用処理部
410、710 実行履歴検索部
420、720 実行結果出力部
430、730 履歴メモリ
440、740 実行データ保持部
500、800 検索開始命令アドレス管理部
510、810 アドレス判定部
520、820 入力値設定命令アドレステーブル
600 プログラム解析処理装置
610 ソースプログラム記憶部
620 コンパイル処理部
630 プログラム解析部
631 再利用候補区間抽出部
632 再利用候補区間解析部
640 プログラム最適化処理部
641 再利用度生成部
642 再利用区間抽出部
643 再利用区間情報生成部
650 コード生成部
660 オブジェクトプログラム記憶部
670 再利用区間情報記憶部
840 設定入力値保持部
850 検索開始命令決定部
DESCRIPTION OF SYMBOLS 100 Data processor 120 Bus 130 Main memory part 200 Primary cache 210 Instruction cache 220 Data cache 300 Data processing part 310 Fetch part 320 Instruction decoder 330 Execution part 331 Load unit 332 Input selection part 333 Arithmetic circuit 334 Store unit 340 Register file 350 Program Counter 400, 700 Execution result reuse processing unit 410, 710 Execution history search unit 420, 720 Execution result output unit 430, 730 History memory 440, 740 Execution data holding unit 500, 800 Search start instruction address management unit 510, 810 Address determination Unit 520, 820 Input value setting instruction address table 600 Program analysis processing device 610 Source program storage unit 620 Compilation processing unit 630 Gram analysis unit 631 Reuse candidate section extraction unit 632 Reuse candidate section analysis unit 640 Program optimization processing unit 641 Reuse degree generation unit 642 Reuse section extraction unit 643 Reuse section information generation unit 650 Code generation unit 660 Object program storage Unit 670 Reuse section information storage unit 840 Setting input value holding unit 850 Search start command determining unit

Claims (10)

複数の命令区間が含まれる命令列に基づく処理を実行部と、
前記命令区間を呼び出すための呼出し命令が実行される前に前記命令区間の入力値を設定するための入力値設定命令のアドレスである入力値設定命令アドレスを前記命令区間の区間識別情報ごとに保持する入力値設定命令アドレステーブルと、
前記区間識別情報ごとに前記命令区間における入力値および実行結果を関連付けて実行履歴として保持する履歴メモリと、
前記入力値設定命令アドレスにより特定された前記入力値設定命令から前記呼出し命令までの命令群のうちの前記入力値設定命令に基づいて前記実行部から出力された入力値と前記入力値設定命令アドレスに対応する前記区間識別情報とを用いて前記実行履歴における前記実行結果を検索する実行履歴検索部と、
前記入力値設定命令アドレスによって特定される前記呼出し命令が実行されるときに前記実行履歴検索部により前記実行結果が抽出された場合には前記抽出された実行結果を前記実行部に出力する実行結果出力部と
を具備するデータ処理装置。
A process based on an instruction sequence including a plurality of instruction sections;
An input value setting instruction address that is an address of an input value setting instruction for setting an input value of the instruction section is held for each section identification information of the instruction section before a call instruction for calling the instruction section is executed. Input value setting instruction address table to be
A history memory that associates an input value and an execution result in the command section for each section identification information and holds it as an execution history;
The input value and the input value setting instruction address output from the execution unit based on the input value setting instruction in the instruction group from the input value setting instruction to the call instruction specified by the input value setting instruction address An execution history search unit that searches for the execution result in the execution history using the section identification information corresponding to
When the execution result is extracted by the execution history search unit when the call instruction specified by the input value setting instruction address is executed, the execution result that outputs the extracted execution result to the execution unit A data processing apparatus comprising an output unit.
前記入力値設定命令アドレステーブルは、前記複数の命令区間のうち複数回実行される命令区間である再利用区間の入力値を設定するための前記入力値設定命令の前記入力値設定命令アドレスを前記再利用区間の前記区間識別情報ごとに保持し、
実行履歴検索部は、前記再利用区間における前記命令群のうちの前記入力値設定命令に基づいて前記実行部から出力された前記入力値と前記入力値設定命令アドレスに対応する前記区間識別情報とを用いて前記再利用区間における前記実行結果を検索し、
実行結果出力部は、前記入力値設定命令アドレスによって特定される前記再利用区間の前記呼出し命令が実行されるときに前記実行履歴検索部により前記実行履歴における前記再利用区間の前記実行結果が抽出された場合には前記抽出された実行結果を前記実行部に出力する
請求項1記載のデータ処理装置。
The input value setting instruction address table includes the input value setting instruction address of the input value setting instruction for setting an input value of a reuse section that is an instruction section executed a plurality of times among the plurality of instruction sections. Hold for each section identification information of the reuse section,
The execution history search unit includes: the input value output from the execution unit based on the input value setting command in the instruction group in the reuse interval; and the interval identification information corresponding to the input value setting command address. The execution result in the reuse section is searched using
The execution result output unit extracts the execution result of the reuse section in the execution history by the execution history search unit when the call instruction of the reuse section specified by the input value setting instruction address is executed. The data processing apparatus according to claim 1, wherein, when it is performed, the extracted execution result is output to the execution unit.
前記入力値設定命令に基づいて設定された入力値のうち前記呼出し命令により呼び出された前記命令区間において参照された入力値に対応する前記入力値設定命令アドレスと前記区間識別情報とを前記入力値設定命令アドレステーブルに出力する入力値設定命令アドレス出力部をさらに具備する請求項1記載のデータ処理装置。   Of the input values set based on the input value setting command, the input value setting command address corresponding to the input value referred to in the command section called by the call command and the section identification information are input values. The data processing apparatus according to claim 1, further comprising an input value setting instruction address output unit for outputting to the setting instruction address table. 前記入力値設定命令アドレス出力部は、前記命令区間において参照された複数の入力値に対応する前記入力値設定命令のうち最先の前記入力値設定命令の前記入力値設定命令アドレスと前記区間識別情報である前記命令区間の先頭アドレスとを出力する請求項3記載のデータ処理装置。   The input value setting command address output unit is configured to identify the input value setting command address of the first input value setting command and the interval among the input value setting commands corresponding to the plurality of input values referred to in the command interval. 4. The data processing apparatus according to claim 3, wherein the head address of the instruction section, which is information, is output. 前記入力値設定命令アドレステーブルは、前記命令区間における複数の入力値を設定するための入力値設定命令のうち最先の前記入力値設定命令の前記入力値設定命令アドレスを前記区間識別情報ごとに保持する請求項1記載のデータ処理装置。   The input value setting instruction address table includes, for each section identification information, the input value setting instruction address of the first input value setting instruction among the input value setting instructions for setting a plurality of input values in the instruction section. The data processing device according to claim 1, wherein the data processing device is held. 前記実行部は、前記実行履歴検索部により前記実行履歴における前記実行結果が前記履歴メモリから抽出されない場合には前記入力値設定命令アドレスによって特定された前記命令区間における処理を実行し、
前記実行履歴検索部は、前記入力値設定命令に基づいて前記実行部から出力された入力値と前記実行部により実行された実行結果と前記入力値設定命令アドレスに対応する前記区間識別情報とを前記履歴メモリに保持させる
請求項1記載のデータ処理装置。
The execution unit executes processing in the command section specified by the input value setting command address when the execution result in the execution history is not extracted from the history memory by the execution history search unit,
The execution history search unit includes an input value output from the execution unit based on the input value setting command, an execution result executed by the execution unit, and the section identification information corresponding to the input value setting command address. The data processing apparatus according to claim 1, wherein the data processing apparatus is held in the history memory.
前記入力値設定命令アドレステーブルは、前記命令区間である関数の前記入力値設定命令の前記入力値設定命令アドレスを前記区間識別情報である前記関数の先頭アドレスごとに保持し、
前記履歴メモリは、前記関数の先頭アドレスごとに前記関数における入力値および実行結果を関連付けて前記実行履歴として保持し、
前記実行履歴検索部は、前記命令群のうちの前記入力値設定命令に基づいて前記実行部から出力された前記関数の前記入力値と前記入力値設定命令アドレスに対応する前記関数の先頭アドレスとを用いて前記実行結果を検索し、
前記実行結果出力部は、前記入力値設定命令アドレスによって特定される前記関数の前記呼出し命令が実行されるときに前記実行履歴検索部により前記関数の前記実行結果が抽出された場合には前記抽出された実行結果を前記実行部に出力する
請求項1記載のデータ処理装置。
The input value setting instruction address table holds the input value setting instruction address of the input value setting instruction of the function that is the instruction section for each head address of the function that is the section identification information,
The history memory associates an input value and an execution result in the function for each head address of the function and holds the execution history as the execution history,
The execution history search unit includes the input value of the function output from the execution unit based on the input value setting command of the instruction group and a start address of the function corresponding to the input value setting command address. The execution result is searched using
The execution result output unit extracts the execution result when the execution history search unit extracts the execution result of the function when the call instruction of the function specified by the input value setting instruction address is executed. The data processing apparatus according to claim 1, wherein the executed result is output to the execution unit.
プログラムのうち複数回実行される命令区間における処理の実行ごとの入力値が互いに一致する度合いを示す再利用度を前記命令区間の使用態様に基づいて前記命令区間ごとに生成する再利用度生成部と、
前記複数の命令区間のうち前記再利用度に基づいて抽出された再利用区間における入力値を設定するための入力値設定命令の入力値設定命令アドレスと前記再利用区間を識別するための区間識別情報とが関連付けられた再利用区間情報を生成する再利用区間情報生成部と
を具備するプログラム解析処理装置。
A reuse level generation unit that generates a reuse level for each instruction interval based on a usage mode of the instruction interval, indicating a degree of matching between input values for each execution of processing in an instruction interval that is executed a plurality of times in the program When,
An input value setting instruction address of an input value setting instruction for setting an input value in a reuse section extracted based on the degree of reuse among the plurality of instruction sections, and a section identification for identifying the reuse section A program analysis processing apparatus comprising: a reuse section information generation unit that generates reuse section information associated with information.
複数の命令区間が含まれる命令列に基づく処理を実行する実行部と、前記命令区間を呼び出すための呼出し命令の実行前に前記命令区間の入力値を設定するための入力値設定命令の入力値設定命令アドレスを前記命令区間の区間識別情報ごとに保持する入力値設定命令アドレステーブルと、前記区間識別情報ごとに前記命令区間における入力値および実行結果を関連付けて実行履歴として保持する履歴メモリとを備えるデータ処理装置におけるデータ処理方法であって、
前記入力値設定命令アドレスにより特定された前記入力値設定命令から前記呼出し命令までの命令群のうちの前記入力値設定命令に基づいて前記実行部から出力された入力値と前記入力値設定命令アドレスに対応する前記区間識別情報とを用いて前記実行履歴における前記実行結果を検索する実行履歴検索手順と、
前記入力値設定命令アドレスによって特定される前記呼出し命令が実行されるときに前記実行履歴検索手順により前記実行結果が抽出された場合には前記抽出された実行結果を前記実行部に出力する実行結果出力手順と
を具備するデータ処理方法。
An execution unit for executing processing based on an instruction sequence including a plurality of instruction sections, and an input value setting instruction input value for setting an input value of the instruction section before execution of a call instruction for calling the instruction section An input value setting instruction address table that holds a set instruction address for each section identification information of the instruction section, and a history memory that holds an input value and an execution result in the instruction section for each section identification information and stores them as an execution history. A data processing method in a data processing apparatus comprising:
The input value and the input value setting instruction address output from the execution unit based on the input value setting instruction in the instruction group from the input value setting instruction to the call instruction specified by the input value setting instruction address An execution history search procedure for searching for the execution result in the execution history using the section identification information corresponding to
When the execution result is extracted by the execution history search procedure when the call instruction specified by the input value setting instruction address is executed, the execution result is output to the execution unit. A data processing method comprising: an output procedure.
プログラムのうち複数回実行される命令区間の各々の実行結果が互いに一致する度合いを示す再利用度を前記命令区間の使用態様に基づいて前記命令区間ごとに生成する再利用度生成手順と、
前記複数の命令区間のうち前記再利用度に基づいて抽出された再利用区間における入力値を設定するための入力値設定命令の入力値設定命令アドレスと前記再利用区間を識別するための区間識別情報とが関連付けられた再利用区間情報を生成する再利用区間情報生成手順と
を具備するプログラム解析処理方法。
A reuse degree generation procedure for generating a reuse degree for each instruction section based on a usage mode of the instruction section;
An input value setting instruction address of an input value setting instruction for setting an input value in a reuse section extracted based on the degree of reuse among the plurality of instruction sections, and a section identification for identifying the reuse section A program analysis processing method comprising: a reuse section information generation procedure for generating reuse section information associated with information.
JP2009187624A 2009-08-13 2009-08-13 Data processing device, data processing method, program analysis processing device, and program analysis processing method Abandoned JP2011039858A (en)

Priority Applications (7)

Application Number Priority Date Filing Date Title
JP2009187624A JP2011039858A (en) 2009-08-13 2009-08-13 Data processing device, data processing method, program analysis processing device, and program analysis processing method
KR1020127003143A KR20120068824A (en) 2009-08-13 2010-08-05 Data processing device, data processing method, program conversion processing device, program conversion processing method, program analysis processing device, program analysis processing method, history storing device, program, compile processing device, and compile processing method
TW099126111A TW201124910A (en) 2009-08-13 2010-08-05 Data processing device, data processing method, program conversion processing device, and program conversion processing method
US13/389,134 US20120185859A1 (en) 2009-08-13 2010-08-05 Methods and systems for program analysis and program conversion
CN2010800349313A CN102667715A (en) 2009-08-13 2010-08-05 Data processing device, data processing method, program conversion processing device, and program conversion processing method, program conversion processing device, data processing device, program conversion processing method, and data processing me
PCT/JP2010/063246 WO2011018974A1 (en) 2009-08-13 2010-08-05 Data processing device, data processing method, program conversion processing device, and program conversion processing method, program conversion processing device, data processing device, program conversion processing method, and data processing method, data processing device, data processing method, program analysis processing device, and program analysis processing method, data processing device, history storing device, data processing method, and program, and compile processing device, data processing device, compile processing method, and program
EP10808157A EP2466453A1 (en) 2009-08-13 2010-08-05 Data processing device, data processing method, program conversion processing device, and program conversion processing method, program conversion processing device, data processing device, program conversion processing method, and data processing method, data processing device, data processing method, program analysis processing device, and program analysis processing method, data processing device, history storing device, data processing method, and program, and compile processing device, data processing device, compile processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009187624A JP2011039858A (en) 2009-08-13 2009-08-13 Data processing device, data processing method, program analysis processing device, and program analysis processing method

Publications (1)

Publication Number Publication Date
JP2011039858A true JP2011039858A (en) 2011-02-24

Family

ID=43767550

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009187624A Abandoned JP2011039858A (en) 2009-08-13 2009-08-13 Data processing device, data processing method, program analysis processing device, and program analysis processing method

Country Status (1)

Country Link
JP (1) JP2011039858A (en)

Similar Documents

Publication Publication Date Title
WO2011018974A1 (en) Data processing device, data processing method, program conversion processing device, and program conversion processing method, program conversion processing device, data processing device, program conversion processing method, and data processing method, data processing device, data processing method, program analysis processing device, and program analysis processing method, data processing device, history storing device, data processing method, and program, and compile processing device, data processing device, compile processing method, and program
US20050132342A1 (en) Pattern-matching system
US7249350B2 (en) Optimized translation of scalar type SIMD instructions into non-scalar SIMD instructions
CN103309644A (en) Translation address cache for a microprocessor
CN108846069B (en) Document execution method and device based on markup language
KR970066865A (en) Optimizer for eliminating transmission commands by analyzing bandlike equivalence relationship
CN114610957A (en) Data processing method, device, equipment and computer storage medium
JP2002287959A (en) Load store queue
JP6648431B2 (en) Matching program, matching method and matching device
US9588747B2 (en) Method and apparatus for converting programs
US9182960B2 (en) Loop distribution detection program and loop distribution detection method
US20070255771A1 (en) Method and system for renewing an index
CN111611788B (en) Data processing method and device, electronic equipment and storage medium
JP2011039858A (en) Data processing device, data processing method, program analysis processing device, and program analysis processing method
JPH0786875B2 (en) Vector processor
CN107329807B (en) Data delay processing method and device, and computer readable storage medium
JP2011039857A (en) Program conversion processing device, data processing device, program conversion processing method, and data processing method
US10108405B2 (en) Compiling apparatus and compiling method
CN115563116A (en) Database table scanning method, device and equipment
JP2011039856A (en) Data processing device, data processing method, program conversion processing device, and program conversion processing method
JP2011096153A (en) Compile processing device, data processing device, compile processing method, and program
JP2011039859A (en) Data processor, history storing device, and data processing method and program
US8554780B2 (en) Search apparatus and search method
WO2022062005A1 (en) Gemm-based image data processing method, apparatus, and device, and medium
CN108958802B (en) Thread pre-operation method, device and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120723

A762 Written abandonment of application

Free format text: JAPANESE INTERMEDIATE CODE: A762

Effective date: 20130416