KR0179179B1 - Method for selecting optimal order for atm processor - Google Patents

Method for selecting optimal order for atm processor Download PDF

Info

Publication number
KR0179179B1
KR0179179B1 KR1019950055871A KR19950055871A KR0179179B1 KR 0179179 B1 KR0179179 B1 KR 0179179B1 KR 1019950055871 A KR1019950055871 A KR 1019950055871A KR 19950055871 A KR19950055871 A KR 19950055871A KR 0179179 B1 KR0179179 B1 KR 0179179B1
Authority
KR
South Korea
Prior art keywords
instruction sequence
pattern
optimization
optimal
selecting
Prior art date
Application number
KR1019950055871A
Other languages
Korean (ko)
Other versions
KR970056415A (en
Inventor
김명호
이동길
최완
Original Assignee
양승택
한국전자통신연구원
이준
한국전기통신공사
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 양승택, 한국전자통신연구원, 이준, 한국전기통신공사 filed Critical 양승택
Priority to KR1019950055871A priority Critical patent/KR0179179B1/en
Publication of KR970056415A publication Critical patent/KR970056415A/en
Application granted granted Critical
Publication of KR0179179B1 publication Critical patent/KR0179179B1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]

Abstract

본 발명은 비동기전달모드(ATM: Asynchronous Transfer Mode) 프로세서를 위한 최적화 컴파일러의 후단부에서 최적 명령 수순을 선택할 수 있도록 하는 최적 명령 수순 선택 방법에 관한 것으로, ATM 수퍼스칼라 프로세서를 위한 칠(CHILL) 컴파일러를 개발 할 때 조건부 분기를 위한 최적 코드를 생성할 수 있도록 하는 최적 명령 수순 선택 방법을 제공하기 위하여, 조건부 분기를 동일한 기능의 산술식으로 변환할 수 있는 최적화 패턴을 선정하고 수퍼 최적화를 사용하여 정적 계수가 최소인 명령 수순을 검색한 후에 최소의 동적 계수를 가진 명령 수순을 선택하는 제1단계; 선택된 최적 명령 수순을 머신 설명 테이블 형식에 적합한 형태로 변환하여 확장된 머신 설명 테이블에 결합하여 실행 가능한 컴파일러 후단부를 구성한 후에 실험하여 명령 수순들 간의 간섭이 발생하였는지를 판단하는 제2단계; 및 상기 제2단계의 판단 결과, 간섭이 발생하였으며 상기 제2단계부터 반복 수행하고, 간섭이 발생하지 않았으면 최적 명령 수순을 머신 설명 테이블에 저장하는 제3단계를 포함하여 컴파일러가 생성한 코드의 효율성을 높일 수 있는 효과가 있다.The present invention relates to a method of selecting an optimal instruction sequence for selecting an optimal instruction sequence at the rear end of an optimized compiler for an Asynchronous Transfer Mode (ATM) processor. In order to provide an optimal instruction sequence selection method that can generate optimal code for conditional branching when developing, select an optimization pattern that can convert conditional branching to arithmetic function of the same function, and use super optimization to Selecting a command sequence having a minimum dynamic coefficient after retrieving the command sequence having the smallest coefficient; Converting the selected optimal instruction sequence into a form suitable for the machine description table format, combining the extended optimal machine description table to form an executable compiler rear end, and experimenting to determine whether interference between the instruction sequences has occurred; And a third step of repeating the second step from the second step as a result of the determination of the second step, and if the interference does not occur, storing the optimal instruction sequence in the machine description table. There is an effect that can increase the efficiency.

Description

비동기전달모드 프로세서를 위한 최적 명령 수순 선택 방법How to Select Optimal Instruction Sequence for Asynchronous Processors

제1도는 본 발명이 적용되는 하드웨어의 구성도.1 is a block diagram of hardware to which the present invention is applied.

제2도는 본 발명에 따른 일 실시예 전체 흐름도.2 is a flow diagram of one embodiment according to the present invention.

제3도는 본 발명에 따른 최적화 패턴 선정 과정의 상세 흐름도.3 is a detailed flowchart of an optimization pattern selection process according to the present invention.

제4도는 본 발명에 따른 수퍼 최적화를 사용한 명령 수순 선택 과정의 흐름도.4 is a flowchart of an instruction sequence selection process using super optimization according to the present invention.

