JP2011039859A - Data processor, history storing device, and data processing method and program - Google Patents

Data processor, history storing device, and data processing method and program Download PDF

Info

Publication number
JP2011039859A
JP2011039859A JP2009187625A JP2009187625A JP2011039859A JP 2011039859 A JP2011039859 A JP 2011039859A JP 2009187625 A JP2009187625 A JP 2009187625A JP 2009187625 A JP2009187625 A JP 2009187625A JP 2011039859 A JP2011039859 A JP 2011039859A
Authority
JP
Japan
Prior art keywords
history
execution
save
unit
loop
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Abandoned
Application number
JP2009187625A
Other languages
Japanese (ja)
Inventor
Mutsuhiro Omori
睦弘 大森
Kurniawan Warih
クルニアワン ワリー
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 JP2009187625A priority Critical patent/JP2011039859A/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 JP2011039859A publication Critical patent/JP2011039859A/en
Abandoned legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To improve efficiency of value reuse by saving the result of execution from a memory for storing the results of execution in value reuse (Memoization). <P>SOLUTION: A history memory 430 holds the result of execution in a reuse section where the result of execution is reused as history of execution. A main storage part 130 holds the result of execution in a repetitive reuse section to be repeatedly executed in the reuse sections, as history of save. A history control part 510 generates the history of evacuation and representative loop history based on individual loop history being the result of execution in the repetitive reuse section. Consequently, the result of execution in the repetitive reuse section is saved in the main storage part 130 as the history of save, and the representative loop history is registered in the history memory 430 instead of the individual loop history including the result of its execution. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、データ処理装置に関し、特に実行結果が再利用される命令区間を実行するデータ処理装置、履歴保存装置、および、これらにおける処理方法ならびに当該方法をコンピュータに実行させるプログラムに関する。   The present invention relates to a data processing device, and more particularly to a data processing device that executes an instruction section in which an execution result is reused, a history storage device, a processing method in these, and a program that causes a computer to execute the method.

プログラムの処理速度を高速化するために種々の技術が開発されている。近年、その技術を用いた装置の一つとして、値再利用(メモ化:Memoization)と呼ばれる命令区間の実行結果を再利用する技法を用いた区間再利用装置が提案されている(例えば、特許文献1参照。)。この区間再利用装置は、プログラムの所定の命令区間における入力値および実行結果を保存しておくことによって、同じ命令区間を再び実行する際に入力値が一致する場合には、保存していた実行結果である出力値を出力する装置である。   Various techniques have been developed to increase the processing speed of programs. In recent years, as one of devices using the technology, an interval reuse device using a technique for reusing the execution result of an instruction interval called value reuse (memoization) has been proposed (for example, a patent) Reference 1). This section reuse device saves the input value and execution result in a predetermined instruction section of the program, so that if the input values match when the same instruction section is executed again, the stored execution It is a device that outputs an output value as a result.

特開2004−258905号公報(図1)JP 2004-258905 A (FIG. 1)

上記の従来技術では、同じ命令区間を再び実行して実行結果を出力する際に、それ以前に保存していた実行結果を出力することによって、その命令区間の実行時間を削減することができる。   In the above-described prior art, when the same instruction section is executed again and an execution result is output, the execution result of the instruction section can be reduced by outputting the execution result stored before that.

しかしながら、このような区間再利用装置では、実行結果を保存しておくメモリが満杯の場合には新たな実行履歴を登録するために古い実行結果を削除することから、その削除された実行結果の再利用ができないという問題が生じる。すなわち、このような区間再利用装置では、実行結果を保存しておくメモリから実行結果が削除されることに起因する値再利用の効率の低下が生じる場合が考えられる。   However, in such a section reuse device, when the memory for storing the execution result is full, the old execution result is deleted to register a new execution history. The problem arises that it cannot be reused. That is, in such a section reuse device, there may be a case where the efficiency of value reuse is reduced due to deletion of the execution result from the memory for storing the execution result.

そこで、本発明はこのような状況に鑑みてなされたものであり、値再利用(メモ化)を行う際、実行結果を保存しておくメモリから実行結果を退避させることにより、値再利用の効率を改善することを目的とする。   Therefore, the present invention has been made in view of such a situation. When value reuse (memoization) is performed, the value reuse is performed by saving the execution result from the memory for saving the execution result. The goal is to improve efficiency.

本発明は、上記課題を解決するためになされたものであり、その第1の側面は、命令区間を実行して実行結果を出力する実行部と、上記命令区間のうち実行結果が再び利用される再利用区間の区間識別情報と入力値と実行結果とを実行履歴として保持し、上記保持した実行結果が再び利用される場合には上記区間識別情報および上記入力値に基づいて上記実行履歴が検索される履歴メモリと、上記再利用区間のうち実行が反復される反復再利用区間の各回の上記実行結果を上記履歴メモリから退避させるための退避履歴を保持する退避履歴保持部と、上記反復再利用区間の上記実行履歴に基づいて上記退避履歴を上記退避履歴保持部に供給し、上記退避履歴の供給の際に上記退避履歴の基となった上記実行履歴を上記履歴メモリから消去して上記退避履歴を指し示す情報を含む代表履歴を上記履歴メモリに保持させる履歴制御部とを備えるデータ処理装置およびその処理方法ならびに当該方法をコンピュータに実行させるプログラムである。これにより、再利用区間の実行が反復される反復再利用区間の実行結果を履歴メモリから退避履歴保持部に退避させるという作用をもたらす。   The present invention has been made in order to solve the above-described problems. The first aspect of the present invention is that an execution unit that executes an instruction interval and outputs an execution result, and the execution result of the instruction interval is used again. The section identification information, the input value, and the execution result of the reuse section are stored as an execution history. When the stored execution result is used again, the execution history is stored based on the section identification information and the input value. A history memory to be searched; a save history holding unit for holding a save history for saving the execution result of each iteration of the reuse interval in the reuse interval, from the history memory; and the iteration Based on the execution history of the reuse section, the save history is supplied to the save history holding unit, and the execution history that is the basis of the save history is deleted from the history memory when the save history is supplied. Representative history including the information indicating the serial saving history is a program for executing a data processing apparatus and processing method, and the method and a history control unit to be held in the history memory in the computer. As a result, the execution result of the repeated reuse section in which the execution of the reuse section is repeated is saved from the history memory to the save history holding unit.

また、この第1の側面において、上記履歴制御部は、上記履歴メモリに保持させる新たな上記実行履歴のデータ量が上記履歴メモリの空き容量よりも大きい場合には上記退避履歴を上記退避履歴保持部に供給するようにしてもよい。これにより、実行履歴のデータ量が履歴メモリの空き容量よりも大きい場合には、反復再利用区間の実行結果を履歴メモリから退避履歴保持部に退避させるという作用をもたらす。   In the first aspect, the history control unit holds the save history when the data amount of the new execution history to be held in the history memory is larger than the free capacity of the history memory. You may make it supply to a part. As a result, when the data amount of the execution history is larger than the free space of the history memory, the execution result of the repeated reuse section is saved from the history memory to the save history holding unit.

また、この第1の側面において、上記退避履歴および上記代表履歴に基づいて上記実行履歴を上記履歴メモリに復元する履歴復元部と、上記区間識別情報および上記入力値に基づいて上記復元された上記実行履歴を上記履歴メモリから検索した場合には上記復元された上記実行履歴に基づいて上記実行結果を出力する履歴検索部とをさらに備えるようにしてもよい。これにより、退避履歴および代表履歴に基づいて復元した実行履歴を用いて実行結果を再利用させるという作用をもたらす。この場合において、上記履歴検索部は、上記区間識別情報および上記入力値に基づいて検索された上記実行履歴が上記代表履歴であった場合には上記復元部に上記実行履歴の復元を開始させるようにしてもよい。これにより、履歴検索部において代表履歴が検索された場合には、復元部に反復再利用区間の実行履歴を復元させるという作用をもたらす。この場合において、上記履歴制御部は、上記退避履歴の個数を示す退避カウントをさらに含む上記代表履歴を生成し、上記履歴復元部は、上記代表履歴における上記退避履歴を指し示す情報および上記退避カウントに基づいて上記退避履歴を上記退避履歴保持部から抽出して上記実行履歴を復元させるようにしてもよい。これにより、代表履歴における退避履歴を指し示す情報および退避カウントに基づいて退避履歴を退避履歴保持部から抽出させるという作用をもたらす。   Further, in the first aspect, a history restoration unit that restores the execution history to the history memory based on the save history and the representative history, and the restoration that is restored based on the section identification information and the input value When the execution history is searched from the history memory, a history search unit that outputs the execution result based on the restored execution history may be further provided. This brings about the effect that the execution result is reused using the execution history restored based on the save history and the representative history. In this case, when the execution history searched based on the section identification information and the input value is the representative history, the history search unit causes the restoration unit to start restoring the execution history. It may be. As a result, when the representative history is searched in the history search unit, the restoring unit restores the execution history of the repeated reuse section. In this case, the history control unit generates the representative history further including a save count indicating the number of the save histories, and the history restoration unit adds information indicating the save history in the representative history and the save count. Based on this, the execution history may be restored by extracting the save history from the save history holding unit. Thus, there is an effect that the save history is extracted from the save history holding unit based on the information indicating the save history in the representative history and the save count.

また、この第1の側面において、上記実行部は、上記再利用区間の上記実行結果を供給する場合には上記反復再利用区間の上記実行履歴と上記反復再利用区間以外の上記実行履歴と上記代表履歴とを識別するための識別子をさらに出力し、上記履歴メモリは、上記識別子を上記実行履歴としてさらに保持し、上記履歴制御部は、上記識別子を用いて識別した上記実行履歴に基づいて上記退避履歴を供給し、上記識別子をさらに含む上記代表履歴を生成させるようにしてもよい。これにより、識別子を用いて実行履歴を識別させるという作用をもたらす。   Further, in the first aspect, when the execution unit supplies the execution result of the reuse section, the execution history of the repeated reuse section, the execution history other than the repeated reuse section, and the An identifier for identifying a representative history is further output, the history memory further holds the identifier as the execution history, and the history control unit is configured to execute the identification based on the execution history identified using the identifier. The save history may be supplied, and the representative history further including the identifier may be generated. This brings about the effect of identifying the execution history using the identifier.

また、この第1の側面において、上記反復再利用区間はサブルーチンであり、上記実行部は、上記サブルーチンの開始アドレスを上記区間識別情報として出力するようにしてもよい。これにより、サブルーチンの開始アドレスを区間識別情報として出力させるという作用をもたらす。   In the first aspect, the repetitive reuse section may be a subroutine, and the execution unit may output a start address of the subroutine as the section identification information. This brings about the effect that the start address of the subroutine is output as section identification information.

また、この第1の側面において、上記反復再利用区間はループであり、上記実行部は、上記ループの開始アドレスを上記区間識別情報として出力するようにしてもよい。これにより、ループの開始アドレスを上記区間識別情報として出力させるという作用をもたらす。この場合において、上記実行部は、上記反復再利用区間の上記実行結果を出力する場合には何回目の実行による上記実行結果であるかを示すカウンタ値をさらに出力し、上記履歴メモリは、上記カウンタ値を上記実行履歴としてさらに保持し、上記履歴制御部は、上記カウンタ値を含む上記退避履歴を出力するようにしてもよい。これにより、カウンタ値を含む実行履歴および退避履歴を保持させるという作用をもたらす。   In the first aspect, the repeated reuse section may be a loop, and the execution unit may output a start address of the loop as the section identification information. This brings about the effect that the start address of the loop is output as the section identification information. In this case, when the execution unit outputs the execution result of the iterative reuse section, the execution unit further outputs a counter value indicating the execution result of the number of executions. The counter value may be further held as the execution history, and the history control unit may output the save history including the counter value. As a result, the execution history and the saving history including the counter value are retained.

また、本発明の第2の側面は、実行結果が再び利用される再利用区間の区間識別情報と入力値と実行結果とを実行履歴として保持し、上記保持した実行結果が再び利用される場合には上記区間識別情報および上記入力値に基づいて上記実行履歴が検索される履歴メモリと、上記再利用区間のうち実行が反復される反復再利用区間の各回の上記実行結果を退避履歴として上記履歴メモリから外部の記憶部に退避させ、上記退避の際に上記退避履歴の基となった上記実行履歴を上記履歴メモリから消去して上記退避履歴を指し示す情報を含む代表履歴を上記履歴メモリに保持させる履歴制御部とを備える履歴保存装置である。これにより、実行が反復される反復再利用区間の実行結果を履歴メモリから外部の記憶部に退避させるという作用をもたらす。   Further, according to the second aspect of the present invention, the section identification information, the input value, and the execution result of the reuse section in which the execution result is reused are held as an execution history, and the held execution result is used again. The history memory for searching for the execution history based on the section identification information and the input value, and the execution result of each iteration of the reuse section in which the execution is repeated among the reuse sections as the save history A representative history including information indicating the save history is saved in the history memory by saving the history from the history memory to an external storage unit, erasing the execution history that is the basis of the save history at the time of the save, and the history memory. A history storage device including a history control unit to be held. As a result, the execution result of the repeated reuse section in which execution is repeated is saved from the history memory to an external storage unit.

本発明によれば、値再利用(メモ化)を行う際、実行結果を保存しておくメモリから実行結果を退避させることにより、値再利用の効率を改善することができるという優れた効果を奏し得る。   According to the present invention, when value reuse (memoization) is performed, it is possible to improve the efficiency of value reuse by saving the execution result from the memory that stores the execution result. Can play.

本発明の実施の形態におけるデータ処理装置100の構成例を示すブロック図である。It is a block diagram which shows the structural example of the data processing apparatus 100 in embodiment of this invention. 本発明の実施の形態におけるプロセッサコア300と履歴管理部400と履歴変換部500との構成例を示すブロック図である。It is a block diagram which shows the structural example of the processor core 300, the log | history management part 400, and the log | history conversion part 500 in embodiment of this invention. 本発明の実施の形態における履歴制御部510の構成例を示すブロック図である。It is a block diagram which shows the structural example of the log | history control part 510 in embodiment of this invention. 本発明の実施の形態における退避履歴生成部600の構成例を示すブロック図である。It is a block diagram which shows the structural example of the save history production | generation part 600 in embodiment of this invention. 本発明の実施の形態における履歴復元部520の構成例を示すブロック図である。It is a block diagram which shows the structural example of the log | history decompression | restoration part 520 in embodiment of this invention. 本発明の実施の形態における関数履歴、ループ個別履歴、ループ代表履歴および退避履歴のデータ構造例を示す模式図である。It is a schematic diagram which shows the example of a data structure of the function log | history, loop separate log | history, loop representative log | history, and save log | history in embodiment of this invention. 本発明の実施の形態における入力値リンクおよび実行結果リンクのデータ構造例を示す概念図である。It is a conceptual diagram which shows the example of a data structure of the input value link in embodiment of this invention, and an execution result link. 本発明の実施の形態における履歴制御部510によるループ個別履歴の退避の際の、履歴メモリ430および主記憶部130における実行履歴、ループ代表履歴および退避履歴の具体例を示す図である。It is a figure which shows the specific example of the execution log | history in the log | history memory 430 and the main memory | storage part 130, a loop representative log | history, and a saving log | history at the time of the saving of the loop separate log | history by the log | history control part 510 in embodiment of this invention. 本発明の実施の形態における履歴復元部520によるループ個別履歴の復元の際の、履歴メモリ430および主記憶部130における実行履歴、ループ代表履歴および退避履歴の具体例を示す図である。It is a figure which shows the specific example of the execution log | history in the log | history memory 430 and the main memory | storage part 130, a loop representative log | history, and an evacuation log | history at the time of log | history recovery of the loop individual log | history by the log | history restoring part 520 in embodiment of this invention. 本発明の実施の形態における新たな実行履歴が登録されるときの履歴メモリ430における履歴情報と主記憶部130における退避履歴との具体例を示す図である。It is a figure which shows the specific example of the log | history information in the log | history memory 430 when the new execution log | history in embodiment of this invention is registered, and the save log | history in the main memory part 130. FIG. 本発明の実施の形態における履歴制御部510によるループ個別履歴の退避処理の処理手順例を示すフローチャートである。It is a flowchart which shows the example of a process sequence of the save process of the loop separate log | history by the log | history control part 510 in embodiment of this invention. 本発明の実施の形態における履歴制御部510によるループ個別履歴の連履歴探索退避処理(ステップS930)の処理手順例を示すフローチャートである。It is a flowchart which shows the example of a process sequence of the continuous log | history search search process (step S930) of the loop separate log | history by the log | history control part 510 in embodiment of this invention. 本発明の実施の形態における履歴復元部520によるループ個別履歴の復元処理の処理手順例を示すフローチャートである。It is a flowchart which shows the example of a process sequence of the restoration process of the loop separate log | history by the log | history restoring part 520 in embodiment of this invention. 本発明の実施の形態における実行結果登録処理(ステップS970)の処理手順例を示すフローチャートである。It is a flowchart which shows the example of a process sequence of the execution result registration process (step S970) in embodiment of this invention. 本発明の実施の形態における実行結果出力処理(ステップS980)の処理手順例を示すフローチャートである。It is a flowchart which shows the example of a process sequence of the execution result output process (step S980) in embodiment of this invention.

以下、本発明を実施するための形態(以下、実施の形態と称する)について説明する。説明は以下の順序により行う。
1.データ処理装置の構成例(値再利用制御:反復再利用区間の実行履歴を退避する例)
2.履歴情報のフィールド構成例(値再利用制御:関数履歴、ループ個別履歴、ループ代表履歴および退避履歴の例)
3.履歴メモリに保持される履歴情報および主記憶部に保持される退避履歴の一例(値再利用制御:ループ個別履歴例を退避および復元させる例)
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. Data processor configuration example (value reuse control: example of saving the execution history of repeated reuse sections)
2. Example of history information field configuration (value reuse control: function history, loop individual history, loop representative history, and save history example)
3. Example of history information held in history memory and save history held in main memory (value reuse control: example of saving and restoring loop individual history example)
4). Processing procedure example of data processing device (value reuse control: example of saving and restoring loop individual history example)

<1.データ処理装置の構成例>
[データ処理装置100の構成例]
図1は、本発明の実施の形態におけるデータ処理装置100の構成例を示すブロック図である。このデータ処理装置100は、バス120を介して主記憶部130と相互に接続されている。また、ここでは、データ処理装置100が処理を実行する命令区間は関数またはループであることを想定する。
<1. Configuration example of data processing device>
[Configuration Example of Data Processing Device 100]
FIG. 1 is a block diagram illustrating a configuration example of a data processing device 100 according to an embodiment of the present invention. The data processing apparatus 100 is connected to the main storage unit 130 via the bus 120. Here, it is assumed that the instruction section in which the data processing apparatus 100 executes processing is a function or a loop.

データ処理装置100は、プログラムにおける各処理を実行するものである。このデータ処理装置100は、例えば、一般的なコンピュータにおいてはCPU(Central Processing Unit)により実現される。このデータ処理装置100は、一次キャッシュ200と、プロセッサコア300と、履歴管理部400と、履歴変換部500とを備える。   The data processing device 100 executes each process in the program. The data processing apparatus 100 is realized by a CPU (Central Processing Unit) in a general computer, for example. The data processing apparatus 100 includes a primary cache 200, a processor core 300, a history management unit 400, and a history conversion unit 500.

一次キャッシュ200は、プロセッサコア300がバス120を介して扱う情報を一時的に保持するものである。この一次キャッシュ200は、命令キャッシュ210およびデータキャッシュ220を備える。   The primary cache 200 temporarily holds information handled by the processor core 300 via the bus 120. The primary cache 200 includes an instruction cache 210 and a data cache 220.

