Implementation of Loop Peeling in CTOC

CTOC에서 루프 벗기기 구현

  • 김기태 (인하대학교 컴퓨터정보공학부) ;
  • 김제민 (인하대학교 정보공학과) ;
  • 유원희 (인하대학교 컴퓨터정보공학부)
  • Published : 2008.09.30

Abstract

The CTOC framework was implemented to efficiently perform analysis and optimization of the Java bytecode that is often being used lately. In order to analyze and optimize the bytecode from the CTOC, the eCFG was first generated. Due to the bytecode characteristics of difficult analysis, the existing bytecode was expanded to be suitable for control flow analysis. and the control flow graph was drawn. We called eCFG(extended Control Flow Graph). Furthermore, the eCFG was converted into the SSA Form for a static analysis. Many loops were found in the conversion program. The previous CTOC performed conversion directly into the SSA Form without processing the loops. However, processing the loops prior to the SSA Form conversion allows more efficient generation of the SSA Form. This paper examines the process of finding the loops prior to converting the eCFG into the SSA Form In order to efficiently process the loops, and exhibits the procedures for generating the loop tree.

최근 웹 어플리케이션 분야에서 많이 사용되고 있는 자바 바이트코드의 분석과 최적화 과정을 효율적으로 수행하기 위해 CTOC 프레임워크를 개발하였다. CTOC는 바이트코드에 대해 분석과 최적화를 수행하기 위해 E-Tree를 중간 표현으로 사용하는 eCFG를 생성한다. eCFG는 바이트코드에 대한 제어 흐름 분석에 적합하도록 확장한 제어 흐름 그래프이다. 또한, 바이트코드를 정적으로 분석하기 위해 E-Tree를 SSA Form으로 변환한다. 이러한 변환과정 중 프로그램의 많은 부분에서 루프가 발견된다. 하지만 기존의 CTOC에서는 루프에 대한 처리를 수행하지 않은 상태에서 직접 SSA Form으로 변환을 수행하였다. 하지만 SSA Form으로 변환 이전에 루프를 처리하면 더욱 효율적인 SSA Form을 생성할 수 있게 된다. 따라서 본 논문에서는 루프에 대한 처리를 효율적으로 하기 위해 E-Tree를 SSA Form으로 변환하는 과정 이전에 eCFG에서 루프를 발견하고 이와 관련된 루프 트리를 생성한 후 루프 벗기기를 수행하는 과정을 보인다.

Keywords