제5도는 본 발명에 따른 최소 동적 계수를 가진 명령 수순 선택 과정의 상세 흐름도.5 is a detailed flowchart of a procedure of selecting a procedure having a minimum dynamic coefficient according to the present invention.

제6도는 본 발명에 따른 컴파일러 머신 설명 테이블에 반영하기 위한 과정의 상세 흐름도.6 is a detailed flowchart of a process for reflecting in a compiler machine description table according to the present invention.

* 도면의 주요부분에 대한 부호의 설명* Explanation of symbols for main parts of the drawings

101 : 메인 메모리 보드 102 : 중앙 처리 보드101: main memory board 102: central processing board

103 : 범용 운영 체계 104 : 보조 기억 장치103: general purpose operating system 104: auxiliary storage device

105 : 입/출력 장치 106 : 시스템 버스105: input / output device 106: system bus

본 발명은 비동기전달모드(ATM: Asynchronous Transfer Mode) 프로세서를 위한 최적화 컴파일러의 후단부에서 최적 명령 수순을 선택 할 수 있도록 하는 최적 명령 수순 선택 방법에 관한 것이다.The present invention relates to a method for selecting an optimal instruction sequence to enable the selection of an optimal instruction sequence at the rear end of an optimized compiler for an Asynchronous Transfer Mode (ATM) processor.

ATM 프로세서는 한 클럭 사이클에 여러 개의 명령을 동시에 실행 할 수 있는 수퍼 스칼라 프로세서이다. ATM 프로세서는 이론적으로 최대 3개의 명령을 동시에 실행할 수 있지만, 명령 수순의 조합에 따라서 동시 실행이 불가능한 경우가 자주 발생하므로, 실제로는 한 클럭 당 1.5개의 명령이 평균적으로 수행된다. 그러므로, ATM 프로세서를 위한 최적화는 나열된 코드 수순의 길이(정적계수) 보다는 주어진 코드 수순을 수행하는데 필요한 클럭 사이클의 수(동적계수)를 감소시키는 작업에 주력해야 한다.ATM processors are superscalar processors that can execute multiple instructions simultaneously in one clock cycle. The ATM processor can theoretically execute up to three instructions at the same time, but it is often impossible to execute them simultaneously depending on the combination of instruction sequences, so in practice, 1.5 instructions per clock are averaged. Therefore, optimization for ATM processors should focus on reducing the number of clock cycles (dynamic coefficients) required to perform a given code sequence rather than the length of the code sequence listed (static coefficients).

수퍼 칼라 프로세서에서 비교 판단의 결과에 따라 특정한 작업의 수행여부를 결정하는 조건부 분기 명령은, 명령 수순의 동시 실행 가능성을 저해하여 실행시간을 두 사이클 정도 증가시키는 부담을 발생시킨다. 그러므로, ATM 프로세서를 위한 컴파일러는, 조건부 분기에 의한 성능 저하가 가능한 발생하지 않도록 목적 코드를 생성하는 최적화 기능이 필수적으로 요구된다.The conditional branch instruction, which determines whether a particular task is performed according to the result of the comparison decision in the super color processor, creates a burden of increasing the execution time by two cycles by inhibiting the possibility of concurrent execution of the instruction sequence. Therefore, a compiler for an ATM processor essentially requires an optimization function for generating object code such that performance degradation due to conditional branching does not occur as much as possible.

따라서, 본 발명은 ATM 수퍼 스칼라 프로세서를 위한 칠(CHILL) 컴파일러를 개발할 때 조건부 분기를 위한 최적 코드를 생성할 수 있도록 하는 최적 명령 수순 선택 방법을 제공하는데 그 목적이 있다.Accordingly, an object of the present invention is to provide an optimal instruction sequence selection method for generating an optimal code for conditional branching when developing a CHILL compiler for an ATM superscalar processor.