命令キャッシュ210は、プロセッサコア300において実行される命令を一時的に保持するものである。この命令キャッシュ210は、プロセッサコア300が頻繁に実行する命令を一時的に保持することによって、プロセッサコア300から主記憶部130へのアクセスを軽減させ、プロセッサコア300におけるデータの入力待ち時間を軽減させることができる。この命令キャッシュ210は、主記憶部130から供給された再利用命令をプロセッサコア300に供給する。ここにいう再利用命令とは、命令区間のうち実行結果が再び利用される再利用区間を再び利用されない区間と区別することによって、再利用区間が呼出された際に実行結果を再利用するための処理をデータ処理装置に行わせる命令である。   The instruction cache 210 temporarily holds instructions executed in the processor core 300. The instruction cache 210 temporarily holds instructions executed frequently by the processor core 300, thereby reducing access from the processor core 300 to the main storage unit 130 and reducing data input waiting time in the processor core 300. Can be made. The instruction cache 210 supplies a reuse instruction supplied from the main storage unit 130 to the processor core 300. The reuse instruction here means that the execution result is reused when the reuse section is called by distinguishing the reuse section in which the execution result is reused in the instruction section from the non-reuse section. This is an instruction for causing the data processing apparatus to perform the above process.

データキャッシュ220は、プロセッサコア300の入力データおよび出力データを一時的に保持するものである。このデータキャッシュ220は、使用頻度の高いプロセッサコア300の入力データを一時的に保持することによりプロセッサコア300から主記憶部130へのアクセスを軽減させて、プロセッサコア300におけるデータの入力待ち時間を軽減させる。このデータキャッシュ220は、主記憶部130から供給された関数またはループの入力値および開始アドレスをプロセッサコア300に出力する。なお、ここで、入力値とは、関数またはループの実行に必要な値として渡される値の引数で構成される値であり、例えば、3つの変数を引数とする関数の場合には、この3つの変数の値およびその変数のアドレスである。   The data cache 220 temporarily holds input data and output data of the processor core 300. This data cache 220 temporarily reduces the access from the processor core 300 to the main storage unit 130 by temporarily holding the input data of the processor core 300 that is frequently used, thereby reducing the data input waiting time in the processor core 300. Reduce. The data cache 220 outputs the function or loop input value and start address supplied from the main storage unit 130 to the processor core 300. Here, the input value is a value composed of an argument of a value passed as a value necessary for execution of the function or loop. For example, in the case of a function having three variables as arguments, The value of one variable and the address of that variable.

プロセッサコア300は、プログラムの命令に従って演算を実行するものである。このプロセッサコア300は、例えば、MIPS(Microprocessor without Interlocked Pipeline Stages)プロセッサにより実現される。プロセッサコア300は、例えば、データキャッシュ220から供給される関数またはループの入力値および開始アドレスに基づいて、命令キャッシュ210から入力される関数またはループの区間における命令を実行し、その実行の結果を実行結果として出力する。このプロセッサコア300は、入力される命令が再利用区間を指定する再利用命令である場合において履歴管理部400から実行結果が供給されないときには、この命令を実行した結果である実行結果をデータキャッシュ220および履歴管理部400に出力する。   The processor core 300 executes operations in accordance with program instructions. The processor core 300 is realized by, for example, a MIPS (Microprocessor without Interlocked Pipeline Stages) processor. The processor core 300 executes the instruction in the function or loop section input from the instruction cache 210 based on, for example, the input value and start address of the function or loop supplied from the data cache 220, and the result of the execution is executed. Output as the execution result. If the execution result is not supplied from the history management unit 400 when the input instruction is a reuse instruction that specifies a reuse section, the processor core 300 displays the execution result that is the result of executing this instruction in the data cache 220. And output to the history management unit 400.

また、プロセッサコア300は、入力される命令が再利用区間を指定する再利用命令である場合において履歴管理部400から実行結果が供給されたときには、再利用区間における処理を中止して、この再利用区間を呼び出したルーチンに戻って実行を継続する。   Further, when an execution result is supplied from the history management unit 400 when the input instruction is a reuse instruction that designates a reuse section, the processor core 300 stops the process in the reuse section and performs this re-use. Return to the routine that called the usage interval and continue execution.

履歴管理部400は、再利用区間の実行結果を保持して管理するものである。この履歴管理部400は、プロセッサコア300から供給された再利用区間の区間識別情報と入力値と実行結果とを実行履歴として保持する。ここでいう区間識別情報とは、再利用区間を特定するための情報であり、例えば、関数またはループの開始アドレスである。すなわち、この履歴管理部400は、区間識別情報、入力値、および、実行結果として、関数またはループの開始アドレス、入力値、および、実行結果を保持する。また、この履歴管理部400は、プロセッサコア300から関数またはループの開始アドレスおよび入力値が供給された場合には、この開始アドレスおよび入力値が含まれる実行履歴を検索する。   The history management unit 400 holds and manages the execution result of the reuse section. The history management unit 400 holds the section identification information, the input value, and the execution result of the reuse section supplied from the processor core 300 as an execution history. The section identification information here is information for specifying a reuse section, for example, a function or loop start address. That is, the history management unit 400 holds a function or loop start address, an input value, and an execution result as section identification information, an input value, and an execution result. In addition, when the function or loop start address and input value are supplied from the processor core 300, the history management unit 400 searches for an execution history including the start address and input value.

履歴変換部500は、履歴管理部400により管理されている実行履歴を変換するものである。この履歴変換部500は、履歴管理部400に登録されている再利用区間のうち実行が反復される反復再利用区間の実行履歴を、主記憶部130において保持される退避履歴に変換する。ここで、退避履歴とは、反復再利用区間の実行履歴の実行結果を主記憶部130に退避させるためのデータである。また、この履歴変換部500は、主記憶部130において保持された退避履歴に基づいて実行履歴を復元する。この履歴変換部500は、その退避履歴を主記憶部130に保持させ、退避履歴を生成する基となった実行履歴を履歴管理部400から消去し、退避履歴を指し示す情報を保持する代表履歴を履歴管理部400に登録する。   The history conversion unit 500 converts the execution history managed by the history management unit 400. The history conversion unit 500 converts an execution history of an iterative reuse section that is repeatedly executed among the reuse sections registered in the history management unit 400 into a save history held in the main storage unit 130. Here, the save history is data for saving the execution result of the execution history of the repeated reuse section to the main storage unit 130. The history conversion unit 500 restores the execution history based on the save history held in the main storage unit 130. The history conversion unit 500 stores the save history in the main storage unit 130, deletes the execution history that is the basis for generating the save history from the history management unit 400, and displays a representative history that holds information indicating the save history. Register in the history management unit 400.

また、この履歴変換部500は、その退避履歴に含まれる実行結果を再利用する場合には、退避履歴から実行履歴を復元するとともに代表履歴を消去し、履歴管理部400に復元した実行履歴を登録する。   When the execution result included in the save history is reused, the history conversion unit 500 restores the execution history from the save history, erases the representative history, and stores the restored execution history in the history management unit 400. sign up.

バス120は、データ処理装置100の各部と主記憶部130との間を相互に接続するバスである。   The bus 120 is a bus that mutually connects each unit of the data processing apparatus 100 and the main storage unit 130.

主記憶部130は、データ処理装置100が動作するために必要なデータを保持するものである。この主記憶部130は、履歴変換部500から供給された退避履歴を保持する。また、この主記憶部130は、データ処理装置100に処理を実行させるためのプログラムを記憶する。この主記憶部130は、例えば、RAM(Random Access Memory)などが考えられる。この主記憶部130は、記憶しているデータを、バス120を介してデータ処理装置100に出力する。なお、主記憶部130は、特許請求の範囲に記載の退避履歴保持部の一例である。   The main storage unit 130 holds data necessary for the data processing apparatus 100 to operate. The main storage unit 130 holds the save history supplied from the history conversion unit 500. The main storage unit 130 stores a program for causing the data processing apparatus 100 to execute processing. For example, a RAM (Random Access Memory) may be used as the main storage unit 130. The main storage unit 130 outputs the stored data to the data processing apparatus 100 via the bus 120. The main storage unit 130 is an example of a save history holding unit described in the claims.

[プロセッサコア300と履歴管理部400と履歴変換部500との構成例]
図2は、本発明の実施の形態におけるプロセッサコア300と履歴管理部400と履歴変換部500との構成例を示すブロック図である。ここでは、プロセッサコア300と履歴管理部400と履歴変換部500とに加えて、バス120を介して履歴変換部500と接続される主記憶部130も示されている。ここでは、プロセッサコア300と履歴管理部400と履歴変換部500と主記憶部130との機能は、図1と同様のものであるため、同一の符号を付してここでの詳細な説明を省略する。
[Configuration Example of Processor Core 300, History Management Unit 400, and History Conversion Unit 500]
FIG. 2 is a block diagram illustrating a configuration example of the processor core 300, the history management unit 400, and the history conversion unit 500 in the embodiment of the present invention. Here, in addition to the processor core 300, the history management unit 400, and the history conversion unit 500, a main storage unit 130 connected to the history conversion unit 500 via the bus 120 is also shown. Here, since the functions of the processor core 300, the history management unit 400, the history conversion unit 500, and the main storage unit 130 are the same as those in FIG. 1, the same reference numerals are given and detailed description thereof will be given here. Omitted.

また、これ以降の説明では、便宜上、繰り返し実行される区間である反復再利用区間はループであり、反復再利用区間以外の再利用区間は関数であることを想定する。この反復再利用区間以外の再利用区間は、関数再利用区間と表現することとする。そして、ループの実行結果をループ個別履歴と表現し、関数の実行結果を関数履歴と表現することとする。さらに、退避履歴を指し示す代表履歴は、ループ代表履歴と表現する。   In the following description, for the sake of convenience, it is assumed that an iterative reuse section that is an iteratively executed section is a loop, and a reuse section other than the iterative reuse section is a function. A reuse section other than the repeated reuse section is expressed as a function reuse section. The loop execution result is expressed as a loop individual history, and the function execution result is expressed as a function history. Further, the representative history indicating the save history is expressed as a loop representative history.

プロセッサコア300は、フェッチ部310と、命令デコーダ320と、実行部330と、レジスタファイル340とを備える。   The processor core 300 includes a fetch unit 310, an instruction decoder 320, an execution unit 330, and a register file 340.

フェッチ部310は、命令キャッシュ210または主記憶部130からの命令を読み出すものである。このフェッチ部310は、その読み出した命令を一時的に保持して、その保持されている命令のうち、実行部330に実行させるための命令を命令デコーダ320に供給する。このフェッチ部310は、例えば、一時的に保持している命令のうち、実行部330において実行される再利用命令を命令デコーダ320に供給する。このフェッチ部310は、例えば、主記憶部130に記憶された再利用命令を命令デコーダ320に供給する。   The fetch unit 310 reads an instruction from the instruction cache 210 or the main storage unit 130. The fetch unit 310 temporarily holds the read instruction, and supplies an instruction to be executed by the execution unit 330 among the held instructions to the instruction decoder 320. For example, the fetch unit 310 supplies a reuse instruction to be executed by the execution unit 330 among the temporarily held instructions to the instruction decoder 320. For example, the fetch unit 310 supplies a reuse instruction stored in the main storage unit 130 to the instruction decoder 320.

命令デコーダ320は、フェッチ部310から供給された命令を解読(デコード)することによって、プロセッサコア300における構成部位を制御する制御信号を生成するものである。この命令デコーダ320は、例えば、命令を解読することによって実行部330およびレジスタファイル340を制御する制御信号を生成して、その生成された制御信号を実行部330およびレジスタファイル340に供給する。   The instruction decoder 320 generates a control signal for controlling the components in the processor core 300 by decoding the instruction supplied from the fetch unit 310. For example, the instruction decoder 320 generates a control signal for controlling the execution unit 330 and the register file 340 by decoding the instruction, and supplies the generated control signal to the execution unit 330 and the register file 340.

この命令デコーダ320は、フェッチ部310から再利用命令が供給された場合には、その再利用命令を解析することによって、実行部330およびレジスタファイル340の各々を制御する制御信号を実行部330およびレジスタファイル340に供給する。   When a reuse instruction is supplied from the fetch unit 310, the instruction decoder 320 analyzes the reuse instruction, thereby generating control signals for controlling the execution unit 330 and the register file 340. This is supplied to the register file 340.

実行部330は、命令デコーダ320から供給された制御信号に基づいて、命令デコーダ320において解析した命令を実行するものである。この実行部330は、命令デコーダ320が再利用命令をデコードした場合、再利用命令が指定する再利用区間の処理を開始する。また、この再利用区間の処理の開始とともに、実行部330は、レジスタファイル340から取得した再利用区間の区間識別情報を、信号線309を介して履歴管理部400に出力する。そして、実行部330は、レジスタファイル340から供給される再利用区間の入力値に基づいて再利用区間における処理を実行するとともに、再利用区間の入力値を、信号線309を介して履歴管理部400に出力する。   The execution unit 330 executes the instruction analyzed in the instruction decoder 320 based on the control signal supplied from the instruction decoder 320. When the instruction decoder 320 decodes the reuse instruction, the execution unit 330 starts processing of the reuse section specified by the reuse instruction. Further, along with the start of the processing of the reuse section, the execution unit 330 outputs the section identification information of the reuse section acquired from the register file 340 to the history management unit 400 via the signal line 309. Then, the execution unit 330 executes processing in the reuse interval based on the input value of the reuse interval supplied from the register file 340, and the history management unit receives the input value of the reuse interval via the signal line 309. Output to 400.

また、実行部330は、履歴管理部400から再利用区間の実行結果が供給された場合には、再利用区間の処理を中止するとともに、その実行結果を履歴管理部400から供給された旨を通知する信号をフェッチ部310に供給する。この時、実行部330は、実行結果をレジスタファイル340に出力する。   In addition, when the execution result of the reuse section is supplied from the history management unit 400, the execution unit 330 cancels the processing of the reuse section and indicates that the execution result is supplied from the history management unit 400. A signal to be notified is supplied to the fetch unit 310. At this time, the execution unit 330 outputs the execution result to the register file 340.

一方、実行部330は、履歴管理部400から再利用区間の実行結果が供給されない場合には、再利用区間の処理を最後まで実行して、その実行結果を履歴管理部400およびレジスタファイル340に出力する。さらに、この実行部330は、反復再利用区間の実行結果が供給されない場合には、何回目の実行による実行結果であるのかを示すループカウンタ値を実行結果とともに履歴管理部400に出力する。なお、ループカウンタ値は、特許請求の範囲に記載のカウンタ値の一例である。   On the other hand, when the execution result of the reuse section is not supplied from the history management unit 400, the execution unit 330 executes the process of the reuse section to the end, and sends the execution result to the history management unit 400 and the register file 340. Output. Further, when the execution result of the repetitive reuse section is not supplied, the execution unit 330 outputs a loop counter value indicating the execution result of the number of executions to the history management unit 400 together with the execution result. The loop counter value is an example of the counter value described in the claims.

レジスタファイル340は、データキャッシュ220から供給されたデータおよび実行部330から供給された実行結果を一時的に保持するものである。このレジスタファイル340は、例えば、命令デコーダ320から再利用命令に基づく制御信号が供給された場合には、再利用区間の入力値を実行部330に供給する。   The register file 340 temporarily holds the data supplied from the data cache 220 and the execution result supplied from the execution unit 330. For example, when a control signal based on a reuse instruction is supplied from the instruction decoder 320, the register file 340 supplies the input value of the reuse section to the execution unit 330.

履歴管理部400は、再利用区間の実行結果を保持して管理するものであり、履歴対象データ保持部410と、履歴検索部420と、履歴メモリ430と、履歴登録部440と、履歴メモリ容量管理部450と、消去部460とを備える。   The history management unit 400 holds and manages the execution result of the reuse section. The history target data holding unit 410, the history search unit 420, the history memory 430, the history registration unit 440, and the history memory capacity A management unit 450 and an erasing unit 460 are provided.

履歴対象データ保持部410は、実行部330から供給されたデータを一時的に保持するものである。この履歴対象データ保持部410は、実行部330から区間識別情報および入力値が供給された際には、これらを検索要求として履歴検索部420に供給する。この履歴対象データ保持部410は、例えば、実行部330において関数再利用区間が実行された場合には、実行部330から供給された関数の開始アドレスおよび入力値を、検索要求として履歴検索部420に供給する。また、履歴対象データ保持部410は、実行部330において反復再利用区間が実行された場合には、実行部330から供給されたループの開始アドレス、入力値およびループカウンタ値を検索要求として履歴検索部420に供給する。   The history target data holding unit 410 temporarily holds the data supplied from the execution unit 330. When the section identification information and the input value are supplied from the execution unit 330, the history target data holding unit 410 supplies these to the history search unit 420 as a search request. For example, when a function reuse section is executed in the execution unit 330, the history target data holding unit 410 uses the start address and input value of the function supplied from the execution unit 330 as a search request. To supply. In addition, when the repetitive reuse section is executed in the execution unit 330, the history target data holding unit 410 performs a history search using the loop start address, input value, and loop counter value supplied from the execution unit 330 as a search request. To the unit 420.

また、この履歴対象データ保持部410は、実行部330から区間識別情報と、入力値と、実行結果とが供給された場合には、実行履歴を登録する条件が整うため、これらを実行履歴として履歴登録部440に供給する。例えば、履歴対象データ保持部410は、実行部330において関数再利用区間が実行された場合には、実行部330から供給された関数の開始アドレスと入力値と実行結果とを実行履歴として履歴登録部440に供給する。また、履歴対象データ保持部410は、実行部330において反復再利用区間が実行された場合には、ループの開始アドレスと入力値と実行結果とループカウンタ値とを実行履歴として履歴登録部440に供給する。   In addition, when the section identification information, the input value, and the execution result are supplied from the execution unit 330, the history target data holding unit 410 has a condition for registering the execution history. This is supplied to the history registration unit 440. For example, when a function reuse section is executed in the execution unit 330, the history target data holding unit 410 registers the function start address, input value, and execution result supplied from the execution unit 330 as an execution history. Part 440. In addition, when the repetitive reuse section is executed in the execution unit 330, the history target data holding unit 410 stores the loop start address, input value, execution result, and loop counter value in the history registration unit 440 as an execution history. Supply.

履歴検索部420は、履歴対象データ保持部410から供給された検索要求に基づいて実行履歴を検索するものである。この履歴検索部420は、検索要求入力部421および実行結果出力部422を備える。   The history search unit 420 searches the execution history based on the search request supplied from the history target data holding unit 410. The history search unit 420 includes a search request input unit 421 and an execution result output unit 422.

検索要求入力部421は、履歴対象データ保持部410から供給された検索要求に基づいて履歴メモリ430から実行履歴を検索するものである。この検索要求入力部421は、例えば、反復再利用区間を指定する命令が命令デコーダ320において解析された場合には、この命令により指定されたループの開始アドレス、入力値およびループカウンタ値を履歴メモリ430に供給する。これにより、実行履歴の検索を開始する。   The search request input unit 421 searches the history memory 430 for an execution history based on the search request supplied from the history target data holding unit 410. For example, when an instruction designating an iterative reuse section is analyzed in the instruction decoder 320, the search request input unit 421 stores a loop start address, an input value, and a loop counter value designated by this instruction in the history memory. 430. Thereby, the search of the execution history is started.

