• Title/Summary/Keyword: 코드 최적화

Search Result 476, Processing Time 0.026 seconds

Code Optimization Using Pattern Table (패턴 테이블을 이용한 코드 최적화)

  • Yun Sung-Lim;Oh Se-Man
    • Journal of Korea Multimedia Society
    • /
    • v.8 no.11
    • /
    • pp.1556-1564
    • /
    • 2005
  • Various optimization techniques are deployed in the compilation process of a source program for improving the program's execution speed and reducing the size of the source code. Of the optimization pattern matching techniques, the string pattern matching technique involves finding an optimal pattern that corresponds to the intermediate code. However, it is deemed inefficient due to excessive time required for optimized pattern search. The tree matching pattern technique can result in many redundant comparisons for pattern determination, and there is also the disadvantage of high cost involved in constructing a code tree. The objective of this paper is to propose a table-driven code optimizer using the DFA(Deterministic Finite Automata) optimization table to overcome the shortcomings of existing optimization techniques. Unlike other techniques, this is an efficient method of implementing an optimizer that is constructed with the deterministic automata, which determines the final pattern, refuting the pattern selection cost and expediting the pattern search process.

  • PDF

Translator for Stack-Based Codes from Intermediated Codes (중간 코드를 스택-기반 코드로의 변환기)

  • Kim Young Kook;Kouh Hoon-Joon;Yoo Weon Hee
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 2005.07b
    • /
    • pp.895-897
    • /
    • 2005
  • 자바의 문제점은 실행속도의 저하이다. 실행속도 저하의 해결 방법으로 네이티브 코드로 변환, JIT컴파일러, 바이트코드 최적화등의 연구가 되어 왔다. 그 중에 바이트코드 최적화 방법을 사용하는 CTOC(Class To Optimized Classes)에서 중간코드로 사용하는 3-주소 코드를 스택-기반 코드로 코드 확장 기법으로 변환 시 불필요한 store/load 코드가 생성된다. 따라서 본 논문은 불필요한 store/load 코드를 제거하기 위해서 부분 중복 코드 제거 후 불필요한 store/load문을 제거함으로서 불필요한 store/load 코드의 양을 줄이는 변환기를 제안하고, 거기에 대한 간단한 예를 들어 설명한다.

  • PDF

Translator for Stack-Based Codes from Three-Address Codes (3-주소 코드를 스택-기반 코드로의 변환기)

  • Kim, Young-Kook;Kouh, Hoon-Joon;Yoo, Weon-Hee
    • Proceedings of the Korea Information Processing Society Conference
    • /
    • 2005.05a
    • /
    • pp.369-372
    • /
    • 2005
  • 자바의 문제점은 실행속도의 저하이다. 실행속도 저하의 해결 방법으로 네이티브 코드로 변환, JIT컴파일러, 바이트코드 최적화등의 연구가 되어 왔다. 그중에 바이트코드 최적화 방법을 사용하는 CTOC(Class To Optimized Classes)에서 3-주소 코드를 스택-기반 코드로 코드 확장 기법으로 변환 시 불필요한 store/load 코드가 생성된다. 따라서 본 논문은 불필요한 store/load 코드를 제거하기 위해서 부분 중복 코드 제거 후 불필요한 store/load문을 제거함으로서 불필요한 store/load 코드의 양을 줄이는 변환기를 제안하고, 거기에 대한 간단한 예를 들어 설명한다.

  • PDF

Retargetable Intermediate Code Optimization System Using Tree Pattern Matching Techniques (트리패턴매칭기법의 재목적 가능한 중간코드 최적화 시스템)

  • Kim, Jeong-Suk;O, Se-Man
    • The Transactions of the Korea Information Processing Society
    • /
    • v.6 no.8
    • /
    • pp.2253-2261
    • /
    • 1999
  • ACK generates optimized code using the string pattern matching technique in pattern table generator and peephole optimizer. But string pattern matching method is not effective due to the many comparative actions in pattern selection. We designed and implemented the EM intermediate code optimizer using tree pattern matching algorithm composed of EM tree generator, optimization pattern table generator and tree pattern matcher. Tree pattern matching algorithm practices the pattern matching that centering around root node with refer to the pattern table, with traversing the EM tree by top-down method. As a result, compare to ACK string pattern matching methods, we found that the optimized code effected to pattern selection time, and contributed to improved the pattern selection time by about 10.8%.

  • PDF