상기 목적을 달성하기 위하여 본 발명은, 비동기전달모드(ATM) 프로세서를 구비한 장치에 적용되는 최적 명령 수순 방법에 있어서, 조건부 분기를 동일한 기능의 산술식으로 변환할 수 있는 최적화 패턴을 선정하고 수퍼 최적화를 사용하여 정적 계수가 최소인 명령 수순을 검색한 후에 최소의 동적 계수를 가진 명령 수순을 선택하는 제1단계; 선택된 최적 명령 수순을 머신 설명 테이블 형식에 적합한 형태로 변환하여 확장된 머신 설명 테이블에 결합하여 실행 가능한 컴파일러 후단부를 구성한 후에 실험하여 명령 수순들 간의 간섭이 발생하였는지를 판단하는 제2단계; 및 상기 제2단계의 판단 결과, 간섭이 발생하였으면 상기 제2단계부터 반복 수행하고, 간섭이 발생하지 않았으면 최적 명령 수순을 상기 머신 설명 테이블에 저장하는 제3단계를 포함하여 이루어진 것을 특징으로 한다.In order to achieve the above object, the present invention, in the optimal instruction procedure method applied to an apparatus having an asynchronous transfer mode (ATM) processor, selects and optimizes the optimization pattern that can convert the conditional branch into arithmetic expression of the same function A first step of selecting an instruction sequence having a minimum dynamic coefficient after retrieving an instruction sequence having a minimum static coefficient using optimization; Converting the selected optimal instruction sequence into a form suitable for the machine description table format, combining the extended optimal machine description table to form an executable compiler rear end, and experimenting to determine whether interference between the instruction sequences has occurred; And a third step of repeating from the second step if the interference has occurred as a result of the determination of the second step, and storing the optimum instruction sequence in the machine description table if the interference has not occurred. .

이하, 첨부된 도면을 참조하여 본 발명에 따른 일 실시예를 상세히 설명한다.Hereinafter, with reference to the accompanying drawings will be described an embodiment according to the present invention;

제1도는 본 발명이 적용되는 하드웨어의 구성도로서, 101은 시스템의 메모리 보드, 102는 중앙 처리 보드, 103은 범용 운영 체계, 104는 보조 기억 장치, 105는 입/출력 장치, 106은 시스템 버스를 각각 나타낸다.1 is a configuration diagram of hardware to which the present invention is applied, 101 is a memory board of a system, 102 is a central processing board, 103 is a general-purpose operating system, 104 is an auxiliary memory device, 105 is an input / output device, 106 is a system bus Respectively.

도면에 표기한 각 블록들의 기능을 살펴보면, 시스템의 메인 메모리ㆍ보드(101)는 ATM 프로세서를 위하여 최적 코드를 생성할 수 있는 후단부를 가진 최적화 컴파일러가 탑재되는 보드이고, 중앙 처리보드(102)는 상기 메인 메모리보드(101)에 탑재된 프로그램을 실행시키는 ATM 프로세서를 장착한 보드이다.Looking at the function of each block shown in the figure, the main memory board 101 of the system is a board on which an optimization compiler having a rear end capable of generating an optimal code for an ATM processor is mounted, and the central processing board 102 is The board is equipped with an ATM processor for executing a program mounted on the main memory board 101.

그리고, 보조 기억 장치(104)는 컴파일러와 컴파일 과정에서 임시 데이터를 저장하기 위한 중간 파일들을 저장하는 장치로, 휘발성의 메인 메모리 보드(101)에 기억할 수 없는 데이터들이 저장된다.The auxiliary memory 104 is a device for storing intermediate files for storing temporary data during the compilation process and the compiler, and stores data that cannot be stored in the volatile main memory board 101.

입/출력 장치(105)는 컴파일 과정에서 사용되거나 생성되는 모든 데이터와 오류 메시지를 입/출력하기 위한 장치이다. 범용 운용 체계(103)는 상기 각 보드와 장치들을 제어하며, 상기 각 보드 및 장치간에 주고받는 메시지들은 시스템 버스(106)를 통하여 전송이 이루어진다.The input / output device 105 is a device for inputting / outputting all data and error messages used or generated in the compilation process. The universal operating system 103 controls the boards and devices, and messages transmitted and received between the boards and the devices are transmitted through the system bus 106.

제2도는 본 발명에 따른 일 실시예 전체 흐름도 이다.2 is an overall flowchart of an embodiment according to the present invention.