実行結果出力部422は、履歴メモリ430において実行履歴が検索された場合に実行結果を履歴メモリ430から抽出して、その抽出した実行結果を実行部330に出力するものである。この実行結果出力部422は、その抽出した実行結果を、信号線409を介して実行部330に供給する。   The execution result output unit 422 extracts the execution result from the history memory 430 when the execution history is searched in the history memory 430 and outputs the extracted execution result to the execution unit 330. The execution result output unit 422 supplies the extracted execution result to the execution unit 330 via the signal line 409.

また、この実行結果出力部422は、履歴メモリ430においてループ代表履歴が実行履歴として検索された場合には、退避履歴を指し示す退避履歴位置情報を、実行結果の代わりに履歴メモリ430から抽出する。そして、その抽出した退避履歴に関する情報を履歴変換部500に出力し、実行履歴の復元を開始させる。   In addition, when the loop representative history is retrieved as the execution history in the history memory 430, the execution result output unit 422 extracts save history position information indicating the save history from the history memory 430 instead of the execution result. Then, the extracted information regarding the save history is output to the history conversion unit 500, and the restoration of the execution history is started.

履歴メモリ430は、履歴登録部440から供給された実行履歴を保持するものである。この履歴メモリ430は、例えば、履歴検索部420から検索要求が供給された場合において、この検索要求と一致する実行履歴を保持しているときは、この実行履歴の実行結果を実行結果出力部422に供給する。また、この履歴メモリ430は、履歴検索部420から検索要求が供給された場合において、この検索要求と一致するループ代表履歴を保持しているときは、このループ代表履歴の退避履歴位置情報を実行結果出力部422に供給する。さらに、この履歴メモリ430は、履歴登録部440から実行履歴が供給された場合には、この実行履歴を保持する。   The history memory 430 holds the execution history supplied from the history registration unit 440. For example, when a search request is supplied from the history search unit 420 and the history memory 430 holds an execution history that matches the search request, the execution result of the execution history is output to the execution result output unit 422. To supply. In addition, when a search request is supplied from the history search unit 420, the history memory 430 executes the save history position information of the loop representative history when it holds a loop representative history that matches the search request. The result is supplied to the result output unit 422. Further, when an execution history is supplied from the history registration unit 440, the history memory 430 holds this execution history.

また、この履歴メモリ430は、履歴メモリ430の使用状況に関する情報を履歴メモリ容量管理部450に供給する。さらにこの履歴メモリ430は、保持している実行履歴およびループ代表履歴を履歴変換部500に供給する。この履歴メモリ430は、例えば、連想メモリ(CAM:Content Addressable Memory)により実現される。   The history memory 430 also supplies information related to the usage status of the history memory 430 to the history memory capacity management unit 450. Further, the history memory 430 supplies the held execution history and loop representative history to the history conversion unit 500. The history memory 430 is realized by, for example, a content addressable memory (CAM).

履歴登録部440は、履歴対象データ保持部410から供給された実行履歴を履歴メモリ430に保持させるためのデータ構造に変換して、その変換された実行履歴を履歴メモリ430に登録するものである。この履歴登録部440は、例えば、履歴検索部420により関数履歴が検索されない場合には、関数の開始アドレス、入力値および実行結果を、実行履歴として履歴メモリ430に登録する。また、この履歴登録部440は、例えば、履歴検索部420によりループ個別履歴が検索されない場合には、ループの開始アドレス、入力値、実行結果およびループカウンタ値を実行履歴として履歴メモリ430に登録する。   The history registration unit 440 converts the execution history supplied from the history target data holding unit 410 into a data structure for holding the history memory 430, and registers the converted execution history in the history memory 430. . For example, when the history search unit 420 does not search for a function history, the history registration unit 440 registers the function start address, input value, and execution result in the history memory 430 as an execution history. In addition, for example, when the loop individual history is not searched by the history search unit 420, the history registration unit 440 registers the loop start address, input value, execution result, and loop counter value in the history memory 430 as an execution history. .

また、この履歴登録部440は、履歴メモリ容量管理部450から供給される履歴メモリ430の空き容量に比べて新たに登録する実行履歴のデータ量の方が大きい場合には、登録を一時中断する。そして、この履歴登録部440は、既に登録されている実行履歴のうち、前回の使用からの未使用期間が最も長い実行履歴を消去させるための消去開始情報を消去部460に供給する。   In addition, the history registration unit 440 temporarily suspends registration when the data amount of the newly registered execution history is larger than the free space of the history memory 430 supplied from the history memory capacity management unit 450. . Then, the history registration unit 440 supplies the erasing unit 460 with erasure start information for erasing the execution history having the longest unused period from the previous use among the already registered execution histories.

履歴メモリ容量管理部450は、履歴メモリ430の空き容量を管理するものである。この履歴メモリ容量管理部450は、例えば、履歴メモリ430に新たな実行履歴が登録される度に、履歴メモリ430の空き容量を測定する。さらに、この履歴メモリ容量管理部450は、履歴メモリ430から実行履歴が消去される度に、履歴メモリ430の空き容量を測定する。この履歴メモリ容量管理部450は、履歴メモリ430の空き容量に関する情報を履歴登録部440に供給する。   The history memory capacity management unit 450 manages the free capacity of the history memory 430. For example, the history memory capacity management unit 450 measures the free capacity of the history memory 430 every time a new execution history is registered in the history memory 430. Further, the history memory capacity management unit 450 measures the free capacity of the history memory 430 every time the execution history is deleted from the history memory 430. The history memory capacity management unit 450 supplies information related to the free capacity of the history memory 430 to the history registration unit 440.

消去部460は、履歴登録部440から消去開始情報が供給された場合には、前回の使用からの未使用期間が最も長い実行履歴を消去するものである。   When the deletion start information is supplied from the history registration unit 440, the deletion unit 460 deletes the execution history having the longest unused period from the previous use.

履歴変換部500は、履歴管理部400により管理されている実行履歴を退避履歴に変換して主記憶部130に保持させるものであり、履歴制御部510と、履歴復元部520と、退避領域管理部530とを備える。   The history conversion unit 500 converts the execution history managed by the history management unit 400 into a save history and stores it in the main storage unit 130. The history conversion unit 500 stores the history control unit 510, the history restoration unit 520, and the save area management. Part 530.

履歴制御部510は、履歴メモリ430に保持されているループ個別実行履歴から退避履歴を生成して、主記憶部130に退避するものである。この履歴制御部510は、例えば、履歴メモリ430から反復再利用区間の実行履歴を、信号線490を介して抽出し、その実行履歴と、退避領域管理部530から供給される主記憶部130のアドレス情報とに基づいて退避履歴を主記憶部130に退避させる。また、この履歴制御部510は、例えば、履歴メモリ430に保持させる新たな実行履歴のデータ量が履歴メモリ430の空き容量より大きい場合に退避履歴の退避を開始する。   The history control unit 510 generates a save history from the loop individual execution history held in the history memory 430 and saves it in the main storage unit 130. For example, the history control unit 510 extracts the execution history of the repeated reuse section from the history memory 430 via the signal line 490, and the execution history and the main storage unit 130 supplied from the save area management unit 530. The save history is saved in the main storage unit 130 based on the address information. Also, the history control unit 510 starts saving the save history when, for example, the data amount of the new execution history to be held in the history memory 430 is larger than the free capacity of the history memory 430.

そして、この履歴制御部510は、退避履歴の基となったループ個別履歴を履歴メモリ430から消去し、退避履歴位置情報を含むループ代表履歴をループ個別履歴の代わりに履歴メモリ430に登録する。なお、ここでいう退避履歴位置情報とは、例えば、退避履歴の主記憶部130における格納位置を指し示す主記憶部130のアドレスである。このように、履歴制御部510は、生成した退避履歴を、信号線509を介して主記憶部130に供給する。また、履歴制御部510は、生成したループ代表履歴を、信号線590を介して履歴メモリ430に供給する。なお、履歴制御部510および履歴メモリ430から構成される装置は、特許請求の範囲に記載の履歴保存装置の一例である。   Then, the history control unit 510 deletes the loop individual history that is the basis of the save history from the history memory 430 and registers the loop representative history including the save history position information in the history memory 430 instead of the loop individual history. Note that the save history position information here is, for example, an address of the main storage unit 130 that indicates the storage location of the save history in the main storage unit 130. Thus, the history control unit 510 supplies the generated save history to the main storage unit 130 via the signal line 509. The history control unit 510 supplies the generated loop representative history to the history memory 430 via the signal line 590. Note that the device including the history control unit 510 and the history memory 430 is an example of a history storage device described in the claims.

履歴復元部520は、実行結果出力部422から供給された退避履歴位置情報に基づいて主記憶部130から退避履歴を抽出して、その退避履歴に基づいて実行履歴を復元するものである。この履歴復元部520は、例えば、主記憶部130に退避した退避履歴の実行結果を再利用する場合には、実行結果出力部422から供給された退避履歴の情報に基づいて主記憶部130から信号線139を介して退避履歴を抽出する。そして、この履歴復元部520は、履歴メモリ430から抽出したループ代表履歴と、主記憶部130から抽出した退避履歴とに基づいて実行履歴を復元する。その後、この履歴復元部520は、履歴メモリ430に保持されているループ代表履歴を消去し、さらに履歴メモリ430における退避履歴を保持する容量を確保した後に、復元した実行履歴を履歴メモリ430に登録する。   The history restoration unit 520 extracts the save history from the main storage unit 130 based on the save history position information supplied from the execution result output unit 422, and restores the execution history based on the save history. For example, when the execution result of the save history saved in the main storage unit 130 is reused, the history restoration unit 520 reads from the main storage unit 130 based on the save history information supplied from the execution result output unit 422. The save history is extracted via the signal line 139. The history restoration unit 520 restores the execution history based on the loop representative history extracted from the history memory 430 and the save history extracted from the main storage unit 130. Thereafter, the history restoration unit 520 deletes the loop representative history held in the history memory 430, and after securing a capacity for holding the save history in the history memory 430, registers the restored execution history in the history memory 430. To do.

このように、この履歴復元部520は、復元した実行履歴を、信号線580を介して履歴メモリ430に供給する。   As described above, the history restoring unit 520 supplies the restored execution history to the history memory 430 via the signal line 580.

退避領域管理部530は、主記憶部130における退避履歴が保持される領域を管理するものである。この退避領域管理部530は、例えば、退避履歴が保持される領域を主記憶部130に確保し、履歴制御部510が退避履歴を生成した場合には、主記憶部130におけるその退避履歴の退避先のアドレスを履歴制御部510に信号線539を介して供給する。   The save area management unit 530 manages an area where the save history in the main storage unit 130 is held. For example, when the history control unit 510 generates an evacuation history, the evacuation area management unit 530 saves the evacuation history in the main storage unit 130 by securing an area in which the evacuation history is retained in the main storage unit 130. The previous address is supplied to the history control unit 510 via the signal line 539.

主記憶部130は、この構成図においては退避履歴を保持するものである。なお、主記憶部130は、特許請求の範囲に記載の退避履歴保持部の一例である。   The main storage unit 130 holds a save history in this configuration diagram. The main storage unit 130 is an example of a save history holding unit described in the claims.

このように、本発明の実施の形態では、プロセッサコア300と履歴管理部400と履歴変換部500とを設けることによって、反復再利用区間の実行履歴を主記憶部130に退避させることができる。   As described above, in the embodiment of the present invention, the execution history of the repeated reuse section can be saved in the main storage unit 130 by providing the processor core 300, the history management unit 400, and the history conversion unit 500.

なお、ここでは、反復再利用区間がループである場合について説明したが、これに限定されるものではない。例えば、ループ以外の反復再利用区間として、再帰呼び出し(リカーシブコール)を伴うサブルーチンなどが考えられる。   In addition, although the case where the repeated reuse section is a loop has been described here, the present invention is not limited to this. For example, as an iterative reuse section other than the loop, a subroutine with a recursive call (recursive call) can be considered.

[履歴制御部510の構成例]
図3は、本発明の実施の形態における履歴制御部510の構成例を示すブロック図である。履歴制御部510は、退避履歴生成部600と、ループ個別履歴消去部512と、ループ代表履歴登録部513とを備える。
[Configuration Example of History Control Unit 510]
FIG. 3 is a block diagram illustrating a configuration example of the history control unit 510 according to the embodiment of the present invention. The history control unit 510 includes a save history generation unit 600, a loop individual history deletion unit 512, and a loop representative history registration unit 513.

退避履歴生成部600は、ループ個別履歴に基づいて退避履歴を生成するものである。この退避履歴生成部600は、例えば、ループの反復された実行による実行結果を含むループ個別履歴を履歴メモリ430から信号線490を介して取得して、その取得したループ個別履歴に基づいて退避履歴を生成する。この時、この退避履歴生成部600は、主記憶部130におけるその退避履歴の退避先のアドレスを退避領域管理部530から信号線539を介して受け取る。そして、この退避履歴生成部600は、その生成した退避履歴を、信号線509を介して主記憶部130に退避させる。   The save history generation unit 600 generates a save history based on the loop individual history. For example, the save history generation unit 600 acquires a loop individual history including an execution result of repeated execution of a loop from the history memory 430 via the signal line 490, and saves history based on the acquired loop individual history. Is generated. At this time, the save history generation unit 600 receives the save destination address of the save history in the main storage unit 130 from the save area management unit 530 via the signal line 539. Then, the save history generation unit 600 saves the generated save history in the main storage unit 130 via the signal line 509.

また、この退避履歴生成部600は、退避履歴位置情報を含むループ代表履歴を生成し、信号線608を介してループ代表履歴登録部513に供給する。さらに、この退避履歴生成部600は、退避履歴の基となったループ個別履歴を、信号線609を介してループ個別履歴消去部512に供給する。   Further, the save history generation unit 600 generates a loop representative history including the save history position information, and supplies the loop representative history to the loop representative history registration unit 513 via the signal line 608. Further, the save history generating unit 600 supplies the loop individual history that is the basis of the save history to the loop individual history erasing unit 512 via the signal line 609.

ループ個別履歴消去部512は、退避履歴の基となった実行履歴を消去するものである。このループ個別履歴消去部512は、退避履歴生成部600から供給された退避履歴の基となったループ個別履歴に基づいて、このループ個別履歴を履歴メモリ430から信号線592を介して消去する。また、このループ個別履歴消去部512は、そのループ個別履歴の消去を通知する情報をループ代表履歴登録部513に供給する。   The loop individual history erasure unit 512 erases the execution history that is the basis of the save history. The loop individual history erasure unit 512 erases the loop individual history from the history memory 430 via the signal line 592 based on the loop individual history that is the basis of the save history supplied from the save history generation unit 600. Further, the loop individual history deleting unit 512 supplies information notifying the deletion of the loop individual history to the loop representative history registering unit 513.

ループ代表履歴登録部513は、ループ代表履歴を履歴メモリ430に登録するものである。このループ代表履歴登録部513は、例えば、退避履歴生成部600からループ代表履歴が供給された場合に、ループ個別履歴消去部からループ個別履歴の消去を通知する情報が供給されたときは、ループ代表履歴を履歴メモリ430に信号線593を介して登録する。   The loop representative history registration unit 513 registers the loop representative history in the history memory 430. For example, when the loop representative history is supplied from the save history generation unit 600 and the loop representative history deletion unit 600 receives information notifying the deletion of the loop individual history from the loop individual history deletion unit, The representative history is registered in the history memory 430 via the signal line 593.

[退避履歴生成部600の構成例]
図4は、本発明の実施の形態における退避履歴生成部600の構成例を示すブロック図である。退避履歴生成部600は、先頭探索部610と、連続探索部620と、ループ個別履歴取得部630と、退避履歴転送部640と、ループ代表履歴生成部650とを備える。
[Configuration Example of Save History Generation Unit 600]
FIG. 4 is a block diagram illustrating a configuration example of the save history generation unit 600 according to the embodiment of the present invention. The save history generation unit 600 includes a head search unit 610, a continuous search unit 620, a loop individual history acquisition unit 630, a save history transfer unit 640, and a loop representative history generation unit 650.

先頭探索部610は、反復再利用区間の1回目の実行に関するループ個別履歴を、履歴メモリ430から信号線491を介して探索するものである。この先頭探索部610は、ループ個別履歴を探索した場合には、一旦動作を停止してその後のループ個別履歴の探索を連続探索部620に処理させる。この先頭探索部610は、その探索したループ個別履歴に関する位置情報を連続探索部620に供給する。   The head search unit 610 searches for a loop individual history regarding the first execution of the repeated reuse section from the history memory 430 via the signal line 491. When searching for the loop individual history, the head search unit 610 temporarily stops the operation and causes the continuous search unit 620 to process the search for the loop individual history thereafter. The head search unit 610 supplies position information regarding the searched loop individual history to the continuous search unit 620.

連続探索部620は、先頭探索部610から供給された反復再利用区間の1回目の実行に関するループ個別履歴の位置情報に基づいて、2回目以降の実行に関するループ個別履歴を、信号線492を介して探索するものである。この連続探索部620は、例えば、50回反復されたループにおいて、1回目のループ個別履歴の位置情報が先頭探索部610から供給された場合には、2回目から50回目までのループ個別履歴を探索する。そして、この連続探索部620は、51回目の実行履歴が探索されなかったときに、その50個のループ個別履歴を取得するための位置情報をループ個別履歴取得部630に供給する。   The continuous search unit 620 transmits the loop individual history related to the second and subsequent executions via the signal line 492 based on the position information of the loop individual history related to the first execution of the repetitive reuse section supplied from the head search unit 610. To explore. For example, when the position information of the first loop individual history is supplied from the head search unit 610 in a loop repeated 50 times, the continuous search unit 620 displays the loop individual history from the second time to the 50th time. Explore. Then, when the 51st execution history is not searched, the continuous search unit 620 supplies position information for acquiring the 50 loop individual histories to the loop individual history acquisition unit 630.

また、この連続探索部620は、2回目以降のループ個別履歴が探索されなかった場合には、反復再利用区間は反復して実行されなかったと判断して、退避履歴の生成を中止する。そして、この連続探索部620は、一端動作を停止して先頭探索部610に反復再利用区間の1回目の実行に関するループ個別履歴の探索を再開させる。   In addition, when the loop individual history after the second time is not searched, the continuous search unit 620 determines that the repetitive reuse section has not been repeatedly executed, and stops generating the save history. Then, the continuous search unit 620 stops the operation at one end, and causes the head search unit 610 to resume searching for the loop individual history regarding the first execution of the repeated reuse section.

ループ個別履歴取得部630は、連続探索部620から供給されたループ個別履歴を取得するための位置情報に基づいて、ループ個別履歴を、信号線493を介して履歴メモリ430から取得するものである。このループ個別履歴取得部630は、例えば、連続探索部620から50回反復された反復再利用区間における50個のループ個別履歴に関する位置情報が供給された場合には、その50個のループ個別履歴を履歴メモリ430から取得する。また、このループ個別履歴取得部630は、その取得したループ個別履歴を、信号線638および信号線609を介して退避履歴転送部640、ループ代表履歴生成部650およびループ個別履歴消去部512に供給する。   The loop individual history acquisition unit 630 acquires the loop individual history from the history memory 430 via the signal line 493 based on the position information for acquiring the loop individual history supplied from the continuous search unit 620. . For example, when position information regarding 50 loop individual histories in an iterative reuse section repeated 50 times is supplied from the continuous search unit 620, the loop individual history acquisition unit 630 receives the 50 loop individual histories. Is acquired from the history memory 430. The loop individual history acquisition unit 630 supplies the acquired loop individual history to the save history transfer unit 640, the loop representative history generation unit 650, and the loop individual history deletion unit 512 via the signal line 638 and the signal line 609. To do.