Compiler triggered C level error check (컴파일러에 의한 C레벨 에러 체크)

  • Zheng, Zhiwen;Youn, Jong-Hee M.;Lee, Jong-Won;Paek, Yun-Heung
    • The KIPS Transactions:PartA
    • /
    • v.18A no.3
    • /
    • pp.109-114
    • /
    • 2011
  • We describe a technique for automatically proving compiler optimizations sound, meaning that their transformations are always semantics-preserving. As is well known, IR (Intermediate Representation) optimization is an important step in a compiler backend. But unfortunately, it is difficult to detect and debug the IR optimization errors for compiler developers. So, we introduce a C level error check system for detecting the correctness of these IR transformation techniques. In our system, we first create an IR-to-C converter to translate IR to C code before and after each compiler optimization phase, respectively, since our technique is based on the Memory Comparison-based Clone(MeCC) detector which is a tool of detecting semantic equivalency in C level. MeCC accepts only C codes as its input and it uses a path-sensitive semantic-based static analyzer to estimate the memory states at exit point of each procedure, and compares memory states to determine whether the procedures are equal or not. But MeCC cannot guarantee two semantic-equivalency codes always have 100% similarity or two codes with different semantics does not get the result of 100% similarity. To increase the reliability of the results, we describe a technique which comprises how to generate C codes in IR-to-C transformation phase and how to send the optimization information to MeCC to avoid the occurrence of these unexpected problems. Our methodology is illustrated by three familiar optimizations, dead code elimination, instruction scheduling and common sub-expression elimination and our experimental results show that the C level error check system is highly reliable.

A Study on Control Flow Analysis Using Java Bytecodes in CTOC (CTOC에서 자바 바이트코드를 이용한 제어 흐름 분석에 관한 연구)

  • Yoo Weon-Hee;Kim Ki-Tae
    • The Journal of the Korea Contents Association
    • /
    • v.6 no.1
    • /
    • pp.160-169
    • /
    • 2006
  • This paper describes the data structure for program analysis and optimization of bytecode level. First we create an extended CFG(Control Flow Graph). Because of the special properties of bytecode, we must adaptively extend the existing control flow analysis techniques. We build basic blocks to create the CFG and create various data that can be used for optimization. The created CFG can be tested for comprehension and maintenance of Java bytecode, and can also be used for other analyses such as data flow analysis. This paper implements CTOC's CTOC-BR(CTOC-Bytecode tRanslator) for control flow analysis of bytecode level. CTOC(Classes To Optimized Classes) is a Java bytecode framework for optimization and analysis. This paper covers the first part of the CTOC framework. CTOC-BR is a tool that converts the bytecode into tree form for easy optimization and analysis of bytecode in CTOC.

  • PDF

An parameter optimization of SOVA decoder for the IMT-2000 complied Turbo code (IMT-2000 표준의 터보코드를 위한 SOVA 복호기 최적화 설계)

  • 김주민;정덕진
    • The Journal of Korean Institute of Communications and Information Sciences
    • /
    • v.26 no.5B
    • /
    • pp.592-598
    • /
    • 2001
  • IMT-2000에서는 이미 터보코드가 채널코딩 기법으로 제안되어 있으며 특별히 3GPP 규격에서는 제한길이 4인 1/3 터보코드가 채택되어 있다. 기존의 논문에서는 일반적인 터보 코드의 성능에 대한 분석이 많이 제시되어 왔으나, 3GPP 규격의 터보 복호를 위한 SOVA 복호기의 성능 파라미터 추출과 그에 따른 성능 분석 수행되지 않았다. 본 연구에서는 효율적인 구조의 3GPP SOVA 복호기를 설계하기 위해서 외부정보의 스케일링과 신뢰도 갱신길이 라는 두 가지 파라미터에 따른 SOVA 복호기의 성능을 분석하고 최적의 파라미터 값을 제시하고자 한다. 이 파라미터의 최적화를 위하여 C++를 이용한 모의실험 결과, 3GPP 규격의 (13,15) 1/3 코드에서 스케일링 값은 1/2로 신뢰도 갱신길이는 10으로 최적화 되었다.

  • PDF