먼저, ATM 프로세서를 위한 칠(CHILL) 컴파일러가 최적 명령 수순을 생성할 수 있도록 하기 위하여, 조건부 분기를 대수적 규칙들을 사용하여 동일한 기능의 산술식으로 변환할 수 있는 경우를 위한 최적화 패턴을 선정하고(201) ATM 프로세서에서 조건부 분기에 최적화 패턴에 대응하는 산술식을 위한 최소 정적 계수를 가진 모든 명령 수순을 컴파일러 자동화 도구의 하나인 수퍼 최적화기를 사용하여 검색하며(202) ATM 프로세서의 수퍼스칼라 특징을 고려하여 최소 정적 계수를 가진 수순들 중에서 특히 동적 계수가 최소인 명령 수순을 선택한다(203).First, in order to enable the CHILL compiler for ATM processors to generate optimal instruction sequences, we select optimization patterns for cases where conditional branches can be transformed into arithmetic expressions of the same function using algebraic rules ( 201) The ATM processor retrieves all instruction sequences with the least static coefficients for the arithmetic expressions corresponding to the optimization pattern in the conditional branch using the Super Optimizer, one of the compiler automation tools, and takes into account the superscalar features of the ATM processor. Select from among the procedures with the least static coefficients, in particular the order with the least dynamic coefficient (203).

이후, 선택된 최적 명령 수순을 칠(CHILL) 컴파일러에 반영하기 위해서는 컴파일러 후단부의 머신 설명 테이블 형식에 적합한 형태로 변환하여야 하며(204), 이때 명령 수순 내부에서 임시 레지스터의 사용이나 명령순서의 조정 등과 같은 간단한 최적화를 수행한다.Subsequently, in order to reflect the selected optimal instruction sequence to the CHILL compiler, it is necessary to convert it into a form suitable for the machine description table format at the rear end of the compiler (204). Perform a simple optimization.

이후, 컴파일러 후단부를 자동적으로 생성할 수 있는 시스템에 최적화 패턴을 반영하여 확장된 머신 설명 테이블을 결합하여(205) 실행 가능한 컴파일러 후단부를 구성한다. 변형된 컴파일러를 사용하여 실험하여(206) 머신 설명 테이블내의 다양한 명령 수순들간의 간섭이 발생하였는지를 판단하여(207) 간섭이 발생하여 최적화의 효과가 상실되는 경우가 발견되면 204 과정으로 되돌아가서 머신 설명 테이블에서 명령 수순들 간의 순서를 재조정 한 후에 207 과정까지를 수행한다.Thereafter, the extended machine description table is combined (205) to reflect the optimization pattern in a system capable of automatically generating the compiler rear end to form an executable compiler rear end. Experiment with the modified compiler (206) to determine if interference between the various instruction sequences in the machine description table has occurred (207). If interference occurs and the effect of the optimization is lost, go back to step 204 to explain After reordering the sequence of instructions in the table, proceed to step 207.

한편, 명령 수순들 간의 간섭이 발생하지 않아 최적화의 효과가 확인된 패턴과 대응하는 명령 수순은 머신 설명 테이블에 반영구적으로 수록한다.(208). 최적화 패턴이 남아 있으면 201 과정으로 되돌아가서 나머지 최적화 패턴들에 대해서도 동일한 과정을 반복한다.On the other hand, the interference between the instruction sequences does not occur, and the instruction sequence corresponding to the pattern in which the effect of optimization is confirmed is semi-permanently recorded in the machine description table (208). If the optimization pattern remains, the process returns to step 201 and the same process is repeated for the remaining optimization patterns.

제3도는 본 발명에 따른 최적화 패턴 선정 과정의 상세 흐름도로서, 조건부 분기가 단순히 분기에 목적이 있지 않고 기타 기능과 결합될 수 있는 가능성이 있는 다양한 경우를 조사하여 대수적 규칙들을 사용하여 동일한 기능을 수행하는 산술 및 이동 연산의 조합을 구하는 기능을 수행한다.3 is a detailed flowchart of the optimization pattern selection process according to the present invention, which examines various cases where conditional branches are simply not aimed at branches and may be combined with other functions to perform the same function using algebraic rules. Performs a function for finding a combination of arithmetic and shift operations.