退避履歴転送部640は、ループ個別履歴取得部630から供給されたループ個別履歴に基づいて退避履歴を生成して、その生成された退避履歴を主記憶部130に転送するものである。この退避履歴転送部640は、例えば、50回反復された反復再利用区間の50個のループ個別履歴が供給された場合には、50個の退避履歴を生成する。この退避履歴転送部640は、退避領域管理部530から信号線539を介して供給される主記憶部130のアドレスに基づいて退避履歴を主記憶部130に退避させる。この退避履歴転送部640は、生成した退避履歴を、信号線509を介して主記憶部130に転送する。   The save history transfer unit 640 generates a save history based on the loop individual history supplied from the loop individual history acquisition unit 630 and transfers the generated save history to the main storage unit 130. For example, when 50 loop individual histories of an iterative reuse section repeated 50 times are supplied, the save history transfer unit 640 generates 50 save histories. The save history transfer unit 640 saves the save history in the main storage unit 130 based on the address of the main storage unit 130 supplied from the save area management unit 530 via the signal line 539. The save history transfer unit 640 transfers the generated save history to the main storage unit 130 via the signal line 509.

ループ代表履歴生成部650は、ループ個別履歴取得部630から供給されたループ個別履歴に基づいてループ代表履歴を生成するものである。このループ代表履歴生成部650は、退避領域管理部530から信号線539を介して供給される主記憶部130のアドレスに基づいて、退避履歴位置情報が含まれるループ代表履歴を生成する。このループ代表履歴生成部650は、その生成したループ代表履歴を、信号線608を介してループ代表履歴登録部513に供給する。   The loop representative history generation unit 650 generates a loop representative history based on the loop individual history supplied from the loop individual history acquisition unit 630. The loop representative history generation unit 650 generates a loop representative history including the save history position information based on the address of the main storage unit 130 supplied from the save area management unit 530 via the signal line 539. The loop representative history generation unit 650 supplies the generated loop representative history to the loop representative history registration unit 513 via the signal line 608.

[履歴復元部520の構成例]
図5は、本発明の実施の形態における履歴復元部520の構成例を示すブロック図である。履歴復元部520は、退避履歴取得部521と、ループ個別履歴生成部522と、登録領域確保部523と、ループ個別履歴登録部524とを備える。
[Configuration Example of History Restoring Unit 520]
FIG. 5 is a block diagram illustrating a configuration example of the history restoration unit 520 according to the embodiment of the present invention. The history restoration unit 520 includes a save history acquisition unit 521, a loop individual history generation unit 522, a registration area reservation unit 523, and a loop individual history registration unit 524.

退避履歴取得部521は、実行結果出力部422から供給された退避履歴位置情報に基づいて主記憶部130から退避履歴を取得するものである。この退避履歴取得部521は、例えば、反復して50回実行された反復再利用区間の退避履歴を取得する場合には、実行結果出力部422から信号線408を介して供給された退避履歴位置情報に基づいて、その50個の退避履歴を主記憶部130から取得する。この退避履歴取得部521は、その取得した退避履歴をループ個別履歴生成部522に供給する。   The save history acquisition unit 521 acquires a save history from the main storage unit 130 based on the save history position information supplied from the execution result output unit 422. For example, when the save history acquisition unit 521 acquires the save history of the repeated reuse section that has been repeatedly executed 50 times, the save history position supplied from the execution result output unit 422 via the signal line 408 is used. Based on the information, the 50 save histories are acquired from the main storage unit 130. The save history acquisition unit 521 supplies the acquired save history to the loop individual history generation unit 522.

ループ個別履歴生成部522は、退避履歴からループ個別履歴を生成するものである。このループ個別履歴生成部522は、信号線408を介して供給された退避履歴位置情報に基づいて、その退避履歴位置情報を含むループ代表履歴を履歴メモリ430から信号線480を介して取得する。そして、このループ個別履歴生成部522は、その取得したループ代表履歴と、退避履歴取得部521から供給された退避履歴とに基づいて、ループ個別履歴を生成する。   The loop individual history generation unit 522 generates a loop individual history from the save history. The loop individual history generation unit 522 acquires the loop representative history including the save history position information from the history memory 430 via the signal line 480 based on the save history position information supplied via the signal line 408. The loop individual history generation unit 522 generates a loop individual history based on the acquired loop representative history and the save history supplied from the save history acquisition unit 521.

このループ個別履歴生成部522は、その生成したループ個別履歴をループ個別履歴登録部524に供給する。また、このループ個別履歴生成部522は、ループ代表履歴と、ループ個別履歴のデータ量とを登録領域確保部523に供給する。   The loop individual history generation unit 522 supplies the generated loop individual history to the loop individual history registration unit 524. The loop individual history generating unit 522 supplies the loop representative history and the data amount of the loop individual history to the registration area securing unit 523.

登録領域確保部523は、ループ個別履歴を登録するために履歴メモリ430の空き領域を確保するものである。この登録領域確保部523は、ループ個別履歴生成部522から供給されたループ代表履歴を、履歴メモリ430から信号線583を介して消去する。そして、この登録領域確保部523は、ループ個別履歴生成部522から供給されたループ個別履歴のデータ量に基づいて、履歴メモリ430に全てのループ個別履歴を登録する空き容量があるか否か判断する。この登録領域確保部523は、履歴メモリ430にその空き容量が不足している場合には、信号線583を介して空き容量を確保する。例えば、この登録領域確保部523は、前回の使用からの未使用期間が最も長い実行履歴を消去して履歴メモリ430における必要な空き容量を確保する。   The registration area securing unit 523 secures a free area in the history memory 430 in order to register the loop individual history. The registration area securing unit 523 erases the loop representative history supplied from the loop individual history generating unit 522 from the history memory 430 via the signal line 583. Then, the registration area securing unit 523 determines whether or not there is a free capacity for registering all loop individual histories in the history memory 430 based on the data amount of the loop individual history supplied from the loop individual history generation unit 522. To do. When the free space is insufficient in the history memory 430, the registration area securing unit 523 secures free space via the signal line 583. For example, the registration area securing unit 523 secures a necessary free space in the history memory 430 by deleting the execution history having the longest unused period since the previous use.

この登録領域確保部523は、履歴メモリ430における空き容量に関する情報をループ個別履歴登録部524に供給する。   The registration area securing unit 523 supplies information related to the free space in the history memory 430 to the loop individual history registration unit 524.

ループ個別履歴登録部524は、ループ個別履歴生成部522から供給されたループ個別履歴を、信号線584を介して履歴メモリ430に登録するものである。このループ個別履歴登録部524は、ループ個別履歴生成部522から供給されたループ個別履歴を、登録領域確保部523から供給された情報が指し示す履歴メモリ430の空き容量に登録する。   The loop individual history registration unit 524 registers the loop individual history supplied from the loop individual history generation unit 522 in the history memory 430 via the signal line 584. The loop individual history registration unit 524 registers the loop individual history supplied from the loop individual history generation unit 522 in the free space of the history memory 430 indicated by the information supplied from the registration area securing unit 523.

このように、本発明の実施の形態では、データ処理装置100に履歴管理部400および履歴変換部500を設けることによって、実行が反復される反復再利用区間の実行履歴を退避履歴として主記憶部130に退避することができる。   As described above, in the embodiment of the present invention, by providing the history management unit 400 and the history conversion unit 500 in the data processing apparatus 100, the main storage unit uses the execution history of the repeated reuse section in which execution is repeated as the save history. 130 can be evacuated.

<2.履歴情報のフィールド構成例>
[実行履歴、ループ個別履歴および退避履歴のフィールド構成例]
図6は、本発明の実施の形態における履歴メモリ430に保持される関数履歴、ループ個別履歴およびループ代表履歴と、主記憶部130に保持される退避履歴とのフィールド構成例を示す模式図である。
<2. Example of history information field configuration>
[Execution history, loop individual history, and save history field configuration examples]
FIG. 6 is a schematic diagram illustrating a field configuration example of the function history, the loop individual history, and the loop representative history held in the history memory 430 and the save history held in the main storage unit 130 according to the embodiment of the present invention. is there.

図6(a)には、関数再利用区間の実行履歴である関数履歴710のフィールド構成例が示されている。この関数履歴710は、識別子フィールド711と、開始アドレスフィールド712と、入力値リンクフィールド713と、実行結果リンクフィールド717とから構成される。   FIG. 6A shows a field configuration example of a function history 710 that is an execution history of a function reuse section. The function history 710 includes an identifier field 711, a start address field 712, an input value link field 713, and an execution result link field 717.

識別子フィールド711は、関数履歴と、ループ個別履歴と、ループ代表履歴とを識別するためのフィールドである。この識別子フィールド711には、関数履歴であることを示す2ビット(00)が格納される。また、この識別子フィールド711は、関数履歴710における先頭のフィールドであり、例えば、その関数履歴710の開始アドレスに保持されるフィールドである。   The identifier field 711 is a field for identifying a function history, a loop individual history, and a loop representative history. In this identifier field 711, 2 bits (00) indicating a function history are stored. The identifier field 711 is a head field in the function history 710, and is a field held at the start address of the function history 710, for example.

開始アドレスフィールド712は、関数の開始アドレスを格納するためのフィールドである。この開始アドレスフィールド712に格納される関数の開始アドレスは、検索要求入力部421により実行履歴が検索される場合には、検索要求の開始アドレスと比較される。   The start address field 712 is a field for storing the start address of the function. The start address of the function stored in the start address field 712 is compared with the start address of the search request when the search history is searched by the search request input unit 421.

入力値リンクフィールド713は、リンク構造を用いて格納されている関数の入力値のアドレスを格納するためのフィールドである。この入力値リンクフィールド713には、検索要求入力部421により実行履歴が検索されて検索要求の開始アドレスが開始アドレスフィールド712の開始アドレスと一致したときに、検索要求の入力値と比較される入力値を保持するアドレスが格納される。この入力値リンクフィールド713には、例えば、3つの引数を入力値とする関数の場合には、3つの関数のうち1番目の引数の値である第1引数値が保持されているアドレスが格納される。   The input value link field 713 is a field for storing the address of the input value of the function stored using the link structure. In the input value link field 713, an input that is compared with the input value of the search request when the execution history is searched by the search request input unit 421 and the start address of the search request matches the start address of the start address field 712. Stores the address that holds the value. For example, in the case of a function having three arguments as input values, the input value link field 713 stores an address at which the first argument value that is the value of the first argument of the three functions is held. Is done.

実行結果リンクフィールド717は、リンク構造を用いて格納されている関数の実行結果のアドレスを格納するためのフィールドである。この実行結果リンクフィールド717には、検索要求入力部421により実行履歴が検索されて開始アドレスおよび入力値が一致したときに、実行結果として出力される関数の実行結果が保持されているアドレスが格納される。例えば、3つの変数を出力値とする関数の場合には、3つの変数のうち1番目の変数の値が保持されているアドレスが実行結果リンクフィールド717に格納される。   The execution result link field 717 is a field for storing the address of the execution result of the function stored using the link structure. The execution result link field 717 stores an address in which an execution result of a function output as an execution result is stored when the search history is searched by the search request input unit 421 and the input address matches the start address. Is done. For example, in the case of a function having three variables as output values, the address at which the value of the first variable among the three variables is stored in the execution result link field 717.

図6(b)には、反復再利用区間の実行履歴であるループ個別履歴720のフィールド構成例が示されている。このループ個別履歴720は、識別子フィールド721と、開始アドレスフィールド722と、入力値リンクフィールド723と、ループカウンタ値フィールド724と、実行結果リンクフィールド727とから構成される。   FIG. 6B shows a field configuration example of a loop individual history 720 that is an execution history of the repeated reuse section. The loop individual history 720 includes an identifier field 721, a start address field 722, an input value link field 723, a loop counter value field 724, and an execution result link field 727.

識別子フィールド721は、図6(a)において示した識別子フィールド711と同様に、関数履歴と、ループ個別履歴と、ループ代表履歴とを識別するための識別子を格納するフィールドである。この識別子フィールド721には、ループ個別履歴であることを示す2ビット(01)が格納される。また、この識別子フィールド721は、ループ個別履歴720における先頭のフィールドであり、例えば、そのループ個別履歴720の開始アドレスに保持されるフィールドである。   Similar to the identifier field 711 shown in FIG. 6A, the identifier field 721 is a field for storing an identifier for identifying the function history, the loop individual history, and the loop representative history. In this identifier field 721, 2 bits (01) indicating a loop individual history are stored. The identifier field 721 is a head field in the loop individual history 720, and is a field held at the start address of the loop individual history 720, for example.

開始アドレスフィールド722は、ループの開始アドレスを格納するためのフィールドである。この開始アドレスフィールド722に格納されるループの開始アドレスは、検索要求入力部421により実行履歴が検索される場合には、検索要求の開始アドレスと比較される。   The start address field 722 is a field for storing the start address of the loop. The loop start address stored in the start address field 722 is compared with the search request start address when the search history is searched by the search request input unit 421.

入力値リンクフィールド723は、リンク構造を用いて格納されているループの入力値のアドレスを格納するためのフィールドである。この入力値リンクフィールド723の機能は、図6(a)において示した入力値リンクフィールド713と同様のものであるので、ここでの詳細な説明を省略する。   The input value link field 723 is a field for storing the address of the input value of the loop stored using the link structure. Since the function of the input value link field 723 is the same as that of the input value link field 713 shown in FIG. 6A, detailed description thereof is omitted here.

ループカウンタ値フィールド724は、ループの何回目の実行による実行結果であるのかを示す値を格納するためのフィールドである。このループカウンタ値フィールド724には、検索要求入力部421により実行履歴が検索されて開始アドレスおよび入力値が一致したときに、検索要求のループカウンタ値と比較されるループカウンタ値が格納される。   The loop counter value field 724 is a field for storing a value indicating how many times the loop has been executed. The loop counter value field 724 stores a loop counter value to be compared with the loop counter value of the search request when the execution history is searched by the search request input unit 421 and the start address and the input value match.

実行結果リンクフィールド727は、リンク構造を用いて格納されているループの実行結果のアドレスを格納するフィールドである。この実行結果リンクフィールド727には、検索要求入力部421により実行履歴が検索されて開始アドレス、入力値、およびループカウンタ値が一致したときに、実行結果として出力されるループの実行結果が保持されているアドレスが格納される。   The execution result link field 727 is a field for storing the address of the execution result of the loop stored using the link structure. The execution result link field 727 holds a loop execution result that is output as an execution result when the search history is searched by the search request input unit 421 and the start address, input value, and loop counter value match. Is stored.

図6(c)には、反復再利用区間の代表履歴であるループ代表履歴730のフィールド構成例が示されている。このループ代表履歴730は、識別子フィールド731と、開始アドレスフィールド732と、入力値リンクフィールド733と、退避カウントフィールド735と、退避履歴アドレスフィールド736とから構成される。   FIG. 6C shows a field configuration example of a loop representative history 730 that is a representative history of the repeated reuse section. The loop representative history 730 includes an identifier field 731, a start address field 732, an input value link field 733, a save count field 735, and a save history address field 736.

識別子フィールド731は、図6(a)において示した識別子フィールド711と同様に、関数履歴と、ループ個別履歴と、ループ代表履歴とを識別するためのフィールドである。この識別子フィールド731には、ループ代表履歴であることを示す2ビット(10)が格納される。また、この識別子フィールド731は、ループ代表履歴730における先頭のフィールドであり、例えば、そのループ代表履歴730の開始アドレスに保持されるフィールドである。   Similar to the identifier field 711 shown in FIG. 6A, the identifier field 731 is a field for identifying a function history, a loop individual history, and a loop representative history. The identifier field 731 stores 2 bits (10) indicating that it is a loop representative history. The identifier field 731 is a head field in the loop representative history 730, and is a field held at the start address of the loop representative history 730, for example.

開始アドレスフィールド732は、図6(b)において示した開始アドレスフィールド722と同様に、ループの開始アドレスを格納するためのフィールドである。この開始アドレスフィールド732の機能は、図6(b)の開始アドレスフィールド722と同様のものであるのでここでの詳細な説明を省略する。   The start address field 732 is a field for storing the start address of the loop, similarly to the start address field 722 shown in FIG. Since the function of the start address field 732 is the same as that of the start address field 722 of FIG. 6B, a detailed description thereof is omitted here.

入力値リンクフィールド733は、図6(b)において示した入力値リンクフィールド723と同様に、リンク構造を用いて格納されているループの入力値のアドレスを格納するためのフィールドである。この入力値リンクフィールド733の機能は、図6(b)において示した入力値リンクフィールド723と同様のものであるのでここでの詳細な説明を省略する。   Similar to the input value link field 723 shown in FIG. 6B, the input value link field 733 is a field for storing the address of the input value of the loop stored using the link structure. The function of the input value link field 733 is the same as that of the input value link field 723 shown in FIG. 6B, and thus detailed description thereof is omitted here.

退避カウントフィールド735は、主記憶部130に退避された退避履歴の個数を示す値を格納するためのフィールドである。この退避カウントフィールド735には、実行履歴が検索されて検索要求の開始アドレスおよび入力値がループ代表履歴の開始アドレスおよび入力値と一致したときに、履歴復元部520に退避履歴位置情報として供給される退避履歴の個数が格納される。   The save count field 735 is a field for storing a value indicating the number of save histories saved in the main storage unit 130. This save count field 735 is supplied to the history restoring unit 520 as save history position information when the execution history is searched and the start address and input value of the search request match the start address and input value of the loop representative history. The number of save histories to be stored is stored.

退避履歴アドレスフィールド736は、退避履歴アドレスを格納するためのフィールドである。ここでいう退避履歴アドレスとは、主記憶部130に退避された退避履歴が格納されているアドレスである。この退避履歴アドレスフィールド736には、実行履歴が検索されて検索要求の開始アドレスおよび入力値が、ループ代表履歴の開始アドレスおよび入力値と一致したときに、履歴復元部520に退避履歴位置情報として供給される退避履歴アドレスが格納される。例えば、この退避履歴アドレスフィールド736には、反復再利用区間の複数の退避履歴を連続したアドレスに保存した場合において、最初の退避履歴の開始アドレスが格納される。   The save history address field 736 is a field for storing a save history address. Here, the save history address is an address where the save history saved in the main storage unit 130 is stored. In the save history address field 736, when the execution history is searched and the start address and input value of the search request coincide with the start address and input value of the loop representative history, the history restoring unit 520 stores the save history position information. The supplied save history address is stored. For example, the save history address field 736 stores the start address of the first save history when a plurality of save histories in the repeated reuse section are saved at consecutive addresses.

図6(d)には、反復再利用区間の退避履歴740のフィールド構成例が示されている。この退避履歴740は、ループカウンタ値フィールド744および実行結果リンクフィールド747から構成される。   FIG. 6D shows a field configuration example of the repetitive reuse section save history 740. The save history 740 includes a loop counter value field 744 and an execution result link field 747.

ループカウンタ値フィールド744は、図6(b)において示したループカウンタ値フィールド724と同様に、ループの何回目の実行による実行結果であるのかを示す値を格納するためのフィールドである。このループカウンタ値フィールド744には、履歴復元部520によりループ個別履歴が復元されるときに、ループカウンタ値フィールド724となる値が格納される。   Similar to the loop counter value field 724 shown in FIG. 6B, the loop counter value field 744 is a field for storing a value indicating how many times the loop has been executed. The loop counter value field 744 stores a value that becomes the loop counter value field 724 when the loop individual history is restored by the history restoration unit 520.

