JPH0522936B2 - - Google Patents
Info
- Publication number
- JPH0522936B2 JPH0522936B2 JP58190401A JP19040183A JPH0522936B2 JP H0522936 B2 JPH0522936 B2 JP H0522936B2 JP 58190401 A JP58190401 A JP 58190401A JP 19040183 A JP19040183 A JP 19040183A JP H0522936 B2 JPH0522936 B2 JP H0522936B2
- Authority
- JP
- Japan
- Prior art keywords
- register
- trace memory
- trace
- memory
- source program
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
- Devices For Executing Special Programs (AREA)
Description
〔産業上の利用分野〕
この発明は、アセンブラソースプログラム中の
冗長な命令を削除する最適化処理の中で、レジス
タに対する冗長なロード命令を削除するレジスタ
トレース方法に関するものである。
〔従来例の構成とその問題点〕
従来より、アセンブラソースプログラムに対す
る最適化の一方法としてレジスタトレースが行わ
れている。第1図A,Bはそれぞれレジスタトレ
ース手法を説明するためのアセンブラ言語のフロ
ーチヤートである。1,4,7,1′,4′,7′
はレジスタRに変数Aの内容を代入するロード命
令、2,5,2′,5′はレジスタRの内容を変更
しない分岐命令を含まない命令群、3,3′は条
件分岐命令である。このうち、ロード命令4,
7,4′,7′は冗長であり、削除が可能である。
なぜなら、分岐命令は一般にレジスタの内容を変
更しないため、ロード命令1,1′によるレジス
タRに代入された変数Aの内容は保存されている
からである。
従来のレジスタトレース手法では、ロード命令
4,4′は削除可能であるが、ロード命令7,
7′は冗長あることの認識が不可能であり、削除
不可能である。この理由は、CPU内のレジスタ
に現在格納されている内容を記憶するレジスタト
レースメモリを1組のみを用いているので、分岐
によりプログラムの流れが二分するとき、それぞ
れの経路についてレジスタトレースメモリを持つ
ことができないため、従来では2経路の一方のみ
についてレジスタトレースを行い、他方について
は無視していたためである。そのため、レジスタ
トレースを無視された経路についてはCPU内の
レジスタに現在格納されている内容が判明しない
ので、2経路の合流点以後は以前のレジスタトレ
ースをクリアし、新たにレジスタトレースを開始
しなければならなかつた。
〔発明の目的〕
この発明は、より多くの冗長なロード命令を認
識して削除することができるレジスタトレース方
法を提供することを目的とする。
〔発明の構成〕
この発明のレジスタトレース方法は、アセンブ
ラソースプログラムにおいてレジスタへのロード
命令のソースオペランドを各レジスタ毎に記憶す
る複数のレジスタトレースメモリと、この複数の
レジスタトレースメモリのうちの1個を選択する
レジスタトレースメモリ指定手段を用い、
アセンブラソースプログラムの単一経路では前
記レジスタトレースメモリ指定手段によつて選択
された第1のレジスタトレースメモリを用いてレ
ジスタトレースを行うことにより前記アセンブラ
ソースプログラム中のレジスタに対する冗長なロ
ード命令を削除して前記アセンブラソースプログ
ラムを出力し、前記アセンブラソースプログラム
の分岐点では前記レジスタトレースメモリ指定手
段によつて選択された第2のレジスタトレースメ
モリに前記第1のレジスタトレースメモリに記憶
されている前記ロード命令のソースオペランドを
写し、前記分岐点で分岐した第1および第2の分
岐経路では前記第1および第2のレジスタトレー
スメモリをそれぞれ用いてレジスタトレースを行
うことにより前記アセンブラソースプログラム中
のレジスタに対する冗長なロード命令を削除して
前記アセンブラソースプログラムを出力し、前記
第1および第2の分岐経路の合流点では前記第1
および第2のレジスタトレースメモリに記憶され
ている前記ロード命令のソースオペランドを比較
しロード命令のソースオペランドが異なるレジス
タが存在すれば前記第1のレジスタトレースメモ
リにおいて前記ロード命令のソースオペランドが
異なるレジスタに対するロード命令のソースオペ
ランドの記憶を削除し前記第2のレジスタトレー
スメモリは未使用状態にし、前記合流点から延び
る合流経路では前記第1のレジスタトレースメモ
リを用いてレジスタトレースを行うことにより前
記アセンブラソースプログラム中のレジスタに対
する冗長なロード命令を削除して前記アセンブラ
ソースプログラムを出力する方法である。
そして、このような方法によつて、分岐でプロ
グラムの経路が例えば2つに分かれるときにおい
ても、それぞれの経路でレジスタトレースを続行
し、2つの経路の合流点以後においても以前のレ
ジスタトレースの情報をむだなく利用することに
より、より多くの冗長なロード命令を認識し削除
する。
〔実施例の説明〕
この発明の一実施例を第2図ないし第4図に基
づいて説明する。第2図はレジスタトレース方法
実施するためのレジスタトレース装置の構成を示
すブロツク図であり、10は入力となる入力アセ
ンブラソースプログラム、11A〜11Nはアセ
ンブラソースプログラムにおいてレジスタへのロ
ード命令のソースオペランドを各レジスタ毎に記
憶する複数のレジスタトレースメモリ、12は複
数のレジスタトレースメモリ11A〜11Nの中
の1つを指定するレジスタトレースメモリ指定手
段、13はレジスタトレースメモリ指定手段12
を通してレジスタトレースメモリ11A〜11N
にアセンブラソースプログラムにおいてレジスタ
へのロード命令のソースオペランドを各レジスタ
毎に記憶させ、またその内容を用いて冗長なロー
ド命令を認識し削除するレジスタトレース部、1
4はレジスタトレース部13において冗長なロー
ド命令が取り除かれた出力アセンブラソースプロ
グラムである。
つぎに、第3図のフローチヤートによつてレジ
スタトレース部13の動作を詳しく説明する。同
図において、記号RT〔R〕はレジスタトレース
メモリ指定手段12で指定されるレジスタトレー
スメモリ中のレジスタRに対する内容を示す。
ステツプ30では、入力アセンブラソースプロ
グラム10から一つの命令を読み込む。
ステツプ39では、ステツプ30において読み
込んだ一つの命令がストア命令であるかどうかを
判定する。この判定を行うのは、命令がストア命
令であるときにメモリの内容が変更され、同じソ
ースオペランドの内容をもつレジスタRも内容が
変更されたのと等価になるためである。
ステツプ31では、ステツプ39の判定結果が
NOである場合において、ステツプ30で読み込
んだ命令がステツプRの内容を変更する命令であ
るかどうかを判定する。
ステツプ32では、ステツプ31の判定結果が
YESである場合において、内容が変更されるレ
ジスタ名をレジスタRに記憶する。
ステツプ33では、ステツプ30で読み込んだ
命令がレジスタRへのロード命令かどうかを判定
する。
ステツプ34では、ステツプ33の判定結果が
YESの場合において、レジスタRへロードされ
るソースオペランドをメモリMEMに記憶する。
ロード命令のソースオペランドは、レジスタRに
格納されるデータが保持されているメモリ領域へ
のアドレスである。データは実行時に変化する
が、アドレスについては静的に定まる。レジスタ
の内容をこのアドレスで管理することにより、レ
ジスタの内容の一致/不一致を静的な検査で判定
することができる。
ステツプ35では、メモリMEMの内容とRT
〔R〕とが一致するかどうかを判定する。RT
〔R〕は以前にレジスタRにロードされたソース
オペランドを記憶しているので、メモリMEMの
内容がRT〔R〕と一致したとき(YES)は、同
じソースオペランドの内容をロードすることにな
るので、ステツプ30で読み込んだロード命令は
冗長である。この冗長なロード命令は出力しな
い。
ステツプ36では、ステツプ35の判定結果が
NOの場合において、RT〔R〕をメモリMEMの
内容とする。これは、メモリMEMの内容とRT
〔R〕とが一致しないときは、新たな内容がレジ
スタRにロードされるためである。
ステツプ40では、ステツプ39の判定結果が
YESの場合において、レジスタトレースメモリ
中でストア命令のソースオペランドをもつ(ソー
スオペランド=RT〔R〕となる)レジスタRを
探す。
ステツプ37では、ステツプ40において上記
のレジスタRがあれば、対応するレジスタトレー
スメモリの内容RT〔R〕を0にする。また、ス
テツプ33の判定結果がNOの場合も同様である
(ロード命令以外のレジスタ変更命令のときは、
RT〔R〕を0とし、レジスタRは何も記憶して
いない状態とする)。
ステツプ38では、ステツプ31の判定結果が
NOの場合またはステツプ37が実行された場合
またはステツプ36が実行された場合、すなわち
読み込んだ命令が冗長でないと判定された場合に
おいて、読み込んだ命令をそのまま出力する。
以上のステツプ30〜40を入力アセンブラソ
ースプログラムのすべての命令について繰り返す
ことにより冗長なロード命令を削除することがで
きる。
第4図は分岐を含むプログラムのフローを示
し、図において、20を単一経路、21を単一経
路20の分岐点、22および23をそれぞれ分岐
点21から分岐する分岐経路、24を分岐経路2
2,23の合流点、25を合流点から延びる合流
経路と称すすることにする。この図をアセンブラ
ソースプログラムと対応させると、分岐点21に
条件分岐命令があり、合流点24に分岐点21に
存在する条件分岐命令の飛び先ラベルがある。
この第4図により、分岐を含むプログラムにお
けるレジスタトレース部13の処理内容について
説明する。
(a) 単一経路20
複数のレジスタトレースメモリ11A〜11
Nの中の1個、例えば11Aを用いて、従来通
りのレジスタトレースを行う。
(b) 分岐点21
(ア) 経路20で使用していたレジスタトレース
メモリ11A以外のレジスタトレースメモ
リ、例えば11Bをレジスタトレースメモリ
指定手段12により選択する。
(イ) 経路20で使用していたレジスタトレース
メモリ11Aの内容を上記レジスタトレース
11Bにコピーする。
(ウ) 分岐経路22上では経路20で使用されて
いたレジスタトレースメモリ11Aを、そし
て分岐経路23上では(ア)、(イ)で得られたレジ
スタトレースメモリ11Bを、それぞれ用い
て従来のレジスタトレースを行う。
(c) 合流点24
(ア) 分岐経路23で使用されていたレジスタト
レースメモリ11Bと分岐経路22で使用さ
れていたレジスタトレースメモリ11Aの各
レジスタ毎の内容を比較する。
(イ) 同一内容を持つレジスタが存在すれば、そ
のレジスタの内容は合流点24以後のレジス
タトレースに利用可能であるので、レジスタ
トレースメモリ11Aのこのレジスタに対応
する内容はそのまま保存する。
(ウ) 内容が異なるレジスタが存在すれば、その
レジスタは分岐点21以後の2つの分岐経路
22,23内で異なる内容をもつことを表
し、合流点24以後のレジスタトレースに使
用することはできないので、レジスタトレー
スメモリ11Aのこのレジスタに対応する内
容をクリアし、レジスタには何もデータが保
存されていないことを示すようにする。そし
て、レジスタトレースメモリ11Bは未使用
状態にする。
(d) 合流経路25
(c)で得られたレジスタトレースメモリ11A
を用いて従来のレジスタトレースメモリを行
う。
このように、複数のレジスタトレースメモリ1
1A〜11Nを用いて、上記の処理を行うことに
より、従来のレジスタトレースでは行うことがで
きなかつた分岐を含むプログラムのすべての経路
についてレジスタトレースを続行することができ
る。これにより、より多くの冗長なロード命令の
認識・削除が可能となり、プログラムの大きさを
より減少させることができる。
なお、分岐経路22,23の中に分岐を含んで
いても、その分岐点でさらに新しいレジスタトレ
ースメモリを用いることにより同様の方法でレジ
スタトレースを行うことができる。
〔発明の効果〕
この発明のレジスタトレース方法によれば、よ
り多くの冗長なロード命令を認識して削除するこ
とができ、プログラムを小さくすることができ
る。
また、複数のレジスタトレースメモリでアセン
ブラソースプログラムにおいてレジスタへのロー
ド命令のソースオペランドを各レジスタ毎に記憶
する構成となつているので、レジスタトレースに
おいて、より詳細な管理を行うことができる。
また、レジスタ使用の情報をマシンがもつレジ
スタに関してのみ有する構成であるため、レジス
タ使用情報は、コンパイルするソースプログラム
の量に関係なく一定であり、かつ少量で済み、コ
ンパイラのサイズを少なくできる。
また、プログラムの全経路をトレース、つまり
分岐時および合流時を考慮してトレースする構成
であるため、最適化の効果が高いものである。
また、プログラムの全経路について検査を、レ
ジスタトレースメモリにレジスタへのロード命令
のソースオペランドを各レジスタ毎に記憶しそれ
を比較するという構成のみで行うことができ、コ
ンパイラの構成が簡単になるとともにコンパイル
時間も短縮される。
[Industrial Application Field] The present invention relates to a register tracing method for eliminating redundant load instructions for registers during optimization processing for eliminating redundant instructions in an assembler source program. [Constitution of Conventional Example and its Problems] Conventionally, register tracing has been performed as a method of optimizing an assembler source program. FIGS. 1A and 1B are flowcharts in assembler language for explaining the register tracing method, respectively. 1, 4, 7, 1', 4', 7'
is a load instruction that assigns the contents of variable A to register R, 2, 5, 2', and 5' are a group of instructions that do not include branch instructions that do not change the contents of register R, and 3 and 3' are conditional branch instructions. Among these, load command 4,
7, 4', and 7' are redundant and can be deleted.
This is because branch instructions generally do not change the contents of registers, so the contents of variable A assigned to register R by load instructions 1 and 1' are preserved. In the conventional register tracing method, load instructions 4 and 4' can be deleted, but load instructions 7 and 4' can be deleted.
7' cannot be recognized as being redundant and cannot be deleted. The reason for this is that only one set of register trace memory is used to store the contents currently stored in the registers in the CPU, so when the program flow is divided into two by a branch, there is a register trace memory for each path. This is because conventionally, register tracing was performed for only one of the two paths and the other path was ignored. Therefore, the contents currently stored in the registers in the CPU for the route whose register trace was ignored cannot be determined, so after the confluence of the two routes, the previous register trace must be cleared and a new register trace must be started. It was impossible. [Object of the Invention] An object of the present invention is to provide a register tracing method that can recognize and delete more redundant load instructions. [Structure of the Invention] The register tracing method of the present invention includes a plurality of register trace memories that store source operands of load instructions to registers for each register in an assembler source program, and one register trace memory of the plurality of register trace memories. A register trace memory specifying means is used to select a register trace memory specifying means, and in a single pass of the assembler source program, register tracing is performed using the first register trace memory selected by the register trace memory specifying means. The assembler source program is output by deleting redundant load instructions for the registers in the assembler source program, and at a branch point of the assembler source program, the first register trace memory is transferred to the second register trace memory selected by the register trace memory specifying means. The source operand of the load instruction stored in the register trace memory is copied, and the first and second branch paths branched at the branch point perform register trace using the first and second register trace memories, respectively. By doing this, redundant load instructions for registers in the assembler source program are deleted and the assembler source program is output, and at the confluence of the first and second branch paths, the first
and compares the source operands of the load instruction stored in the second register trace memory, and if there is a register in which the source operand of the load instruction differs, the source operand of the load instruction differs in the register in the first register trace memory. The memory of the source operand of the load instruction is deleted, the second register trace memory becomes unused, and the first register trace memory is used to perform register tracing on the confluence route extending from the confluence point. This is a method of outputting the assembler source program by deleting redundant load instructions for registers in the source program. By using this method, even when the program path is split into two due to a branch, for example, register tracing can be continued on each path, and even after the confluence of the two paths, information on the previous register trace can be retained. Recognize and remove more redundant load instructions by making more efficient use of . [Description of Embodiment] An embodiment of the present invention will be described based on FIGS. 2 to 4. FIG. 2 is a block diagram showing the configuration of a register tracing device for carrying out the register tracing method, in which numeral 10 is an input assembler source program, and numerals 11A to 11N are source operands of load instructions to registers in the assembler source program. A plurality of register trace memories are stored for each register, 12 is a register trace memory specifying means for specifying one of the plurality of register trace memories 11A to 11N, and 13 is a register trace memory specifying means 12
through register trace memories 11A to 11N
A register trace unit stores source operands of load instructions to registers for each register in an assembler source program, and uses the contents to recognize and delete redundant load instructions.
4 is an output assembler source program from which redundant load instructions have been removed in the register trace section 13. Next, the operation of the register trace section 13 will be explained in detail with reference to the flowchart shown in FIG. In the figure, the symbol RT[R] indicates the contents of register R in the register trace memory specified by the register trace memory specifying means 12. In step 30, one instruction is read from the input assembler source program 10. In step 39, it is determined whether the one instruction read in step 30 is a store instruction. This determination is made because when the instruction is a store instruction, the contents of the memory are changed, and the contents of the register R having the same source operand contents are also changed. In step 31, the determination result of step 39 is
If the answer is NO, it is determined whether the instruction read in step 30 is an instruction that changes the contents of step R. In step 32, the determination result of step 31 is
If YES, the register name whose contents are to be changed is stored in register R. In step 33, it is determined whether the instruction read in step 30 is a load instruction to register R. In step 34, the determination result of step 33 is
In case of YES, the source operand loaded into register R is stored in memory MEM.
The source operand of the load instruction is the address to the memory area where the data stored in register R is held. Although the data changes during execution, the address is statically determined. By managing the contents of the registers using this address, it is possible to determine whether the contents of the registers match/mismatch by static inspection. In step 35, the contents of the memory MEM and RT
It is determined whether or not [R] matches. RT
[R] remembers the source operand previously loaded into register R, so when the contents of memory MEM match RT[R] (YES), the contents of the same source operand will be loaded. Therefore, the load instruction read in step 30 is redundant. This redundant load instruction is not output. In step 36, the determination result of step 35 is
In the case of NO, let RT[R] be the contents of the memory MEM. This shows the contents of memory MEM and RT
This is because if [R] does not match, new contents are loaded into register R. In step 40, the determination result of step 39 is
In the case of YES, a register R having the source operand of the store instruction (source operand=RT[R]) is searched in the register trace memory. In step 37, if the above register R exists in step 40, the content RT[R] of the corresponding register trace memory is set to 0. The same applies if the judgment result in step 33 is NO (for register change instructions other than load instructions,
RT[R] is set to 0, and register R stores nothing.) In step 38, the determination result of step 31 is
If NO, or if step 37 or step 36 is executed, that is, if it is determined that the read instruction is not redundant, the read instruction is output as is. Redundant load instructions can be deleted by repeating steps 30 to 40 for all instructions in the input assembler source program. FIG. 4 shows a flow of a program including branches, and in the figure, 20 is a single route, 21 is a branch point of the single route 20, 22 and 23 are branch routes branching from the branch point 21, and 24 is a branch route. 2
The confluence point 2 and 23 and 25 will be referred to as a confluence route extending from the confluence point. When this diagram is made to correspond to an assembler source program, there is a conditional branch instruction at the branch point 21, and a jump destination label of the conditional branch instruction existing at the branch point 21 is at the confluence point 24. With reference to FIG. 4, the processing contents of the register trace unit 13 in a program including a branch will be explained. (a) Single path 20 Multiple register trace memories 11A to 11
One of N, for example 11A, is used to perform the conventional register trace. (b) Branch point 21 (a) A register trace memory other than the register trace memory 11A used in the path 20, for example 11B, is selected by the register trace memory specifying means 12. (a) Copy the contents of the register trace memory 11A used in the path 20 to the register trace 11B. (c) On the branch route 22, the register trace memory 11A used on the route 20 is used, and on the branch route 23, the register trace memory 11B obtained in (a) and (b) is used to create the conventional register. Perform a trace. (c) Junction point 24 (a) Compare the contents of each register in the register trace memory 11B used in the branch route 23 and the register trace memory 11A used in the branch route 22. (a) If a register with the same contents exists, the contents of that register can be used for register tracing after the confluence point 24, so the contents corresponding to this register in the register trace memory 11A are saved as they are. (c) If there is a register with different contents, it means that the register has different contents in the two branch paths 22 and 23 after the branch point 21, and cannot be used for register tracing after the confluence point 24. Therefore, the contents of the register trace memory 11A corresponding to this register are cleared to indicate that no data is stored in the register. Then, the register trace memory 11B is made unused. (d) Merging route 25 Register trace memory 11A obtained in (c)
Perform traditional register trace memory using . In this way, multiple register trace memories 1
By performing the above processing using 1A to 11N, register tracing can be continued for all paths of the program including branches, which could not be performed with conventional register tracing. This makes it possible to recognize and delete more redundant load instructions, thereby further reducing the size of the program. Note that even if the branch paths 22 and 23 include a branch, register tracing can be performed in the same manner by using a newer register trace memory at the branch point. [Effects of the Invention] According to the register tracing method of the present invention, more redundant load instructions can be recognized and deleted, and the program can be made smaller. Further, since the configuration is such that the source operand of a load instruction to a register in an assembler source program is stored for each register using a plurality of register trace memories, more detailed management can be performed in register trace. Further, since the configuration has register usage information only regarding the registers that the machine has, the register usage information is constant regardless of the amount of source programs to be compiled, and only a small amount is required, so that the size of the compiler can be reduced. Furthermore, since the configuration is such that the entire program path is traced, that is, the trace is performed taking branching and merging into account, the optimization effect is high. In addition, the entire path of the program can be inspected simply by storing the source operands of register load instructions for each register in the register trace memory and comparing them, which simplifies the compiler configuration. Compilation time is also reduced.
第1図A,Bは従来のそれぞれのレジスタトレ
ースを説明するためのアセンブラ言語のフローチ
ヤート、第2図はこの発明の一実施例のブロツク
図、第3図はレジスタトレース部の動作を示すフ
ローチヤート、第4図は分岐があるプログラムの
フローの説明図である。
10…入力アセンブラソースプログラム、11
A〜11N…レジスタトレースメモリ、12…レ
ジスタトレースメモリ指定手段、13…レジスタ
トレース部、14…出力アセンブラソースプログ
ラム。
1A and 1B are assembler language flowcharts for explaining each conventional register trace, FIG. 2 is a block diagram of an embodiment of the present invention, and FIG. 3 is a flowchart showing the operation of the register trace section. Chart FIG. 4 is an explanatory diagram of the flow of a program with branches. 10... Input assembler source program, 11
A to 11N...Register trace memory, 12...Register trace memory specifying means, 13...Register trace unit, 14...Output assembler source program.
Claims (1)
タへのロード命令のソースオペランドを各レジス
タ毎に記憶する複数のレジスタトレースメモリ
と、この複数のレジスタトレースメモリのうちの
1個を選択するレジスタトレースメモリ指定手段
を用い、 アセンブラソースプログラムの単一経路では前
記レジスタトレースメモリ指定手段によつて選択
された第1のレジスタトレースメモリを用いてレ
ジスタトレースを行うことにより前記アセンブラ
ソースプログラム中のレジスタに対する冗長なロ
ード命令を削除して前記アセンブラソースプログ
ラムを出力し、前記アセンブラソースプログラム
の分岐点では前記レジスタトレースメモリ指定手
段によつて選択された第2のレジスタトレースメ
モリに前記第1のレジスタトレースメモリに記憶
されている前記ロード命令のソースオペランドを
写し、前記分岐点で分岐した第1および第2の分
岐経路では前記第1および第2のレジスタトレー
スメモリをそれぞれ用いてレジスタトレースを行
うことにより前記アセンブラソースプログラム中
のレジスタに対する冗長なロード命令を削除して
前記アセンブラソースプログラムを出力し、前記
第1および第2の分岐経路の合流点では前記第1
および第2のレジスタトレースメモリに記憶され
ている前記ロード命令のソースオペランドを比較
しロード命令のソースオペランドが異なるレジス
タが存在すれば前記第1のレジスタトレースメモ
リにおいて前記ロード命令のソースオペランドが
異なるレジスタに対するロード命令のソースオペ
ランドの記憶を削除し前記第2のレジスタトレー
スメモリは未使用状態にし、前記合流点から延び
る合流経路では前記第1のレジスタトレースメモ
リを用いてレジスタトレースを行うことにより前
記アセンブラソースプログラム中のレジスタに対
する冗長なロード命令を削除して前記アセンブラ
ソースプログラムを出力するレジスタトレース方
法。[Scope of Claims] 1. A plurality of register trace memories that store source operands of load instructions to registers for each register in an assembler source program, and a register trace memory that selects one of the plurality of register trace memories. By using a specifying means, in a single pass of the assembler source program, register tracing is performed using the first register trace memory selected by the register trace memory specifying means, so that redundant registers for registers in the assembler source program can be traced. The load instruction is deleted and the assembler source program is output, and at a branch point of the assembler source program, the second register trace memory selected by the register trace memory specifying means is stored in the first register trace memory. The assembler source is copied by copying the source operand of the load instruction that has been executed, and performing register tracing using the first and second register trace memories, respectively, in the first and second branch paths branched at the branch point. The assembler source program is output by deleting redundant load instructions for registers in the program, and at the confluence of the first and second branch paths, the first
and compares the source operands of the load instruction stored in the second register trace memory, and if there is a register in which the source operand of the load instruction differs, a register in which the source operand of the load instruction differs in the first register trace memory. The memory of the source operand of the load instruction for is deleted, the second register trace memory is left unused, and the first register trace memory is used to perform register tracing on the confluence path extending from the confluence point. A register tracing method that deletes redundant load instructions for registers in a source program and outputs the assembler source program.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP58190401A JPS6081641A (en) | 1983-10-11 | 1983-10-11 | Tracing device of register |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP58190401A JPS6081641A (en) | 1983-10-11 | 1983-10-11 | Tracing device of register |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS6081641A JPS6081641A (en) | 1985-05-09 |
| JPH0522936B2 true JPH0522936B2 (en) | 1993-03-31 |
Family
ID=16257531
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP58190401A Granted JPS6081641A (en) | 1983-10-11 | 1983-10-11 | Tracing device of register |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS6081641A (en) |
Families Citing this family (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0820973B2 (en) * | 1987-06-20 | 1996-03-04 | 富士通テン株式会社 | Program content analyzer |
| JPH0820968B2 (en) * | 1987-06-20 | 1996-03-04 | 富士通テン株式会社 | Program content analyzer |
| JPH0820969B2 (en) * | 1987-06-20 | 1996-03-04 | 富士通テン株式会社 | Program content analyzer |
| JPS63317846A (en) * | 1987-06-20 | 1988-12-26 | Fujitsu Ten Ltd | Analyzing device for program contents |
| JPS63317845A (en) * | 1987-06-20 | 1988-12-26 | Fujitsu Ten Ltd | Analyzing device for program contents |
| JPH0820972B2 (en) * | 1987-06-20 | 1996-03-04 | 富士通テン株式会社 | Program content analyzer |
| JPH0820971B2 (en) * | 1987-06-20 | 1996-03-04 | 富士通テン株式会社 | Program content analyzer |
| JPS63317848A (en) * | 1987-06-20 | 1988-12-26 | Fujitsu Ten Ltd | Analyzing device for program contents |
| JPS63317851A (en) * | 1987-06-20 | 1988-12-26 | Fujitsu Ten Ltd | Analyzing device for program contents |
| JPH0820970B2 (en) * | 1987-06-20 | 1996-03-04 | 富士通テン株式会社 | Program content analyzer |
| JP2548197B2 (en) * | 1987-06-20 | 1996-10-30 | 富士通テン株式会社 | Program content analyzer |
| IL95996A0 (en) * | 1990-10-15 | 1991-07-18 | Ibm Israel | Global instruction scheduler for a computer |
| IL95995A0 (en) * | 1990-10-15 | 1991-07-18 | Ibm Israel | Instruction scheduler for a computer |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS5561861A (en) * | 1978-10-31 | 1980-05-09 | Sanyo Electric Co Ltd | Information processor |
| JPS58161045A (en) * | 1982-03-19 | 1983-09-24 | Fujitsu Ltd | Register management system of compiler |
-
1983
- 1983-10-11 JP JP58190401A patent/JPS6081641A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6081641A (en) | 1985-05-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CA1159151A (en) | Cellular network processors | |
| CN101276290B (en) | Method for detecting parameter access and task management system | |
| EP3343351B1 (en) | Parallel program generating method and parallelization compiling apparatus | |
| JPH0522936B2 (en) | ||
| KR910010301A (en) | Command designation method and execution device | |
| JPH06250837A (en) | Scheduling processing method | |
| US11068463B2 (en) | System and method for managing log data | |
| US10725838B2 (en) | Application startup control | |
| JPH096628A (en) | Parallel processing procedure selection device and method | |
| Bowie | Applications of graph theory in computer systems | |
| US5812845A (en) | Method for generating an object code for a pipeline computer process to reduce swapping instruction set | |
| US11327758B2 (en) | Non-transitory computer-readable recording medium, assembly instruction conversion method and information processing apparatus | |
| JP6600888B2 (en) | Parallelizing compiler, parallelizing compiling device, and parallel program generation method | |
| JP2729795B2 (en) | Parallel computer and control method thereof | |
| JP3705367B2 (en) | Instruction processing method | |
| JPH01267731A (en) | System for preparing segment overlay program | |
| US7627859B2 (en) | Method for configuring non-script language library files to be run as scripts | |
| JPH0619713B2 (en) | Logic type data processor | |
| JPH01207824A (en) | Module coupling control system | |
| JPS64725B2 (en) | ||
| JPS63133231A (en) | Computer system | |
| JPH09106346A (en) | Parallel computer | |
| JPS583042A (en) | Program execution system | |
| JPH0417031A (en) | System for optimizing propagation of constant value | |
| JPH0553827A (en) | Dynamic link optimizing system |