변수 증감 패턴은 조건 판단의 결과가 참인 경우에 특정한 변수의 값을 증가시키거나 감소시키는 기능을 수행하는 패턴이다. 그리고, 변수 설정/소거 패턴은 조건 판단의 결과치에 따라 특정 변수를 참값이나 거짓값으로 설정하는 패턴이다. 그리고, 특수 패턴은 절대치, 최대치 등과 같이 직접적인 분기의 표현은 아니지만 조건의 판단 결과에 따라 다른 결과를 산출할 수 있는 프로그램 패턴이다.The variable increase and decrease pattern is a pattern for increasing or decreasing the value of a specific variable when the result of the condition determination is true. The variable setting / erase pattern is a pattern for setting a specific variable to a true value or a false value according to the result of the condition determination. The special pattern is not a direct branch expression such as an absolute value or a maximum value, but a program pattern that can produce different results according to the result of the judgment of the condition.

먼저, 조건부 분기가 기타 기능과 결합될 수 있는 가능성이 있는 구문을 선정한 후에(301) 구문을 분석하여(302) 변수 증감이면 변수 증감 패턴을 기록하고(303), 변수 설정/소거이면 변수 설정/소거 패턴을 기록하며(304), 특수 패턴이면 특수 패턴을 기록한다(305).First, select phrases with which the conditional branch is likely to be combined with other functions (301), parse them (302), record variable increment patterns if variable increments (303), and set variable / An erase pattern is recorded (304), and if it is a special pattern, a special pattern is recorded (305).

이러한 각각의 경우에 대하여 대다수 변환 규칙을 사용하여 산술식으로 변환할 수 있는지를 판단하여(306) 가능한 경우에는 대응하는 산술식을 구하고(307), 불가능한 경우에는 최적화의 대상에서 제외한다.For each of these cases, it is determined whether or not it can be converted to an arithmetic expression using most of the conversion rules (306), and if possible, the corresponding arithmetic expression is obtained (307).

제4도는 본 발명에 따른 수퍼 최적화를 사용한 명령 수순 선택 과정의 상세 흐름도 이다.4 is a detailed flowchart of an instruction sequence selection process using super optimization according to the present invention.

먼저, 조건부 분기 최적화 패턴을 위한 산술식을 수퍼 최적화기에 적용할 수 있는 형태로 변환하고(401), 이를 반영하여 확정된 수퍼 최 적화기를 컴파일 하여 실행 프로그램을 얻은 후에(402), 최적화 패턴을 위한 목표 함수를 호출하여 최소 정적 계수를 가진 명령 수순을 얻는다(403).First, the arithmetic expression for the conditional branch optimization pattern is converted into a form applicable to the super optimizer (401), and the reflected super optimizer is compiled to obtain an executable program (402). The target function is called to obtain an instruction sequence with the minimum static coefficient (403).

제5도는 본 발명에 따른 최소 동적 계수를 가진 명령 수순 선택 과정의 상세 흐름도 이다.5 is a detailed flowchart of an instruction procedure selection process with minimum dynamic coefficients according to the present invention.

먼저, 명령 수순을 입력하여(501) 패턴 정적 계수가 5이하인지의 여부를 조사하여 (502) 5보다 큰 경우에는 최적화의 대상에서 제외하고 종료한다(503).First, a command sequence is input (501) to check whether the pattern static coefficient is 5 or less.

이때, ATM 프로세서의 경우에 하나의 분기 명령을 위한 수행 노력을 정수 연산 4개를 위한 노력과 비슷하게 볼 수 있으므로 산술 연산이나 배정을 위한 노력을 감안할 때 명령 수순의 길이가 5이상인 경우에는 최적화의 원리에 위배된다. 본 발명이 기초하고 있는 수퍼 최적화 기술도 명령 수순의 길이가 5이내인 경우에만 현실성이 있다. 이러한 근거에서 본 발명의 일 예에서는 패턴의 정적 계수가 5이하인 경우만을 고려하도록 하였다.In the case of an ATM processor, the execution effort for one branch instruction can be seen as similar to the effort for four integer operations. Is against. The super optimization technique on which the present invention is based is also practical only when the length of the instruction sequence is 5 or less. For this reason, in the example of the present invention, only the case where the static coefficient of the pattern is 5 or less is considered.