実行結果リンクフィールド747は、図6(b)において示した実行結果リンクフィールド727と同様に、リンク構造を用いて格納されているループの実行結果のアドレスを格納するフィールドである。この実行結果リンクフィールド747には、履歴復元部520によりループ個別履歴が復元されるときに、実行結果リンクフィールド727となる値が格納される。   Similar to the execution result link field 727 shown in FIG. 6B, the execution result link field 747 is a field for storing the address of the execution result of the loop stored using the link structure. The execution result link field 747 stores a value that becomes the execution result link field 727 when the loop individual history is restored by the history restoration unit 520.

なお、ここでは、実行履歴およびループ代表履歴のデータ長を固定長にして履歴メモリ430における実行履歴およびループ代表履歴の登録や消去を容易にするために、また、実行履歴のデータ量を少なくするために、入力値および実行結果をリンク構造にした。しかしながら、関数履歴、ループ個別履歴、ループ代表履歴および退避履歴のデータ構造はこれに限定されるものではない。例えば、入力値および実行結果をリンク構造にしないで、関数履歴、ループ個別履歴、ループ代表履歴および退避履歴にそのまま保持させるようにしてもよい。   Here, in order to facilitate the registration and deletion of the execution history and loop representative history in the history memory 430 by setting the data length of the execution history and loop representative history to a fixed length, the data amount of the execution history is reduced. Therefore, the input values and execution results are linked. However, the data structure of the function history, loop individual history, loop representative history, and save history is not limited to this. For example, the input value and the execution result may be held as they are in the function history, loop individual history, loop representative history, and save history without using a link structure.

[入力値リンクおよび実行結果リンクのデータ構造例]
図7は、本発明の実施の形態における入力値リンクおよび実行結果リンクのデータ構造例を示す概念図である。
[Data structure example of input value link and execution result link]
FIG. 7 is a conceptual diagram showing a data structure example of the input value link and the execution result link in the embodiment of the present invention.

ここでは、図6(a)において示した入力値リンクフィールド713と、入力値を格納する入力値格納領域760のデータ構造とが示されている。この例では、3つの引数が入力値である関数を想定する。また、ここでは、入力値格納領域760は、関数履歴、ループ個別履歴およびループ個別履歴が保存される領域とは異なる履歴メモリ430の領域であることとする。   Here, the input value link field 713 shown in FIG. 6A and the data structure of the input value storage area 760 for storing the input value are shown. In this example, a function is assumed in which three arguments are input values. Here, it is assumed that the input value storage area 760 is an area of the history memory 430 different from the area where the function history, loop individual history, and loop individual history are stored.

入力値格納領域760は、関数履歴およびループ個別履歴の入力値を保持する領域である。この入力値格納領域760には、3つの引数として、第1引数値761、第2引数値763および第3引数値765が左側のカラムに示されている。そして、この入力値格納領域760の右側のカラムには、その3つの引数とともに保存されるリンクアドレス762、764および766が示されている。   The input value storage area 760 is an area for holding input values of function history and loop individual history. In the input value storage area 760, a first argument value 761, a second argument value 763, and a third argument value 765 are shown in the left column as three arguments. In the column on the right side of the input value storage area 760, link addresses 762, 764 and 766 stored with the three arguments are shown.

第1引数値761、第2引数値763および第3引数値765は、入力値リンクフィールド713が指定する入力値である3つの引数の引数値がそれぞれ保持される領域である。すなわち、第1引数値761には、第1番目とされた引数の引数値が保持され、第2引数値763には、第2番目とされた引数の引数値が保持され、第3引数値765には、第3番目とされた引数の引数値が保持される。例えば、第1引数値761には関数再利用区間において1番最初に使用された引数が保持され、第2引数値763には2番目に使用された引数が保持され、第3引数値765には3番目に使用された引数が保持される。また、第1引数値761のアドレスは、入力値リンクフィールド713に格納されるアドレスである。   The first argument value 761, the second argument value 763, and the third argument value 765 are areas in which argument values of three arguments that are input values designated by the input value link field 713 are respectively held. That is, the first argument value 761 holds the argument value of the first argument, the second argument value 763 holds the argument value of the second argument, and the third argument value In 765, the argument value of the third argument is held. For example, the first argument value 761 holds the first used argument in the function reuse section, the second argument value 763 holds the second used argument, and the third argument value 765 Holds the third argument used. The address of the first argument value 761 is an address stored in the input value link field 713.

リンクアドレス762、リンクアドレス764およびリンクアドレス766は、第1引数値761、第2引数値763および第3引数値765にそれぞれ連結して保存され、次の引数のアドレスを格納する領域である。例えば、第1引数値761に連結して保存されるリンクアドレス762は、第2引数値763のアドレスを格納する。また、リンクアドレス762、リンクアドレス764およびリンクアドレス766は、次の引数が無い場合には、リンク先が無いことを示す「0」が格納される。例えば、第3引数値765に連結して保存されるリンクアドレス766は、第4番目の引数が無いため「0」が格納される。   The link address 762, the link address 764, and the link address 766 are areas that are concatenated and stored in the first argument value 761, the second argument value 763, and the third argument value 765, respectively, and store the address of the next argument. For example, the link address 762 concatenated and stored with the first argument value 761 stores the address of the second argument value 763. The link address 762, the link address 764, and the link address 766 store “0” indicating that there is no link destination when there is no next argument. For example, “0” is stored in the link address 766 that is stored concatenated with the third argument value 765 because there is no fourth argument.

このように、入力値格納領域760には、実行履歴の入力値が引数毎に次の引数の保存場所を指定するリンクアドレスが保持される。実行履歴の検索のときには、検索要求の開始アドレスと関数履歴710の開始アドレスが一致した場合に入力値リンクフィールド713が参照されて、第1引数値761から順に引数毎に検索要求の入力値の引数と比較される。そして、第3引数値765まで一致するとリンクアドレス766の「0」により検索を終了し、実行結果の出力過程に移行する。   In this way, the input value storage area 760 holds the link address that specifies the storage location of the next argument for each argument of the input value of the execution history. When searching for the execution history, the input value link field 713 is referred to when the start address of the search request matches the start address of the function history 710, and the input value of the search request is set for each argument in order from the first argument value 761. Compared with the argument. When the third argument value 765 is matched, the search is terminated by “0” of the link address 766, and the process proceeds to an execution result output process.

このように、本発明の実施の形態では、実行履歴の入力値をリンク構造で保存することにより、記憶領域の無駄な領域を減少させて効率よく入力値を保持させることができる。なお、入力値リンクフィールド723および入力値リンクフィールド733に関しては、入力値リンクフィールド713と同様にリンク構造を用いて入力値が保存されるため説明を省略する。また、実行結果リンクフィールド717、実行結果リンクフィールド727および実行結果リンクフィールド747に関しても、入力値リンクフィールド713と同様にリンク構造を用いて実行結果が保存されるためh説明を省略する。   As described above, according to the embodiment of the present invention, by saving the input value of the execution history with the link structure, it is possible to reduce the useless area of the storage area and efficiently hold the input value. The input value link field 723 and the input value link field 733 are not described because the input values are stored using the link structure in the same manner as the input value link field 713. Also, the execution result link field 717, the execution result link field 727, and the execution result link field 747 are stored in the same way as the input value link field 713, so that the execution results are saved.

なお、ここでは、3つの引数が入力値である関数を想定したが、引数の値が最大3つに限定されるものではない。リンクを繋げることで3つ以上の引数および変数に対応することができる。また、ここでは、入力値格納領域760は、検索を高速にするために履歴メモリ430における領域であることを想定したが、これに限定されるものではない。例えば、主記憶部130に入力値格納領域760を確保することにより、より多くの実行履歴およびループ個別履歴を履歴メモリ430に保持させることができる。   Although a function in which three arguments are input values is assumed here, the argument values are not limited to a maximum of three. By connecting links, you can handle more than two arguments and variables. Here, it is assumed that the input value storage area 760 is an area in the history memory 430 in order to speed up the search. However, the present invention is not limited to this. For example, by securing the input value storage area 760 in the main storage unit 130, more execution history and loop individual history can be held in the history memory 430.

<3.履歴メモリに保持される履歴情報および主記憶部に保持される退避履歴の一例>
[ループ個別履歴の退避の具体例]
図8は、本発明の実施の形態における履歴制御部510によるループ個別履歴の退避の際の、履歴メモリ430および主記憶部130における実行履歴、ループ代表履歴および退避履歴の具体例を示す図である。ここでは、履歴メモリ430における関数履歴、ループ個別履歴およびループ代表履歴を登録する領域は、データ量と無関係に10個の履歴が格納できる容量であることを想定する。さらにここでは、主記憶部130における退避履歴を保持させる領域は、データ量と無関係に6個の退避履歴を退避できる容量であることとする。また、これ以降の説明では、便宜上、関数再利用区間の実行履歴である関数履歴、反復再利用区間の実行履歴であるループ個別履歴、および、反復再利用区間の代表履歴であるループ代表履歴の3つの履歴を履歴情報と表現することとする。
<3. Example of history information held in history memory and save history held in main storage unit>
[Specific example of saving individual loop history]
FIG. 8 is a diagram showing specific examples of the execution history, loop representative history, and save history in the history memory 430 and the main storage unit 130 when the loop individual history is saved by the history control unit 510 according to the embodiment of the present invention. is there. Here, it is assumed that the area for registering the function history, loop individual history, and loop representative history in the history memory 430 has a capacity capable of storing 10 histories regardless of the data amount. Further, here, it is assumed that the area for storing the save history in the main storage unit 130 has a capacity capable of saving six save histories regardless of the data amount. In the following description, for convenience, the function history that is the execution history of the function reuse section, the loop individual history that is the execution history of the repeated reuse section, and the loop representative history that is the representative history of the repeated reuse section are described. Three histories are expressed as history information.

図8(a)は、履歴制御部510が動作する前の履歴メモリ430および主記憶部130における実行履歴、ループ代表履歴および退避履歴の一例である。ここには、実行履歴表811および退避履歴表812が示されている。   FIG. 8A is an example of the execution history, loop representative history, and save history in the history memory 430 and the main storage unit 130 before the history control unit 510 operates. Here, an execution history table 811 and a save history table 812 are shown.

実行履歴表811は、履歴メモリ430に登録されている履歴情報を表すものである。この実行履歴表811における左側のカラムには、履歴メモリ430に登録された順序を示す順位が「1」から「10」まで順に例示されている。この順位は、数値が小さいものほど先に履歴メモリ430に登録されたことを示すものとする。   The execution history table 811 represents history information registered in the history memory 430. In the left column of the execution history table 811, the order indicating the order of registration in the history memory 430 is exemplified in order from “1” to “10”. In this order, the smaller the numerical value, the earlier that it is registered in the history memory 430.

実行履歴表811における右側のカラムには、履歴メモリ430に登録されている履歴情報が示されている。ここには、図6(a)乃至(d)において示した識別子と、その履歴情報の基となった関数またはループとが示されている。また、ループ個別履歴の場合には、そのループ個別履歴が反復された実行において何回目の実行であるのかを示す値がさらに示されている。   The right column in the execution history table 811 shows history information registered in the history memory 430. Here, the identifiers shown in FIGS. 6A to 6D and the function or loop that is the basis of the history information are shown. In the case of the loop individual history, a value indicating how many times the loop individual history is executed in the repeated execution is further shown.

例えば、順位が「1」の履歴情報(00(funcA))は、関数A(funcA)の関数履歴(00)を示している。また、「7」の順位の履歴情報(01(loopF(1)))は、ループF(loopF)の1回目(1)の実行に関するループ個別履歴(01)を示している。また、「8」の順位の履歴情報(01(loopF(2)))は、反復して実行されたループF(loopF)の2回目(2)の実行に関するループ個別履歴(01)を示している。   For example, the history information (00 (funcA)) with the rank “1” indicates the function history (00) of the function A (funcA). The history information (01 (loopF (1))) with the rank “7” indicates the loop individual history (01) related to the first execution (1) of the loop F (loopF). The history information (01 (loopF (2))) of the rank “8” indicates the loop individual history (01) related to the second execution (2) of the loop F (loopF) executed repeatedly. Yes.

退避履歴表812は、主記憶部130に退避された退避履歴を表すものである。この退避履歴表812における順位には、主記憶部130に登録された順序を示す順位が示されており、ここでは、「1」から「6」までの順位が例示されている。この順位は、数値が少ないものほど古く、早い時点で登録されたことを意味している。   The save history table 812 represents the save history saved in the main storage unit 130. The ranks in the save history table 812 indicate the ranks indicating the order registered in the main storage unit 130, and here, ranks from "1" to "6" are illustrated. This ranking means that the smaller the numerical value, the older and registered at an earlier time.

退避履歴表812における退避履歴には、主記憶部130に退避された退避履歴が示されている。ここでは、主記憶部130に退避履歴は1つも退避されていないことが示されている。   The save history in the save history table 812 indicates the save history saved in the main storage unit 130. Here, it is shown that no save history is saved in the main storage unit 130.

この様な場合において、履歴制御部510は、履歴メモリ430に新たな実行履歴を登録する空き容量が無いことを検出すると、履歴メモリ430から反復して実行された反復再利用区間のループ個別履歴の退避を開始する。   In such a case, when the history control unit 510 detects that there is no free space for registering a new execution history in the history memory 430, the loop individual history of the repetitive reuse section executed repeatedly from the history memory 430. Start evacuation.

図8(b)は、履歴制御部510が動作した後の履歴メモリ430および主記憶部130における履歴情報および退避履歴の一例である。ここには、実行履歴表821および退避履歴表822が示されている。   FIG. 8B is an example of history information and save history in the history memory 430 and the main storage unit 130 after the history control unit 510 operates. Here, an execution history table 821 and a save history table 822 are shown.

実行履歴表821は、図8(a)で示した実行履歴表811におけるループ個別履歴が退避された後の履歴メモリ430における履歴情報を表すものである。   The execution history table 821 represents history information in the history memory 430 after the loop individual history in the execution history table 811 shown in FIG.