A Design of Turbo-encoder for High-speed Applications (고속데이터 처리를 위한 터보 인코더 설계)

  • 정덕영;최덕영;손승일;이우섭
    • Proceedings of the Korean Institute of Information and Commucation Sciences Conference
    • /
    • 2004.05b
    • /
    • pp.678-681
    • /
    • 2004
  • 본 연구에서는 IMT-2000방식 중 WCDMA(Wideband Code Division Multiple Access)방식의 터보코드에 대해 연구하였으며 터보 코드에 사용하는 인터리버 중 신호대 잡음비 성능이 가장 좋은 GF 인터리버와 터보 코드의 단점 중에 하나인 처리하는 동안 걸리는 지연 시간을 보완하기 위하여 핑퐁 램을 사용하였다. 핑퐁 램을 사용함으로써 최초에 소스 데이터 입력 때 만 지연이 생기고 그 이후에는 연속적으로 데이터를 출력 할 수 있는 장점을 얻었다. 그리고 C언어를 이용한 최적화된 시뮬레이션과 터보 코드의 성능평가를 통한 최적화를 실시하였다. 그리고 최적화된 정보를 바탕으로 터보코드를 VHDL언어를 이용하여 설계하고, Xilinx Vertex 1000E(XCV1000E)-PQ240칩을 이용한 테스트 보드에 다운로드 후 PCI인터페이스를 통한 시뮬레이션을 구현하였다.

  • PDF

A Study on Research in Analysis of Code Generated by Compiler Optimization (컴파일러 최적화 코드 분석 연구 조사)

  • Sang-Hun Han;Jeong-Hwan Kang;Dong-Hyun Kwon
    • Proceedings of the Korea Information Processing Society Conference
    • /
    • 2023.11a
    • /
    • pp.200-202
    • /
    • 2023
  • 컴파일러는 사용자가 작성한 소스 코드로부터 타겟 머신에서 동작하는 코드로 변환하기 위해 사용되는 프로그램으로 컴파일러의 구현은 몇 가지 단계로 구성된다. 그 단계 중 하나에 속하는 최적화 단계는 사용자에 의해 작성된 코드를 실행 시간, 메모리 사용량, 에너지 소모 등을 줄이기 위해 코드를 효율적으로 사용하고자 적용되는 단계이다. 그렇지만 이러한 컴파일러 최적화 기법은 사용자가 의도하지 않은 결과를 만들어 프로그램의 보안성을 낮추기도 한다. 이에 본 논문에서는 관련 연구 내용을 살펴보고 정리하고자 한다.

An Optimal Algorithm for Sparse Code Motion (희소코드모션을 위한 최적화 알고리즘)

  • 유희종;신현덕;안희학
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 2002.10d
    • /
    • pp.646-648
    • /
    • 2002
  • 본 논문에서는 코드 최적화를 위하여 계산적으로나 수명적으로 제한이 없는 희소 코드 모션 알고리즘을 제안한다. 이 알고리즘은 지나친 레지스터의 사용을 막기 위하여 불필요한 코드 모션을 억제한다. 또한, 본 논문에서는 기존 알고리즘의 술어의 의미가 명확하지 않은 것을 개선하였고 노드 단위 분석과 명령어 단위 분석을 혼용했기 때문에 발생하는 모호함도 개선하였다. 따라서, 제안한 알고리즘은 불필요하게 중복된 수식이나 배정문의 수행을 피하게 함으로써, 프로그램의 불필요한 재계산이나 재실행을 하지 않게 하여 프로그램의 능률 및 실행시간을 향상시킨다.

  • PDF