한편, 조사 결과(502), 패턴 정적 계수가 5이하인 경우에는 수퍼스칼라 프로세서의 특성을 고려하여 각 명령 수순의 동적 계수를 구한 후에(504) 이들 중에서 최소 동적 계수를 가진 수순을 선택한다(505). 동일한 동적 계수를 가진 수순이 둘 이상 있는 경우에는 필요한 임시 레지스터의 개수가 최소인 수순(506)과 조건 코드를 적게 사용하는 수순을 선택한다(507).On the other hand, if the pattern static coefficient is less than or equal to 5, the dynamic coefficient of each instruction sequence is determined in consideration of the characteristics of the superscalar processor (504), and then the procedure having the minimum dynamic coefficient is selected among them (505). . If there are two or more procedures with the same dynamic coefficients, the procedure selects the minimum number of temporary registers required (506) and the procedure using less condition codes (507).

제6도는 본 발명에 따른 컴파일러 머신 설명 테이블에 반영하기 위하여 변환하는 과정의 상세 흐름도 이다.6 is a detailed flowchart of the conversion process to reflect the compiler machine description table according to the present invention.

먼저, 특정 최적화 패턴에 대응하는 최소 동적 계수를 가진 ATM 프로세서 명령 수순에서 임시 레지스터의 공유 가능성을 조사하여(601) 공유가 가능한 경우에 이를 명령 수순에 반영하며(602), 그 결과로 얻은 명령 수순을 칠(CHILL) 컴파일러 후단부 생성을 위한 머신 설명 테이블 입력 형식으로 변환한다(603). 머신 설명 테이블에서 명령 수순의 위치는 최적화 적용 가능성에 큰 영향을 미치므로, 다른 명령 수순과 간섭을 발생시키지 않는 적절한 위치(반영하고자 하는 패턴을 변경 할 가능성이 있는 다른 어떤 패턴보다 먼저 적용되는 위치)를 판별하여(604) 그 수순을 배치한다(605).First, the possibility of sharing a temporary register in an ATM processor instruction sequence with a minimum dynamic coefficient corresponding to a particular optimization pattern is examined (601) and if it is possible to share it, this is reflected in the instruction sequence (602), and the resulting instruction sequence is obtained. (603) is converted into a machine description table input format for generating the rear end of the CHILL compiler. The position of the instruction sequence in the machine description table has a significant impact on the applicability of the optimization, so that it is an appropriate position that does not interfere with other instruction sequences (where it is applied before any other pattern that might change the pattern you want to reflect). (604) and the procedure is arranged (605).

상기와 같은 본 발명은, 수퍼 스칼라 프로세서의 컴파일러가 조건부 동기의 효율성을 높일 수 있는 효과가 있다.The present invention as described above has the effect that the compiler of the superscalar processor can increase the efficiency of conditional synchronization.

이상에서 설명한 본 발명은 전술한 실시예 및 첨부된 도면에 의해 한정되는 것이 아니고, 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 치환, 변형 및 변경이 가능하다는 것이 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 있어 명백할 것이다.The present invention described above is not limited to the above-described embodiments and the accompanying drawings, and various substitutions, modifications, and changes can be made in the art without departing from the technical spirit of the present invention. It will be apparent to those of ordinary knowledge.

Claims (5)