実行履歴表821では、実行履歴表811の「7」の順位のループ個別履歴(01(loopF(1))と、「8」の順位のループ個別履歴(01(loopF(2))と、「9」の順位のループ個別履歴(01(loopF(3))とが削除されている。そして、その3つのループ個別履歴の代わりとして、ループ代表履歴(10(loopF))が「7」の順位に示されている。   In the execution history table 821, the loop individual history (01 (loopF (1)) in the order of “7”, the loop individual history (01 (loopF (2)) in the order of “8”, and “ The loop individual history (01 (loopF (3)) with the rank of 9 ”has been deleted. In place of the three loop individual histories, the loop representative history (10 (loopF)) has the rank of“ 7 ”. Is shown in

また、その3つのループ個別履歴がループ代表履歴(10(loopF))に代わったことにより、図8(a)の実行履歴表811における「10」の順位で示した関数Bの関数履歴(00(funcB))の順位が「8」に繰り上げられている。そして、実行履歴表821における順位が「9」乃至「10」の実行履歴は存在しないことを意味する。   Further, since the three loop individual histories are replaced by the loop representative history (10 (loopF)), the function history (00) of the function B indicated by the rank “10” in the execution history table 811 of FIG. (FuncB)) is raised to “8”. This means that there is no execution history having ranks “9” to “10” in the execution history table 821.

退避履歴表822は、履歴制御部510が動作した後の主記憶部130に退避された退避履歴を表すものである。   The save history table 822 represents the save history saved in the main storage unit 130 after the history control unit 510 operates.

この退避履歴表822の「1」の順位には、実行履歴表811の「7」の順位のループ個別履歴(01(loopF(1)))に基づいて生成された、反復して実行されたループFの1回目の実行の実行結果を含む退避履歴(loopF(1))が示されている。「2」の順位には、実行履歴表811の「8」の順位において示したループ個別履歴(01(loopF(2)))に基づいて生成された、反復して実行されたループFの2回目の実行の実行結果を含む退避履歴(loopF(2))が示されている。   In the order of “1” in the save history table 822, the loop is generated repeatedly based on the loop individual history (01 (loopF (1))) of the order “7” in the execution history table 811. A save history (loopF (1)) including an execution result of the first execution of the loop F is shown. In the rank of “2”, 2 of the loop F repeatedly executed, which is generated based on the loop individual history (01 (loopF (2))) shown in the rank of “8” in the execution history table 811. A save history (loopF (2)) including the execution result of the second execution is shown.

そして、「3」の順位には、実行履歴表811の「9」の順位において示したループ個別履歴(01(loopF(3)))に基づいて生成された、反復されたループFの3回目の実行の実行結果を含む退避履歴(loopF(3))が示されている。   In the ranking of “3”, the third iteration of the repeated loop F generated based on the loop individual history (01 (loopF (3))) shown in the ranking of “9” in the execution history table 811 is included. The save history (loopF (3)) including the execution result of the execution of is shown.

このように、本発明の実施の形態では、履歴制御部510を設けることによって、反復して実行されるループのループ個別履歴の実行結果を主記憶部130に退避させることができる。   As described above, in the embodiment of the present invention, by providing the history control unit 510, the execution result of the loop individual history of loops that are repeatedly executed can be saved in the main storage unit 130.

[ループ個別履歴の復元の具体例]
図9は、本発明の実施の形態における履歴復元部520によるループ個別履歴の復元の際の、履歴メモリ430および主記憶部130における実行履歴、ループ代表履歴および退避履歴の具体例を示す図である。ここでは、履歴メモリ430および主記憶部130は、図8において示した履歴メモリ430および主記憶部130と同様の機能であることを想定する。また、ここでは、空き容量が無い履歴メモリ430に新たな実行履歴を登録する場合には、前回の使用からの未使用期間が最も長い実行履歴を削除する(LRU:Least Recently Used)ことにより空き容量を確保することとする。さらに、ここでは、実行履歴は登録されてから一度も使用されていないことを想定し、LRUにより削除される実行履歴は、順序が最も若い実行履歴であることとする。
[Example of restoring individual loop history]
FIG. 9 is a diagram illustrating specific examples of the execution history, loop representative history, and save history in the history memory 430 and the main storage unit 130 when restoring the individual loop history by the history restoration unit 520 according to the embodiment of the present invention. is there. Here, it is assumed that the history memory 430 and the main storage unit 130 have the same functions as the history memory 430 and the main storage unit 130 shown in FIG. Here, when a new execution history is registered in the history memory 430 having no free space, the execution history having the longest unused period since the previous use is deleted (LRU: Least Recently Used). Capacity will be secured. Furthermore, here, it is assumed that the execution history has never been used after being registered, and the execution history deleted by the LRU is the execution history having the youngest order.

図9(a)は、退避履歴に基づいてループ個別履歴が復元される前の履歴メモリ430および主記憶部130における履歴情報および退避履歴の一例である。ここには、実行履歴表831および退避履歴表832が示されている。   FIG. 9A is an example of history information and save history in the history memory 430 and the main storage unit 130 before the loop individual history is restored based on the save history. Here, an execution history table 831 and a save history table 832 are shown.

実行履歴表831は、履歴復元部520がループ個別履歴を復元する前の履歴メモリ430に登録されている履歴情報を示すものである。この実行履歴表831には、図8(b)において示した実行履歴表821の空き容量に新たな実行履歴が格納された状態が示されている。この新たな実行履歴として、「9」の順位には関数Cの関数履歴00(funcC)が登録され、「10」の順位には関数Dの関数履歴00(funcD)が格納されている。   The execution history table 831 shows history information registered in the history memory 430 before the history restoring unit 520 restores the loop individual history. The execution history table 831 shows a state where a new execution history is stored in the free capacity of the execution history table 821 shown in FIG. As the new execution history, the function history 00 (funcC) of the function C is registered in the rank “9”, and the function history 00 (funcD) of the function D is stored in the rank “10”.

退避履歴表832は、図8(b)において示した退避履歴表822と同様に、主記憶部130に退避された退避履歴を表すものである。   The save history table 832 represents the save history saved in the main storage unit 130, similarly to the save history table 822 shown in FIG.

この様な場合において、履歴検索部420により履歴メモリ430からループFに関するループ代表履歴が検索されると、履歴復元部520は退避履歴からループ個別履歴の復元を開始する。   In such a case, when the history retrieval unit 420 retrieves the loop representative history regarding the loop F from the history memory 430, the history restoration unit 520 starts restoring the individual loop history from the saved history.

図9(b)は、履歴復元部520により退避履歴からループ個別履歴が復元された後の履歴メモリ430および主記憶部130における履歴情報および退避履歴の一例である。ここには、実行履歴表841および退避履歴表842が示されている。   FIG. 9B is an example of history information and save history in the history memory 430 and the main storage unit 130 after the loop individual history is restored from the save history by the history restoring unit 520. Here, an execution history table 841 and a save history table 842 are shown.

実行履歴表841は、履歴復元部520がループ個別履歴を復元した後の履歴メモリ430に登録されている履歴情報を示すものである。この実行履歴表841には、図9(a)で示した退避履歴表832の退避履歴からループ個別履歴が復元されて実行履歴表831の実行履歴に加えられた状態が示されている。   The execution history table 841 shows history information registered in the history memory 430 after the history restoring unit 520 restores the loop individual history. The execution history table 841 shows a state where the loop individual history is restored from the save history of the save history table 832 shown in FIG. 9A and added to the execution history of the execution history table 831.

この実行履歴表841では、実行履歴表831における順位「1」および「2」に対応する実行履歴00(funcA)および01(loopA(1))が消去されて、「3」乃至「6」の実行履歴の順序が「1」乃至「4」に繰り上がっている。   In this execution history table 841, the execution histories 00 (funcA) and 01 (loopA (1)) corresponding to the ranks “1” and “2” in the execution history table 831 are deleted, and “3” to “6” are deleted. The order of execution history is moved up from “1” to “4”.

そして、「5」の順位では、退避履歴表832の「1」の順位の退避履歴(loopF(1))の基となった実行履歴01(loopF(1))が復元されて登録されている。「6」および「7」の順位でも「5」と同様に、実行履歴01(loopF(2))および01(loopF(3))が復元されて登録されている。   In the order of “5”, the execution history 01 (loopF (1)) that is the basis of the saving history (loopF (1)) in the order of “1” in the saving history table 832 is restored and registered. . In the order of “6” and “7” as well as “5”, the execution histories 01 (loopF (2)) and 01 (loopF (3)) are restored and registered.

退避履歴表842は、ループ個別履歴が復元された後の主記憶部130に登録された退避履歴を示すものである。この退避履歴表842には、退避履歴表832において示した退避履歴は全て復元されて主記憶部130から削除され、退避履歴は1つも退避されていないことが示されている。   The save history table 842 shows the save history registered in the main storage unit 130 after the loop individual history is restored. The save history table 842 indicates that all save history shown in the save history table 832 is restored and deleted from the main storage unit 130, and no save history is saved.

このように、本発明の実施の形態では、履歴復元部520を設けることによって、主記憶部130に退避履歴として退避されたループ個別履歴を履歴メモリ430に復元することができる。   Thus, in the embodiment of the present invention, by providing the history restoration unit 520, the loop individual history saved as the save history in the main storage unit 130 can be restored in the history memory 430.

[本発明の実施の形態における新たな実行履歴の登録例]
図10は、本発明の実施の形態における新たな実行履歴が登録されるときの履歴メモリ430における履歴情報と主記憶部130における退避履歴との具体例を示す図である。ここでは、履歴メモリ430は、データ量と無関係に12個の履歴情報が登録できる容量であることを想定する。
[Example of registration of new execution history in the embodiment of the present invention]
FIG. 10 is a diagram showing a specific example of history information in the history memory 430 and save history in the main storage unit 130 when a new execution history is registered in the embodiment of the present invention. Here, it is assumed that the history memory 430 has a capacity capable of registering 12 pieces of history information regardless of the data amount.

また、ここでは、空き容量が無い履歴メモリ430に新たな実行履歴を登録したい場合には、前回の使用からの未使用期間が最も長い実行履歴を削除する(LRU)ことができることとする。さらにここでは、実行履歴は登録されてから一度も使用されていないことを想定し、LRUにより削除される実行履歴は、履歴メモリ430に最も早くに登録された実行履歴であることとする。   Here, when it is desired to register a new execution history in the history memory 430 having no free space, the execution history having the longest unused period since the previous use can be deleted (LRU). Furthermore, here, it is assumed that the execution history has never been used after being registered, and the execution history deleted by the LRU is the earliest execution history registered in the history memory 430.

図10(a)は、新たに登録される実行履歴を示した模式図である。ここには、新たに登録される実行履歴が登録履歴表861に示されている。なお、図10では、登録履歴表861に記されている実行履歴のうち、上方に記されている実行履歴から順に履歴メモリ430に登録されることを想定する。   FIG. 10A is a schematic diagram showing an execution history newly registered. Here, a newly registered execution history is shown in a registration history table 861. In FIG. 10, it is assumed that the execution history recorded in the registration history table 861 is registered in the history memory 430 in order from the execution history described above.

図10(b)は、従来技術を用いたデータ処理装置100における新たな実行履歴が登録されるときの履歴メモリ430における履歴情報と主記憶部130における退避履歴との具体例を示したものである。ここには、実行履歴表871と、実行履歴表872と、消去履歴表873とが示されている。   FIG. 10B shows a specific example of history information in the history memory 430 and save history in the main storage unit 130 when a new execution history is registered in the data processing apparatus 100 using the conventional technology. is there. Here, an execution history table 871, an execution history table 872, and an erase history table 873 are shown.

実行履歴表871は、登録履歴表861において示した新たな実行履歴が登録される前の履歴メモリ430における実行履歴を表したものである。また、この実行履歴表871では、上方に記されている実行履歴から順に履歴メモリ430に登録されたことを想定する。   The execution history table 871 represents an execution history in the history memory 430 before the new execution history shown in the registration history table 861 is registered. In the execution history table 871, it is assumed that the execution history is registered in the history memory 430 in order from the execution history described above.

実行履歴表872は、登録履歴表861において示した新たな実行履歴が登録された後の履歴メモリ430における実行履歴を示すものである。この実行履歴表872には、実行履歴表871の実行履歴に登録履歴表861で示した新たな実行履歴が登録された状態が示されている。   The execution history table 872 shows an execution history in the history memory 430 after the new execution history shown in the registration history table 861 is registered. The execution history table 872 shows a state where the new execution history shown in the registration history table 861 is registered in the execution history of the execution history table 871.

この実行履歴表872では、実行履歴表871における上から1番目乃至5番目(00(funcE)、01(loopB(1))乃至01(loopB(4))の実行履歴が消去されている。そして、実行履歴表871における上から6番目乃至12番目の実行履歴が、実行履歴表872の1番目乃至7番目に示されている。さらに、この実行履歴表872では、登録履歴表861で示した新たな実行履歴が8番目乃至12番目に示されている。   In the execution history table 872, the first to fifth (00 (funcE), 01 (loopB (1)) to 01 (loopB (4)) execution histories from the top in the execution history table 871 are deleted. The sixth to twelfth execution histories from the top in the execution history table 871 are shown in the first to seventh in the execution history table 872. Further, in this execution history table 872, the registration history table 861 indicates New execution histories are shown in the eighth to twelfth.

消去履歴表873は、登録履歴表861で示した新たな実行履歴の登録により履歴メモリ430から消去された実行履歴を表したものである。この消去履歴表873では、実行履歴表871における上から1番目乃至5番目の実行履歴が示されている。   The deletion history table 873 represents an execution history deleted from the history memory 430 by registration of a new execution history shown in the registration history table 861. In the deletion history table 873, the first to fifth execution histories from the top in the execution history table 871 are shown.

このように、従来技術を用いたデータ処理装置100では、履歴制御部510を備えていないため、実行履歴の実行結果を主記憶部130に退避させることができない。これにより、新たな実行履歴を履歴メモリ430に登録する場合には、前回の使用から最も未使用期間が長い実行履歴を履歴メモリ430から削除して、その代わりに新たな実行履歴を登録しなければならない。   As described above, since the data processing apparatus 100 using the conventional technique does not include the history control unit 510, the execution result of the execution history cannot be saved in the main storage unit 130. As a result, when a new execution history is registered in the history memory 430, the execution history having the longest unused period since the previous use must be deleted from the history memory 430, and a new execution history must be registered instead. I must.

図10(c)は、本発明の実施の形態におけるデータ処理装置100において新たな実行履歴が登録されるときの履歴メモリ430における履歴情報と主記憶部130における退避履歴との具体例を示したものである。ここには、実行履歴表881と、退避履歴表882と、実行履歴表883と、退避履歴表884とが示されている。ここでは、主記憶部130の退避履歴を退避させる領域は、データ量と無関係に8個の退避履歴が退避できる容量であることを想定する。   FIG. 10C shows a specific example of history information in the history memory 430 and save history in the main storage unit 130 when a new execution history is registered in the data processing apparatus 100 according to the embodiment of the present invention. Is. Here, an execution history table 881, a save history table 882, an execution history table 883, and a save history table 884 are shown. Here, it is assumed that the area for saving the save history in the main storage unit 130 has a capacity capable of saving eight save histories regardless of the data amount.

実行履歴表881は、登録履歴表861において示した新たな実行履歴が登録される前の履歴メモリ430における実行履歴を表したものである。この実行履歴表881は、図10(b)の実行履歴表871と同様のものを示しているため、詳細な説明を省略する。   The execution history table 881 represents an execution history in the history memory 430 before the new execution history shown in the registration history table 861 is registered. Since this execution history table 881 shows the same thing as the execution history table 871 of FIG.10 (b), detailed description is abbreviate | omitted.

退避履歴表882は、登録履歴表861において示した新たな実行履歴が登録される前の主記憶部130における退避履歴を表したものである。この退避履歴表882では、主記憶部130に退避履歴は1つも退避されていないことが示されている。   The save history table 882 represents the save history in the main storage unit 130 before the new execution history shown in the registration history table 861 is registered. The save history table 882 indicates that no save history is saved in the main storage unit 130.

実行履歴表883は、登録履歴表861において示した新たな実行履歴が登録された後の履歴メモリ430における履歴情報を示すものである。この実行履歴表883には、実行履歴表881の実行履歴に登録履歴表861で示した新たな実行履歴が登録された状態が示されている。   The execution history table 883 shows history information in the history memory 430 after the new execution history shown in the registration history table 861 is registered. The execution history table 883 shows a state in which the new execution history shown in the registration history table 861 is registered in the execution history of the execution history table 881.

この実行履歴表883では、実行履歴表881における上から2番目乃至5番目のループBのループ個別履歴(01(loopB(1))乃至01(loopB(4))が履歴メモリ430から削除されている。そして、その削除されたループBのループ個別履歴の代わりに、ループ代表履歴(10(loopB))が実行履歴表883における上から2番目に示されている。また、実行履歴表881における上から6番目乃至9番目の実行履歴が、この実行履歴表883では3番目乃至6番目に示されている。   In the execution history table 883, the loop individual history (01 (loopB (1)) to 01 (loopB (4)) of the second to fifth loops B in the execution history table 881 are deleted from the history memory 430. Then, instead of the loop individual history of the deleted loop B, the loop representative history (10 (loop B)) is shown second from the top in the execution history table 883. Also, in the execution history table 881 The sixth to ninth execution histories from the top are shown in the third to sixth in the execution history table 883.

さらに、この実行履歴表883では、実行履歴表881における上から10番目乃至12番目のループCのループ個別履歴(01(loopC(1))乃至01(loopC(3))が履歴メモリ430から削除されている。そして、その削除されたループCのループ個別履歴の代わりに、ループ代表履歴(10(loopC))が上から7番目に示されている。そして、この実行履歴表883では、登録履歴表861で示した新たな実行履歴が、8番目乃至12番目に記されている。   Further, in the execution history table 883, loop individual histories (01 (loopC (1)) to 01 (loopC (3)) of the tenth to twelfth loops C in the execution history table 881 are deleted from the history memory 430. Then, instead of the loop individual history of the deleted loop C, the loop representative history (10 (loop C)) is shown in the seventh from the top. The new execution history shown in the history table 861 is written in the eighth to twelfth.

退避履歴表884は、登録履歴表861において示した新たな実行履歴が登録された後の主記憶部130における退避履歴を示すものである。この退避履歴表884では、上から1番目乃至4番目にループBに関する退避履歴(loopB(1)乃至loopB(4))が示されている。さらに、ここでは、上から5番目乃至7番目にループCに関する退避履歴(loopC(1)乃至loopC(3))が示されている。   The save history table 884 shows the save history in the main storage unit 130 after the new execution history shown in the registration history table 861 is registered. In the save history table 884, the save history (loop B (1) to loop B (4)) regarding the loop B is shown from the first to the fourth from the top. Further, here, the evacuation history (loopC (1) to loopC (3)) regarding the loop C is shown from the fifth to the seventh from the top.

このように、本発明の実施の形態におけるデータ処理装置100では、履歴制御部510を備えているため、退避履歴を主記憶部130に退避させ、退避履歴の基となったループ個別履歴の代わりにループ代表履歴を履歴メモリ430に登録することができる。これにより、新たな実行履歴を履歴メモリ430に登録する場合には、ループ個別履歴に基づいて退避履歴を退避させ、そしてループ個別履歴をループ代表履歴に置き換えることで履歴メモリ430空き容量を生成することができる。すなわち、本発明の実施の形態によれば、従来技術を用いたデータ処理装置100と比較して履歴メモリ430に保持される実行履歴の数を増やすことができる。   As described above, since the data processing apparatus 100 according to the embodiment of the present invention includes the history control unit 510, the save history is saved in the main storage unit 130, and instead of the loop individual history based on the save history. The loop representative history can be registered in the history memory 430. As a result, when a new execution history is registered in the history memory 430, the save history is saved based on the loop individual history, and the history memory 430 free space is generated by replacing the loop individual history with the loop representative history. be able to. That is, according to the embodiment of the present invention, the number of execution histories held in the history memory 430 can be increased as compared with the data processing apparatus 100 using the conventional technique.

<4.データ処理装置の処理手順例>
[本発明の実施の形態における履歴制御部510の動作例]
次に、本発明の実施の形態における履歴制御部510の処理について図面を参照して説明する。
<4. Example of processing procedure of data processing apparatus>
[Operation Example of History Control Unit 510 in the Embodiment of the Present Invention]
Next, processing of the history control unit 510 in the embodiment of the present invention will be described with reference to the drawings.

図11は、本発明の実施の形態における履歴制御部510によるループ個別履歴の退避処理の処理手順例を示すフローチャートである。なお、ここでは、関数履歴と、ループ個別履歴と、ループ代表履歴と、退避履歴とは、それぞれ固定長のデータであることを想定する。また、ここでは、履歴メモリ430では、関数履歴と、ループ個別履歴と、ループ代表履歴とは連続するアドレスに登録された順に格納されるものとする。さらに、主記憶部130では、退避履歴は連続するアドレスに退避された順に格納されるものとする。   FIG. 11 is a flowchart illustrating an example of a processing procedure of loop individual history saving processing by the history control unit 510 according to the embodiment of the present invention. Here, it is assumed that the function history, the loop individual history, the loop representative history, and the save history are each fixed-length data. Here, in the history memory 430, the function history, the loop individual history, and the loop representative history are stored in the order registered in consecutive addresses. Further, in the main storage unit 130, the save history is stored in the order in which the save history is saved at successive addresses.

まず、先頭探索部610において、探索アドレス(radr)が「0」に設定される(ステップS911)。これにより、履歴メモリ430の履歴情報が登録される領域の先頭のデータから退避履歴の探索が開始されるようになる。   First, in the head search unit 610, the search address (radr) is set to “0” (step S911). As a result, the search for the save history is started from the data at the head of the area where the history information of the history memory 430 is registered.

次に、先頭探索部610において、探索アドレス(radr)から識別子が読み出される(ステップS912)。そして、読み出された識別子が、ループ個別履歴を指し示す「01」であるか否かが判断される(ステップS913)。そして、識別子が「01」でないと判断された場合には、識別子が関数履歴を指し示す「00」であるか否かが判断される(ステップS914)。   Next, the head search unit 610 reads the identifier from the search address (radr) (step S912). Then, it is determined whether or not the read identifier is “01” indicating the loop individual history (step S913). If it is determined that the identifier is not “01”, it is determined whether the identifier is “00” indicating the function history (step S914).

そして、識別子が「00」でないと判断された場合には、解析対象の履歴情報は識別子が「10」のループ代表履歴であると判定される。続いて、ループ代表履歴のデータ長から算出されたループ代表履歴が保持されているアドレスの個数である代表履歴アドレス数(x)が探索アドレス(radr)に足されることによって、探索アドレス(radr)が更新される(ステップS915)。これにより、探索アドレス(radr)は、次に解析する履歴情報における識別子を指し示すアドレスとなる。   If it is determined that the identifier is not “00”, it is determined that the history information to be analyzed is a loop representative history with the identifier “10”. Subsequently, the number of representative history addresses (x), which is the number of addresses holding the loop representative history calculated from the data length of the loop representative history, is added to the search address (radr), whereby the search address (radr). ) Is updated (step S915). Thereby, the search address (radr) becomes an address indicating the identifier in the history information to be analyzed next.

一方、ステップS914の処理において、識別子が「00」であると判断された場合には、その識別子を示す履歴情報が関数履歴であると判定される。そして、関数履歴のデータ長から算出された関数履歴が保持されているアドレスの個数である関数履歴アドレス数(y)が探索アドレス(radr)に足されることによって、探索アドレス(radr)が更新される(ステップS916)。   On the other hand, if it is determined in step S914 that the identifier is “00”, it is determined that the history information indicating the identifier is a function history. Then, the search address (radr) is updated by adding the function history address number (y), which is the number of addresses holding the function history calculated from the function history data length, to the search address (radr). (Step S916).

一方、ステップS913の処理において、識別子が「01」であると判断された場合には、その識別子を示す履歴情報がループ個別履歴であると判定される。そして、ループ個別履歴のデータ長から算出されたループ個別履歴が保持されているアドレスの個数である個別履歴アドレス数(z)が探索アドレス(radr)に足されることによって、探索アドレス(radr)が更新される(ステップS917)。   On the other hand, if it is determined in step S913 that the identifier is “01”, it is determined that the history information indicating the identifier is a loop individual history. Then, the search address (radr) is obtained by adding the number of individual history addresses (z), which is the number of addresses holding the loop individual history calculated from the data length of the loop individual history, to the search address (radr). Is updated (step S917).

次に、連続探索部620において、連続探索対象ループ開始アドレス(ex_adr)が、ステップS913で検出されたループ個別履歴における反復再利用区間の開始アドレスに設定される(ステップS918)。さらに、退避履歴開始アドレス(madr)が、退避領域管理部530から供給された最初の退避履歴を格納する開始アドレスである退避開始アドレスに設定される(ステップS919)。   Next, in the continuous search unit 620, the continuous search target loop start address (ex_adr) is set to the start address of the repeated reuse section in the loop individual history detected in step S913 (step S918). Further, the save history start address (madr) is set to a save start address which is a start address for storing the first save history supplied from the save area management unit 530 (step S919).

さらに、ループの回数をカウントするための連続カウンタ(rcnt)が「1」に設定される(ステップS920)。また、ループ個別履歴開始アドレス(start_adr)が、ステップS913で検出されたループ個別履歴の開始アドレスに設定される(ステップS921)。このステップS918乃至S921の一連の処理により、ステップS930における処理の準備が完了する。   Further, a continuous counter (rcnt) for counting the number of loops is set to “1” (step S920). Further, the loop individual history start address (start_adr) is set to the start address of the loop individual history detected in step S913 (step S921). With the series of processes in steps S918 to S921, preparation for the process in step S930 is completed.

そして、ステップS913で検出されたループ個別履歴が、反復される反復再利用区間の1番目の実行結果なのか否かが判断され、反復されている場合にはループ個別履歴の実行結果を主記憶部130に退避される実行結果退避処理が行われる(ステップS930)。   Then, it is determined whether or not the loop individual history detected in step S913 is the first execution result of the repeated reuse section to be repeated. If it is repeated, the execution result of the loop individual history is stored in the main memory. The execution result saving process saved in the unit 130 is performed (step S930).

ステップS915、S916およびS930の後に、探索アドレス(radr)が履歴メモリ430の使用領域最終アドレスを超えたか否かが判断される(ステップS923)。ここでいう使用領域最終アドレスは、履歴メモリ430の履歴情報が登録される領域において、連続するアドレスに登録された順に格納された履歴情報のうち最後に登録された履歴情報が記録されている最後のアドレスである。   After steps S915, S916, and S930, it is determined whether the search address (radr) has exceeded the used area final address of the history memory 430 (step S923). The last used area address here is the last recorded history information among the history information stored in the order of registration in consecutive addresses in the area where the history information of the history memory 430 is registered. Address.

そして、探索アドレス(radr)が、使用領域の最終アドレスを超えていない場合には、ステップS912に戻り処理が繰り返される。一方、最終アドレスを超えている場合には、ループ個別履歴の退避処理は終了する。   If the search address (radr) does not exceed the final address of the use area, the process returns to step S912 and is repeated. On the other hand, when the final address is exceeded, the loop individual history saving process ends.

図12は、本発明の実施の形態における履歴制御部510によるループ個別履歴の実行結果退避処理(ステップS930)の処理手順例を示すフローチャートである。   FIG. 12 is a flowchart illustrating an example of a processing procedure of loop individual history execution result saving processing (step S930) by the history control unit 510 according to the embodiment of the present invention.

まず、連続探索部620において、探索アドレス(radr)が履歴メモリ430の使用領域最終アドレスを超えたか否かが判断される(ステップS931)。そして、探索アドレス(radr)が使用領域の最終アドレスを超えていない場合には、探索アドレス(radr)から識別子が読み出される(ステップS932)。続いて、読み出された識別子が、ループ個別履歴を指し示す「01」であるか否かが判断される(ステップS933)。そして、識別子が「01」でないと判断された場合には、ステップS938に進む。   First, the continuous search unit 620 determines whether or not the search address (radr) exceeds the use area final address of the history memory 430 (step S931). If the search address (radr) does not exceed the final address of the use area, the identifier is read from the search address (radr) (step S932). Subsequently, it is determined whether or not the read identifier is “01” indicating the loop individual history (step S933). If it is determined that the identifier is not “01”, the process proceeds to step S938.

一方、識別子が「01」であると判断された場合には、そのループ個別履歴に含まれる開始アドレスと、連続探索対象ループ開始アドレス(ex_adr)とが同一であるか否かが判断される(ステップS934)。そして、開始アドレスが同一でないと判断された場合には、ステップS938に進む。   On the other hand, when it is determined that the identifier is “01”, it is determined whether or not the start address included in the loop individual history is the same as the continuous search target loop start address (ex_adr) ( Step S934). If it is determined that the start addresses are not the same, the process proceeds to step S938.

一方、開始アドレスが同一である場合には、ループ個別履歴のループカウンタ値が、連続カウンタ(rcnt)に「1」を加算した値(rcnt+1)と同じ値であるか否かが判断される(ステップS935)。そして、ループカウンタ値と「rcnt+1」とが同一でないと判断された場合には、ステップS938に進む。   On the other hand, if the start addresses are the same, it is determined whether or not the loop counter value of the loop individual history is the same value as the value obtained by adding “1” to the continuous counter (rcnt) (rcnt + 1) ( Step S935). When it is determined that the loop counter value and “rcnt + 1” are not the same, the process proceeds to step S938.

これらステップS934およびステップS935により、ステップS933で検出されたループ個別履歴は、図11のステップS913において検出されたループ個別履歴を1回目のループとするループ個別履歴であるか否かが判定される。   Through these steps S934 and S935, it is determined whether or not the loop individual history detected in step S933 is a loop individual history in which the loop individual history detected in step S913 in FIG. 11 is the first loop. .

例えば、ステップS934において、ループ個別履歴に含まれる開始アドレスと、連続探索対象ループ開始アドレス(ex_adr)とが異なる場合には、異なる反復再利用区間のループ個別履歴が連続していると判断される。   For example, if the start address included in the loop individual history is different from the loop search target loop start address (ex_adr) in step S934, it is determined that the loop individual histories in different repeated reuse sections are continuous. .

また、ステップS935において、ループ個別履歴に含まれるループカウンタ値が「rcnt+1」とは異なっている場合には、同じ反復再利用区間が反復ではなく新たに1回目から実行されたと判断される。このステップS935の一例として、ループカウンタ値が「1」であり、「rcnt+1」が「5」である場合を説明する。この場合には、図11のステップS913で検出されたループ個別履歴の開始アドレスが指し示す反復再利用区間は、反復されて5回実行された後に、ステップS933で検出されたループ個別履歴の基となった実行から新たな反復になったと判断される。   In step S935, if the loop counter value included in the loop individual history is different from “rcnt + 1”, it is determined that the same iterative reuse section has been newly executed from the first time instead of being repeated. As an example of step S935, a case where the loop counter value is “1” and “rcnt + 1” is “5” will be described. In this case, the repetitive reuse section indicated by the start address of the loop individual history detected in step S913 in FIG. 11 is repeated and executed five times, and then the loop individual history base detected in step S933 is used. It is determined that the execution has become a new iteration.

一方、ステップS935において、ループカウンタ値と「rcnt+1」とが同一であると判断された場合には、連続カウンタ(rcnt)に「1」が加算される(ステップS936)。そして、(個別履歴アドレス数(y)が探索アドレス(radr)に足されることによって、探索アドレス(radr)が更新される(ステップS937)。その後、ステップS937の処理が終わると、ステップS931に戻り処理が繰り返される。   On the other hand, if it is determined in step S935 that the loop counter value and “rcnt + 1” are the same, “1” is added to the continuous counter (rcnt) (step S936). Then, (the number of individual history addresses (y) is added to the search address (radr) to update the search address (radr) (step S937). Thereafter, when the process of step S937 ends, the process proceeds to step S931. The return process is repeated.

一方、ステップS931において、探索アドレス(radr)が使用領域最終アドレスよりも大きな値のアドレスであると判断された場合には、連続カウンタ(rcnt)の値が「1」より大きいか否かが判断される(ステップS938)。これにより、図11のステップS913で検出されたループ個別履歴は、反復された実行の一回目のループ個別履歴なのか、単独の実行のループ個別履歴なのかが判断される。そして、連続カウンタ(rcnt)の値が「1」以下であると判断された場合には、図11のステップS913で検出されたループ個別履歴は単独の実行のループ個別履歴と判定し、実行結果退避処理を終了する。   On the other hand, if it is determined in step S931 that the search address (radr) is an address having a value larger than the used area final address, it is determined whether or not the value of the continuous counter (rcnt) is greater than “1”. (Step S938). Accordingly, it is determined whether the loop individual history detected in step S913 in FIG. 11 is the first loop individual history of repeated execution or the loop individual history of single execution. When it is determined that the value of the continuous counter (rcnt) is equal to or less than “1”, the loop individual history detected in step S913 in FIG. 11 is determined as a single loop individual history, and the execution result. End the save process.

一方、連続カウンタ(rcnt)の値が「1」より大きいと判断された場合には、ループ個別履歴が履歴メモリ430から取得される(ステップS939)。このステップS939では、ループ個別履歴取得部630により、ループ個別履歴開始アドレス(start_adr)を最初のループ個別履歴の登録開始始点として連続カウンタ(rcnt)個のループ個別履歴が履歴メモリ430から取得される。   On the other hand, when it is determined that the value of the continuous counter (rcnt) is larger than “1”, the loop individual history is acquired from the history memory 430 (step S939). In this step S939, the loop individual history acquisition unit 630 acquires the loop individual history from the history memory 430 using the loop individual history start address (start_adr) as the first loop individual history registration start point. .

続いて、退避履歴転送部640により、ループ個別履歴に基づいて退避履歴が生成され、その生成された退避履歴が主記憶部130に退避履歴開始アドレス(madr)を始点として記憶される(ステップS940)。なお、ステップS940は、特許請求の範囲に記載の履歴制御手順の一例である。   Subsequently, the save history transfer unit 640 generates a save history based on the loop individual history, and the generated save history is stored in the main storage unit 130 with the save history start address (madr) as a starting point (step S940). ). Note that step S940 is an example of a history control procedure described in the claims.

次に、ループ個別履歴消去部512により、退避履歴の基となったループ個別履歴が履歴メモリから消去される(ステップS941)。なお、ステップS941は、特許請求の範囲に記載の履歴制御手順の一例である。   Next, the loop individual history deletion unit 512 deletes the loop individual history that is the basis of the save history from the history memory (step S941). Note that step S941 is an example of a history control procedure described in the claims.

そして、ループ代表履歴登録部513により、ループ代表履歴がループ個別履歴開始アドレス(start_adr)に基づいて履歴メモリ430に登録される(ステップS942)。そして、実行結果退避処理は終了する。なお、ステップS942は、特許請求の範囲に記載の履歴制御手順の一例である。   Then, the loop representative history registration unit 513 registers the loop representative history in the history memory 430 based on the loop individual history start address (start_adr) (step S942). Then, the execution result saving process ends. Step S942 is an example of the history control procedure described in the claims.

このように、本発明の実施の形態では、反復再利用区間のループ個別履歴のうち反復された実行に関するループ個別履歴のみを主記憶部130に退避させることができる。   As described above, in the embodiment of the present invention, it is possible to save only the loop individual history related to repeated execution among the loop individual histories in the repeated reuse section in the main storage unit 130.

[本発明の実施の形態における履歴復元部520の動作例]
次に、本発明の実施の形態における履歴復元部520の処理について図面を参照して説明する。
[Operation Example of History Restoring Unit 520 in the Embodiment of the Present Invention]
Next, processing of the history restoration unit 520 in the embodiment of the present invention will be described with reference to the drawings.

図13は、本発明の実施の形態における履歴復元部520によるループ個別履歴の復元処理の処理手順例を示すフローチャートである。なお、ここでは、図11および図12と同様に、関数履歴と、ループ個別履歴と、ループ代表履歴と、退避履歴とは、それぞれ固定長のデータであることを想定する。また、ここでは、図11および図12と同様に、履歴メモリ430では、関数履歴と、ループ個別履歴と、ループ代表履歴とは連続するアドレスに登録された順に格納されるものとする。さらに、主記憶部130では、退避履歴は連続するアドレスに退避された順に格納されるものとする。また、ここでは、プログラムの実行の開始をフローチャートの開始とし、プログラムの実行の終了をフローチャートの終了とする。   FIG. 13 is a flowchart illustrating an example of a processing procedure of loop individual history restoration processing by the history restoration unit 520 according to the embodiment of the present invention. Here, as in FIGS. 11 and 12, it is assumed that the function history, the loop individual history, the loop representative history, and the save history are fixed-length data. Here, as in FIGS. 11 and 12, in the history memory 430, the function history, the loop individual history, and the loop representative history are stored in the order registered in consecutive addresses. Further, in the main storage unit 130, the save history is stored in the order in which the save history is saved at successive addresses. Here, the start of program execution is the start of the flowchart, and the end of program execution is the end of the flowchart.

まず、フェッチ部310およびレジスタファイル340に、関数を参照する命令およびその関数の入力値が読み出される(ステップS951)。次に、命令デコーダ320によって、関数を参照する命令がデコードされる(ステップS952)。続いて、解読(デコード)した命令が再利用命令か否かが判断される(ステップS953)。そして、デコードした命令が再利用命令でないと判断された場合には、実行部330によって、レジスタファイル340から供給される入力値に基づいてその再利用区間が実行されることによって、実行結果が出力される(ステップS954)。なお、ステップS954は、特許請求の範囲に記載の実行手順の一例である。   First, an instruction that refers to a function and an input value of the function are read out to the fetch unit 310 and the register file 340 (step S951). Next, the instruction that refers to the function is decoded by the instruction decoder 320 (step S952). Subsequently, it is determined whether or not the decoded (decoded) instruction is a reuse instruction (step S953). When it is determined that the decoded instruction is not a reuse instruction, the execution section 330 executes the reuse section based on the input value supplied from the register file 340, thereby outputting an execution result. (Step S954). Note that step S954 is an example of an execution procedure described in the claims.

一方、ステップS953の処理において、命令が再利用命令であると解読された場合には、検索要求入力部421によって、再利用区間の開始アドレスおよび入力値を用いて履歴メモリ430に履歴情報があるか否かが判断される(ステップS955)。このとき、再利用区間が反復再利用区間である場合には、開始アドレスおよび入力値に加えてループカウンタ値も用いて履歴メモリ430に履歴情報があるか否か探索される。   On the other hand, if it is determined in step S953 that the instruction is a reuse instruction, the search request input unit 421 stores history information in the history memory 430 using the start address and input value of the reuse section. Is determined (step S955). At this time, if the reuse section is an iterative reuse section, whether or not there is history information in the history memory 430 is searched using the loop counter value in addition to the start address and the input value.

そして、履歴情報が履歴メモリ430にないと判断された場合には、履歴登録部440によって、実行結果登録処理が行われる(ステップS970)。これにより、履歴メモリ430に実行履歴が登録される。   If it is determined that the history information is not in the history memory 430, the history registration unit 440 performs an execution result registration process (step S970). As a result, the execution history is registered in the history memory 430.

一方、履歴情報が履歴メモリ430にあると判断された場合には、実行結果出力部422および履歴復元部520によって、実行結果出力処理が行われる(ステップS980)。これにより、実行している再利用区間の実行結果が履歴メモリ430から出力される。   On the other hand, when it is determined that the history information is in the history memory 430, an execution result output process is performed by the execution result output unit 422 and the history restoration unit 520 (step S980). As a result, the execution result of the reuse section being executed is output from the history memory 430.

そして、ステップS954、S970およびS980の処理の後に、実行結果がレジスタファイル340に書き戻される(ステップS956)。続いて、プログラムの実行が終了したか否かが判断される(ステップS957)。そして、プログラムの実行が終了していないと判断された場合には、ステップS951に戻り処理が繰り返される。   Then, after the processing of steps S954, S970, and S980, the execution result is written back to the register file 340 (step S956). Subsequently, it is determined whether or not the program has been executed (step S957). If it is determined that the execution of the program has not ended, the process returns to step S951 and the process is repeated.

一方、プログラムの実行が終了したと判断された場合には、履歴復元部520によるループ個別履歴の復元処理が終了される。   On the other hand, when it is determined that the execution of the program has ended, the loop individual history restoring process by the history restoring unit 520 is finished.

図14は、本発明の実施の形態における実行結果登録処理(ステップS970)の処理手順例を示すフローチャートである。   FIG. 14 is a flowchart illustrating a processing procedure example of the execution result registration processing (step S970) in the embodiment of the present invention.

まず、実行部330によって、レジスタファイル340から供給される入力値に基づいてその再利用区間が実行されることによって、実行結果が出力される(ステップS971)。次に、履歴登録部440によって、出力された実行結果を含む実行履歴を登録するための空き容量が履歴メモリ430にあるか否かが判断される(ステップS972)。なお、ステップS971は、特許請求の範囲に記載の実行手順の一例である。   First, the execution section 330 executes the reuse section based on the input value supplied from the register file 340, thereby outputting the execution result (step S971). Next, the history registration unit 440 determines whether or not there is free space in the history memory 430 for registering the execution history including the output execution result (step S972). Step S971 is an example of an execution procedure described in the claims.

そして、実行履歴を登録するための空き容量が履歴メモリ430にないと判断された場合には、消去部460によって、前回の使用からの未使用期間が最も長い実行履歴が履歴メモリ430から1つ削除される(ステップS973)。そして、ステップS972に戻り処理が繰り返される。   If it is determined that there is no free space in the history memory 430 for registering the execution history, the deletion unit 460 causes the history memory 430 to execute one execution history with the longest unused period from the previous use. It is deleted (step S973). And it returns to step S972 and a process is repeated.

一方、実行履歴を登録するための空き容量が履歴メモリ430にあると判断された場合には、履歴登録部440により実行履歴が履歴メモリ430に登録される(ステップS974)、実行結果登録処理は終了する。   On the other hand, when it is determined that the history memory 430 has free space for registering the execution history, the history registration unit 440 registers the execution history in the history memory 430 (step S974), finish.

図15は、本発明の実施の形態における実行結果出力処理(ステップS980)の処理手順例を示すフローチャートである。なお、ここでは、関数履歴の実行結果と、ループ個別履歴の実行結果と、ループ代表履歴の退避履歴位置情報とを検索出力情報と表現することとする。   FIG. 15 is a flowchart illustrating a processing procedure example of the execution result output process (step S980) according to the embodiment of the present invention. Here, the execution result of the function history, the execution result of the loop individual history, and the save history position information of the loop representative history are expressed as search output information.

まず、実行結果出力部422において、履歴メモリ430から図13のステップS955で検索された履歴情報の検索出力情報が取得される(ステップS981)。次に、取得された検索出力情報がループ代表履歴の退避履歴位置情報であるか否かが判断される(ステップS982)。そして、取得された検索出力情報がループ代表履歴の退避履歴位置情報でないと判断された場合には、ステップS990に進む。   First, in the execution result output unit 422, search output information of history information searched in step S955 of FIG. 13 is acquired from the history memory 430 (step S981). Next, it is determined whether or not the acquired search output information is the save history position information of the loop representative history (step S982). If it is determined that the acquired search output information is not the save history position information of the loop representative history, the process proceeds to step S990.

一方、取得された検索出力情報がループ代表履歴の退避履歴位置情報であると判断された場合には、退避履歴取得部521によって、退避履歴位置情報が指し示す退避履歴が主記憶部130から取得される(ステップS983)。続いて、ループ個別履歴生成部522によって、退避履歴およびループ代表履歴に基づいてループ個別履歴が復元される(ステップS984)。次に、登録領域確保部523によって、履歴メモリ430からループ代表履歴が消去される(ステップS985)。その後、登録領域確保部523によって、ループ個別履歴を登録するための空き容量が履歴メモリ430にあるか否かが判断される(ステップS986)。そして、ループ個別履歴を登録するための空き容量が履歴メモリ430にないと判断された場合には、登録領域確保部523によって、前回の使用からの未使用期間が最も長い実行履歴が履歴メモリ430から1個削除される(ステップS987)。そして、ステップS986に戻り、処理が繰り返される。   On the other hand, when it is determined that the acquired search output information is the saving history position information of the loop representative history, the saving history acquisition unit 521 acquires the saving history indicated by the saving history position information from the main storage unit 130. (Step S983). Subsequently, the loop individual history generation unit 522 restores the loop individual history based on the save history and the loop representative history (step S984). Next, the loop area history is deleted from the history memory 430 by the registration area securing unit 523 (step S985). Thereafter, the registration area securing unit 523 determines whether or not the history memory 430 has a free capacity for registering the loop individual history (step S986). If it is determined that there is no free space in the history memory 430 for registering the loop individual history, the registration area securing unit 523 determines that the execution history with the longest unused period from the previous use is the history memory 430. Is deleted (step S987). And it returns to step S986 and a process is repeated.

一方、ステップS986の処理において、ループ個別履歴を登録するための空き容量が履歴メモリ430にあると判断された場合には、ループ個別履歴登録部524によって、復元されたループ個別履歴が履歴メモリ430に登録される(ステップS988)。続いて、実行結果出力部422によって、復元されたループ個別履歴が検索される(ステップS989)。   On the other hand, if it is determined in step S 986 that the history memory 430 has free space for registering the loop individual history, the loop individual history registration unit 524 stores the restored loop individual history in the history memory 430. (Step S988). Subsequently, the execution result output unit 422 searches the restored loop individual history (step S989).

その後、検索された実行結果に基づいて実行結果が出力される(ステップS990)。そして、実行結果出力処理は終了する。   Thereafter, the execution result is output based on the searched execution result (step S990). Then, the execution result output process ends.

このように、本発明の実施の形態では、主記憶部130に退避履歴として退避されたループ個別履歴を履歴メモリ430に復元して、その復元したループ個別履歴の実行結果を再利用することができる。   As described above, in the embodiment of the present invention, the loop individual history saved as the save history in the main storage unit 130 can be restored to the history memory 430, and the execution result of the restored loop individual history can be reused. it can.

これまでに示してきたように、本発明の実施の形態によれば、反復再利用区間のループ個別履歴の実行結果を主記憶部130に退避させることができる。これにより、実行結果を退避させない従来技術の場合と比べて履歴メモリ430に保持される履歴情報の数を増やすことができる。また、退避させた実行結果も実行結果の検索対象とすることができるため、その退避させた実行結果を用いて実行結果の再利用をすることができる。   As described above, according to the embodiment of the present invention, the execution result of the loop individual history in the repeated reuse section can be saved in the main storage unit 130. As a result, the number of pieces of history information held in the history memory 430 can be increased compared to the case of the prior art in which the execution result is not saved. In addition, since the saved execution result can be used as a search target for the execution result, the execution result can be reused by using the saved execution result.

また、本発明の実施の形態によれば、従来技術によるデータ処理装置100と比較して、履歴メモリ430から有効な実行履歴が削除されることによる値再利用の効率の低下を防止することができる。さらに、本発明の実施の形態によれば、従来技術と比較して少ない容量の履歴メモリ430でも同等の効果が生じるため、履歴メモリ430を大きい容量とすることに伴う実行履歴の検索時間の増加による値再利用の効率の低下を防止することができる。   Further, according to the embodiment of the present invention, compared with the data processing apparatus 100 according to the prior art, it is possible to prevent a decrease in value reuse efficiency due to deletion of an effective execution history from the history memory 430. it can. Furthermore, according to the embodiment of the present invention, the same effect can be obtained even with a history memory 430 having a smaller capacity compared to the prior art. Therefore, an increase in execution history search time associated with a larger capacity of the history memory 430 is achieved. It is possible to prevent a decrease in value reuse efficiency due to.

また、本発明の実施の形態は、従来技術と比べて履歴メモリ430に保持される履歴情報の数を増やすことができるため、プログラムの投機実行などの場合において、特に顕著な効果が得られると考えられる。   Further, the embodiment of the present invention can increase the number of pieces of history information held in the history memory 430 as compared with the prior art, so that a particularly remarkable effect can be obtained in the case of speculative execution of a program. Conceivable.

なお、本発明の実施の形態は本発明を具現化するための一例を示したものであり、本発明の実施の形態において明示したように、本発明の実施の形態における事項と、特許請求の範囲における発明特定事項とはそれぞれ対応関係を有する。同様に、特許請求の範囲における発明特定事項と、これと同一名称を付した本発明の実施の形態における事項とはそれぞれ対応関係を有する。ただし、本発明は実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において実施の形態に種々の変形を施すことにより具現化することができる。   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.

例えば、本発明の実施の形態においては、主記憶部130に退避された実行結果を再利用する際に、退避履歴からループ個別履歴を復元して履歴メモリ430に登録し、その登録されたループ個別履歴から実行結果を出力する例を説明した。しかしながら、これに限定されるものではなく、主記憶部130に退避された実行結果を再利用する際に、ループ履歴を復元しないで実行結果を再利用する場合も考えられる。   For example, in the embodiment of the present invention, when the execution result saved in the main storage unit 130 is reused, the loop individual history is restored from the saved history and registered in the history memory 430, and the registered loop An example in which the execution result is output from the individual history has been described. However, the present invention is not limited to this, and when the execution result saved in the main storage unit 130 is reused, the execution result may be reused without restoring the loop history.

また、本発明の実施の形態において説明した処理手順は、これら一連の手順を有する方法として捉えてもよく、また、これら一連の手順をコンピュータに実行させるためのプログラム乃至そのプログラムを記憶する記録媒体として捉えてもよい。この記録媒体として、例えば、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 実行部
340 レジスタファイル
400 履歴管理部
410 履歴対象データ保持部
420 履歴検索部
421 検索要求入力部
422 実行結果出力部
430 履歴メモリ
440 履歴登録部
450 履歴メモリ容量管理部
460 消去部
500 履歴変換部
510 履歴制御部
512 ループ個別履歴消去部
513 ループ代表履歴登録部
520 履歴復元部
521 退避履歴取得部
522 ループ個別履歴生成部
523 登録領域確保部
524 ループ個別履歴登録部
530 退避領域管理部
600 退避履歴生成部
610 先頭探索部
620 連続探索部
630 ループ個別履歴取得部
640 退避履歴転送部
650 ループ代表履歴生成部
DESCRIPTION OF SYMBOLS 100 Data processor 120 Bus 130 Main memory part 200 Primary cache 210 Instruction cache 220 Data cache 300 Processor core 310 Fetch part 320 Instruction decoder 330 Execution part 340 Register file 400 History management part 410 History object data holding part 420 History search part 421 Search Request input unit 422 Execution result output unit 430 History memory 440 History registration unit 450 History memory capacity management unit 460 Deletion unit 500 History conversion unit 510 History control unit 512 Loop individual history deletion unit 513 Loop representative history registration unit 520 History restoration unit 521 Save History acquisition unit 522 Loop individual history generation unit 523 Registration area securing section 524 Loop individual history registration section 530 Save area management section 600 Save history generation section 610 First search section 620 Continuous search Part 630 loop individual history acquisition unit 640 saving history transfer unit 650 loop representative history generating unit

Claims (12)

命令区間を実行して実行結果を出力する実行部と、
前記命令区間のうち実行結果が再び利用される再利用区間の区間識別情報と入力値と実行結果とを実行履歴として保持し、前記保持した実行結果が再び利用される場合には前記区間識別情報および前記入力値に基づいて前記実行履歴が検索される履歴メモリと、
前記再利用区間のうち実行が反復される反復再利用区間の各回の前記実行結果を前記履歴メモリから退避させるための退避履歴を保持する退避履歴保持部と、
前記反復再利用区間の前記実行履歴に基づいて前記退避履歴を前記退避履歴保持部に供給し、前記退避履歴の供給の際に前記退避履歴の基となった前記実行履歴を前記履歴メモリから消去して前記退避履歴を指し示す情報を含む代表履歴を前記履歴メモリに保持させる履歴制御部と
を備えるデータ処理装置。
An execution unit that executes an instruction section and outputs an execution result; and
The section identification information, the input value, and the execution result of the reuse section in which the execution result is reused among the command sections are stored as an execution history, and the section identification information is used when the stored execution result is used again. A history memory in which the execution history is searched based on the input value;
An evacuation history holding unit for holding an evacuation history for evacuating the execution result of each iteration of an iterative reuse interval in which execution is repeated among the reuse intervals;
The save history is supplied to the save history holding unit based on the execution history of the repeated reuse section, and the execution history that is the basis of the save history is deleted from the history memory when the save history is supplied. And a history control unit for holding a representative history including information indicating the save history in the history memory.
前記履歴制御部は、前記履歴メモリに保持させる新たな前記実行履歴のデータ量が前記履歴メモリの空き容量よりも大きい場合には前記退避履歴を前記退避履歴保持部に供給する請求項1記載のデータ処理装置。   The said history control part supplies the said save history to the said save history holding | maintenance part, when the data amount of the said new execution log to hold | maintain in the said log | history memory is larger than the free capacity of the said log | history memory. Data processing device. 前記退避履歴および前記代表履歴に基づいて前記実行履歴を前記履歴メモリに復元する履歴復元部と、
前記区間識別情報および前記入力値に基づいて前記復元された前記実行履歴を前記履歴メモリから検索した場合には前記復元された前記実行履歴に基づいて前記実行結果を出力する履歴検索部と
をさらに備える請求項1記載のデータ処理装置。
A history restoring unit for restoring the execution history to the history memory based on the save history and the representative history;
A history search unit that outputs the execution result based on the restored execution history when the restored execution history is retrieved from the history memory based on the section identification information and the input value; The data processing apparatus according to claim 1, further comprising:
前記履歴検索部は、前記区間識別情報および前記入力値に基づいて検索された前記実行履歴が前記代表履歴であった場合には前記復元部に前記実行履歴の復元を開始させる請求項3記載のデータ処理装置。   The said history search part makes the said restoration part start restoration of the said execution history, when the said execution history searched based on the said area identification information and the said input value is the said representative history. Data processing device. 前記履歴制御部は、前記退避履歴の個数を示す退避カウントをさらに含む前記代表履歴を生成し、
前記履歴復元部は、前記代表履歴における前記退避履歴を指し示す情報および前記退避カウントに基づいて前記退避履歴を前記退避履歴保持部から抽出して前記実行履歴を復元する
請求項3記載のデータ処理装置。
The history control unit generates the representative history further including a save count indicating the number of the save history,
4. The data processing device according to claim 3, wherein the history restoration unit extracts the save history from the save history holding unit based on information indicating the save history in the representative history and the save count, and restores the execution history. .
前記実行部は、前記再利用区間の前記実行結果を供給する場合には前記反復再利用区間の前記実行履歴と前記反復再利用区間以外の前記実行履歴と前記代表履歴とを識別するための識別子をさらに出力し、
前記履歴メモリは、前記識別子を前記実行履歴としてさらに保持し、
前記履歴制御部は、前記識別子を用いて識別した前記実行履歴に基づいて前記退避履歴を供給し、前記識別子をさらに含む前記代表履歴を生成する
請求項1記載のデータ処理装置。
The execution unit, when supplying the execution result of the reuse section, an identifier for identifying the execution history of the repeated reuse section, the execution history other than the repeated reuse section, and the representative history Further output,
The history memory further holds the identifier as the execution history,
The data processing apparatus according to claim 1, wherein the history control unit supplies the save history based on the execution history identified using the identifier, and generates the representative history further including the identifier.
前記反復再利用区間はサブルーチンであり、前記実行部は、前記サブルーチンの開始アドレスを前記区間識別情報として出力する請求項1記載のデータ処理装置。   The data processing apparatus according to claim 1, wherein the repeated reuse section is a subroutine, and the execution unit outputs a start address of the subroutine as the section identification information. 前記反復再利用区間はループであり、前記実行部は、前記ループの開始アドレスを前記区間識別情報として出力する請求項1記載のデータ処理装置。   The data processing apparatus according to claim 1, wherein the repeated reuse section is a loop, and the execution unit outputs a start address of the loop as the section identification information. 前記実行部は、前記反復再利用区間の前記実行結果を出力する場合には何回目の実行による前記実行結果であるかを示すカウンタ値をさらに出力し、
前記履歴メモリは、前記カウンタ値を前記実行履歴としてさらに保持し、
前記履歴制御部は、前記カウンタ値を含む前記退避履歴を出力する
請求項8記載のデータ処理装置。
The execution unit further outputs a counter value indicating how many times the execution result is the execution result when outputting the execution result of the repeated reuse section,
The history memory further holds the counter value as the execution history,
The data processing apparatus according to claim 8, wherein the history control unit outputs the save history including the counter value.
実行結果が再び利用される再利用区間の区間識別情報と入力値と実行結果とを実行履歴として保持し、前記保持した実行結果が再び利用される場合には前記区間識別情報および前記入力値に基づいて前記実行履歴が検索される履歴メモリと、
前記再利用区間のうち実行が反復される反復再利用区間の各回の前記実行結果を退避履歴として前記履歴メモリから外部の記憶部に退避させ、前記退避の際に前記退避履歴の基となった前記実行履歴を前記履歴メモリから消去して前記退避履歴を指し示す情報を含む代表履歴を前記履歴メモリに保持させる履歴制御部と
を備える履歴保存装置。
The section identification information, the input value, and the execution result of the reuse section in which the execution result is reused are stored as an execution history. When the stored execution result is used again, the section identification information and the input value are stored. A history memory in which the execution history is retrieved based on;
The execution result of each repetitive reuse section in which the execution is repeated among the reuse sections is saved as a save history from the history memory to an external storage unit, and becomes the basis of the save history at the time of the save A history storage device comprising: a history control unit that erases the execution history from the history memory and holds a representative history including information indicating the save history in the history memory.
命令区間のうち実行結果が再び利用される再利用区間の区間識別情報と入力値と実行結果とを実行履歴として保持し、前記保持した実行結果が再び利用される場合には前記区間識別情報および前記入力値に基づいて前記実行履歴が検索される履歴メモリと、
前記再利用区間のうち実行が反復される反復再利用区間の各回の前記実行結果を前記履歴メモリから退避させるための退避履歴を保持する退避履歴保持部と
を備えるコンピュータにおけるデータ処理方法であって、
前記命令区間を実行して実行結果を出力する実行手順と、
前記反復再利用区間の前記実行履歴に基づいて前記退避履歴を前記退避履歴保持部に
供給し、前記退避履歴の供給の際に前記退避履歴の基となった前記実行履歴を前記履歴メモリから消去して前記退避履歴を指し示す情報を含む代表履歴を前記履歴メモリに保持させる履歴制御手順と
を備えるデータ処理方法。
The section identification information, the input value, and the execution result of the reuse section where the execution result is reused among the instruction sections are held as an execution history, and when the held execution result is used again, the section identification information and A history memory in which the execution history is searched based on the input value;
A data processing method in a computer, comprising: a save history holding unit for holding a save history for saving the execution result of each iteration of a repeat reuse section in which execution is repeated among the reuse sections, from the history memory. ,
An execution procedure for executing the instruction section and outputting an execution result;
The save history is supplied to the save history holding unit based on the execution history of the repeated reuse section, and the execution history that is the basis of the save history is deleted from the history memory when the save history is supplied. And a history control procedure for holding a representative history including information indicating the save history in the history memory.
命令区間のうち実行結果が再び利用される再利用区間の区間識別情報と入力値と実行結果とを実行履歴として保持し、前記保持した実行結果が再び利用される場合には前記区間識別情報および前記入力値に基づいて前記実行履歴が検索される履歴メモリと、
前記再利用区間のうち実行が反復される反復再利用区間の各回の前記実行結果を前記履歴メモリから退避させるための退避履歴を保持する退避履歴保持部と
を備えるコンピュータにおけるプログラムであって、
前記命令区間を実行して実行結果を出力する実行手順と、
前記反復再利用区間の前記実行履歴に基づいて前記退避履歴を前記退避履歴保持部に
供給し、前記退避履歴の供給の際に前記退避履歴の基となった前記実行履歴を前記履歴メモリから消去して前記退避履歴を指し示す情報を含む代表履歴を前記履歴メモリに保持させる履歴制御手順と
をコンピュータに実行させるプログラム。
The section identification information, the input value, and the execution result of the reuse section where the execution result is reused among the instruction sections are held as an execution history, and when the held execution result is used again, the section identification information and A history memory in which the execution history is searched based on the input value;
A program in a computer comprising a save history holding unit for holding a save history for saving the execution result of each iteration of a repeat reuse section in which execution is repeated among the reuse sections, from the history memory,
An execution procedure for executing the instruction section and outputting an execution result;
The save history is supplied to the save history holding unit based on the execution history of the repeated reuse section, and the execution history that is the basis of the save history is deleted from the history memory when the save history is supplied. A program for causing a computer to execute a history control procedure for holding a representative history including information indicating the save history in the history memory.
JP2009187625A 2009-08-13 2009-08-13 Data processor, history storing device, and data processing method and program Abandoned JP2011039859A (en)

Priority Applications (7)

Application Number Priority Date Filing Date Title
JP2009187625A JP2011039859A (en) 2009-08-13 2009-08-13 Data processor, history storing device, and data processing method and program
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
JP2009187625A JP2011039859A (en) 2009-08-13 2009-08-13 Data processor, history storing device, and data processing method and program

Publications (1)

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

Family

ID=43767551

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009187625A Abandoned JP2011039859A (en) 2009-08-13 2009-08-13 Data processor, history storing device, and data processing method and program

Country Status (1)

Country Link
JP (1) JP2011039859A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10789203B2 (en) 2016-05-23 2020-09-29 Nec Corporation Data processing apparatus, data processing method, and program recording medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10789203B2 (en) 2016-05-23 2020-09-29 Nec Corporation Data processing apparatus, data processing method, and program recording medium

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
US11308171B2 (en) Apparatus and method for searching linked lists
JP2000148472A (en) Microprocessor device and its software instruction speeding-up method, and recording medium recorded with its control program
CN111399912B (en) Instruction scheduling method, system and medium for multi-cycle instruction
CN102945679A (en) Video data processing method and video data read-write equipment
US8583900B2 (en) Register renaming table recovery method and system for use in a processor
JP2011039859A (en) Data processor, history storing device, and data processing method and program
JP4784912B2 (en) Information processing device
US8490098B2 (en) Concomitance scheduling commensal threads in a multi-threading computer system
US9342480B2 (en) Apparatus and method for generating VLIW, and processor and method for processing VLIW
TWI334541B (en) Prd (physical region descriptor) pre-fetch methods for dma (direct memory access) unit
JP2010020363A (en) Arithmetic processing unit
JP5632651B2 (en) Semiconductor circuit and design apparatus
JP2011039857A (en) Program conversion processing device, data processing device, program conversion processing method, and data processing method
CN112969092B (en) Video file playing system
JP2008282105A (en) Microprocessor and register saving method
WO2017168905A1 (en) Memory control device, storage device, and information processing system
JP5187944B2 (en) Apparatus and method for executing computer usable code
WO2019183849A1 (en) Data processing method and device
JP2011039858A (en) Data processing device, data processing method, program analysis processing device, and program analysis processing method
US20140281826A1 (en) Error correction method and memory device
KR101076655B1 (en) Synchronization Method for specific data of DBMS mounted in embedded terminal device
JP2011096153A (en) Compile processing device, data processing device, compile processing method, and program
JP4540556B2 (en) Data access method and program thereof
WO2022062005A1 (en) Gemm-based image data processing method, apparatus, and device, and medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Effective date: 20120723

Free format text: JAPANESE INTERMEDIATE CODE: A621

A762 Written abandonment of application

Effective date: 20130416

Free format text: JAPANESE INTERMEDIATE CODE: A762