비동기전달모드(ATM) 프로세서를 구비한 장치에 적용되는 최적 명령 수순 선택방법에 있어서, 조건부 분기를 동일한 기능의 산술식으로 변환할 수 있는 최적화 패턴을 선정하고 수퍼 최적화를 사용하여 정적 계수가 최소인 명령 수순을 검색한 후에 최소의 동적 계수를 가진 명령 수순을 선택하는 제1단계; 선택된 최적 명령 수순을 설명 테이블 형식에 적합한 형태로 변환하여 확장된 머신 설명 테이블에 결합하여 실행 가능한 컴파일러 후단부를 구성한 후에 실험하여 명령 수순들간의 간섭이 발생하였는지를 판단하는 제2단계; 및 상기 제2단계의 판단 결과, 간섭이 발생하였으면 상기 제2단계부터 반복 수행하고, 간섭이 발생하지 않았으면 최적 명령 수순을 상시 머신 테이블 저장하는 제3단계를 포함하여 이루어진 최적 명령 수순 선택 방법.In the optimal instruction procedure selection method applied to a device having an asynchronous transfer mode (ATM) processor, an optimization pattern that can convert a conditional branch into an arithmetic function of the same function is selected, and super optimization is used to minimize the static coefficient. A first step of selecting an instruction sequence having a minimum dynamic coefficient after retrieving the instruction sequence; A second step of converting the selected optimal instruction sequence into a form suitable for the description table format, combining it with the extended machine description table to construct an executable compiler rear end, and then experimenting to determine whether interference between the instruction sequences has occurred; And a third step of repeating from the second step if the interference has occurred as a result of the determination of the second step, and storing the optimal command sequence at all times in the machine table if the interference has not occurred. 제1항에 있어서, 상기 제1단계의 조건부 분기를 동일한 기능의 산술식으로 변환 할 수 있는 최적화 패턴을 선정하는 과정은, 조건부 분기 관련 구문을 선정한 후에 구문을 분석하는 제4단계; 상기 제4단계의 분석 결과, 변수 증감이면 변수 증감 패턴을 기록하고, 변수 설정/소거이면 변수 설정/소거 패턴을 기록하며, 특수 패턴이면 특수 패턴을 기록하는 제5단계; 및 상기 제5단계의 각 경우를 수행한 수에 대수적 변환 규칙을 사용하여 산술식으로 변환할 수 있는지를 판단하여 가능한 경우에는 대응하는 산술식을 구하고, 불가능한 경우에는 최적화의 대상에서 제외하는 제6단계를 포함하여 이루어진 최적명령 수순 선택 방법.The method of claim 1, wherein the selecting of an optimization pattern capable of converting the conditional branch of the first step into an arithmetic expression of the same function comprises: a fourth step of analyzing the syntax after selecting the conditional branch-related syntax; A fifth step of recording the variable increase / decrease pattern if the variable increases / decreases, records the variable set / erase pattern if the variable is set / erased, and records the special pattern if the special pattern; And determining whether the arithmetic expression can be converted to an arithmetic expression using the algebraic conversion rule for the number of cases performed in the fifth step, and obtaining a corresponding arithmetic expression if possible, and excluding the optimization target if not possible. A method for selecting an optimal instruction sequence comprising a step. 제1항 또는 제2항에 있어서, 상기 제1단계의 수퍼 최적화를 사용하여 정적 계수가 최소인 명령 수순을 검색하는 과정은, 조건부 분기 최적화 패턴을 위한 산술식을 수퍼 최적화기에 적용할 수 있는 형태로 변환하는 제7단계; 변환 결과를 반영하여 확장된 수퍼 최적화기를 컴파일 하여 실행 프로그램을 얻는 제8단계; 및 최적화 패턴을 위한 목표 함수를 호출하여 최소 정적 계수를 가진 명령 수순을 얻는 제9단계를 포함하여 이루어진 최적 명령 수순 선택 방법.The method of claim 1 or 2, wherein the searching of the instruction sequence having the minimum static coefficient by using the super optimization of the first step is a form in which an arithmetic expression for a conditional branch optimization pattern can be applied to the super optimizer. Converting to a seventh step; An eighth step of obtaining an executable program by compiling the extended super optimizer by reflecting the conversion result; And a ninth step of calling a target function for the optimization pattern to obtain an instruction sequence with a minimum static coefficient. 제1항 또는 제2항에 있어서, 상기 제1단계의 최소의 동적 계수를 가진 명령 수순을 선택하는 과정은, 명령 수순을 입력하여 패턴 정적 계수가 소정의 값 이하인지의 여부를 조사하는 제7단계; 상기 제7단계의 조사 결과, 소정의 값보다 큰 경우에는 최적화의 대상에서 제외하는 제8단계; 및 상기 제7단계의 조사 결과, 패턴 정적 계수가 소정의 값 이하인 경우에는 각 명령 수순의 동적 계수를 구하여 최소 동적 계수를 가진 수순을 선택한 후에 임시 레지스터의 개수가 최소인 수순과 최소 조건 코드 수순을 선택하는 제9단계를 포함하여 이루어진 최적 명령 수순 선택 방법.The method of claim 1 or 2, wherein the step of selecting an instruction sequence having the minimum dynamic coefficient of the first step comprises: inputting the instruction sequence to investigate whether the pattern static coefficient is less than or equal to a predetermined value; step; An eighth step of excluding the target of optimization if the result of the seventh step is greater than a predetermined value; If the pattern static coefficient is less than or equal to the predetermined value as a result of the investigation in the seventh step, the dynamic coefficient of each instruction sequence is obtained, the procedure having the minimum dynamic coefficient is selected, and the minimum number of temporary registers and the minimum condition code sequence are determined. A method for selecting an optimal instruction sequence comprising a ninth step of selecting. 제1항 또는 제2항에 있어서, 상기 제2단계의 선택된 최적 명령 수순을 머신 설명 테이블 형식에 적합한 형태로 변환하는 과정은, 특정 최적화 패턴에 대응하는 최소 동적 계수를 가진 ATM 프로세서 명령 수순에서 임시 레지스터의 공유 가능성을 조사하여 명령 수순에 반영하는 제7단계; 명령 수순에 반영한 결과로 얻은 명령 수순을 칠(CHILL) 컴파일러 후단부 생성을 위한 머신 설명 테이블 입력 형식으로 변환하는 제8단계; 및 다른 설명 수순과 간섭을 발생시키지 않는 위치를 판별하여 최적 명령 수순을 배치하는 제9단계를 포함하여 이루어진 최적 명령 수순 선택 방법.3. The process of claim 1 or 2, wherein the step of converting the selected optimal instruction sequence of the second step into a form suitable for a machine description table format is temporary in an ATM processor instruction sequence having a minimum dynamic coefficient corresponding to a particular optimization pattern. A seventh step of examining the shareability of the registers and reflecting them in the instruction sequence; An eighth step of converting the instruction sequence resulting from the reflection of the instruction sequence into a machine description table input format for generating a CHILL compiler rear end; And a ninth step of arranging an optimal instruction sequence by determining a position which does not cause interference with other explanation procedures.
KR1019950055871A 1995-12-23 1995-12-23 Method for selecting optimal order for atm processor KR0179179B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019950055871A KR0179179B1 (en) 1995-12-23 1995-12-23 Method for selecting optimal order for atm processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019950055871A KR0179179B1 (en) 1995-12-23 1995-12-23 Method for selecting optimal order for atm processor

Publications (2)

Publication Number Publication Date
KR970056415A KR970056415A (en) 1997-07-31
KR0179179B1 true KR0179179B1 (en) 1999-05-15

Family

ID=19444035

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019950055871A KR0179179B1 (en) 1995-12-23 1995-12-23 Method for selecting optimal order for atm processor

Country Status (1)

Country Link
KR (1) KR0179179B1 (en)

Also Published As

Publication number Publication date
KR970056415A (en) 1997-07-31

Similar Documents

Publication Publication Date Title
US8024718B2 (en) System and method for optimizing source code
Tirumalai et al. Parallelization of loops with exits on pipelined architectures
US6113650A (en) Compiler for optimization in generating instruction sequence and compiling method
US5901308A (en) Software mechanism for reducing exceptions generated by speculatively scheduled instructions
US5317743A (en) System for compiling iterated loops based on the possibility of parallel execution
KR100638501B1 (en) A method for structuring a multi-instruction computer program
JPH01108638A (en) Parallelized compilation system
US5131086A (en) Method and system for executing pipelined three operand construct
JPH09330233A (en) Optimum object code generating method
US20050044538A1 (en) Interprocedural computing code optimization method and system
US5339420A (en) Partitioning case statements for optimal execution performance
JP2001166949A (en) Method and device for compiling source code by using symbolic execution
US5978905A (en) Program translating apparatus and a processor which achieve high-speed execution of subroutine branch instructions
Busam et al. Optimization of expressions in Fortran
JP2001166946A (en) Method and device for compiling source code by flattening hierarchy
KR0179179B1 (en) Method for selecting optimal order for atm processor
JP3311381B2 (en) Instruction scheduling method in compiler
JPH09231089A (en) Device for optimizing code in compiler
JP3840149B2 (en) Compiler, arithmetic processing system, and arithmetic processing method
JP2001125792A (en) Optimization promoting device
US5812845A (en) Method for generating an object code for a pipeline computer process to reduce swapping instruction set
Liao et al. Code generation and optimization techniques for embedded digital signal processors
US5437035A (en) Method and apparatus for compiling a program incending a do-statement
JPH02176938A (en) Machine language instruction optimizing system
Ernst Serializing parallel programs by removing redundant computation

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20041101

Year of fee payment: 7

LAPS Lapse due to unpaid annual fee