DOI QR코드

DOI QR Code

Constructing A Loop Tree in CTOC

CTOC에서 루프 트리 구성하기

  • 김기태 (인하대학교 컴퓨터공학부) ;
  • 김제민 (인하대학교 정보공학과) ;
  • 유원희 (인하대학교 컴퓨터공학부)
  • Published : 2008.04.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에서는 바이트코드에 대해 분석과 최적화를 수행하기 위해 가장 먼저 eCFG를 생성하였다. 분석하기 어렵다는 바이트코드의 특성 때문에 기존의 바이트 코드를 제어 흐름 분석에 적합하게 확장하여 제어 흐름 그래프를 작성하였다. 이를 확장된 제어 흐름 그래프인 eCFG라 부른다. 또한 정적으로 분석하기 위해 eCFG를 SSA Form으로 변환 하였다. 변환 시 많은 프로그램에서 루프가 발견되었다. 이전 CTOC에서는 루프에 대한 처리를 수행하지 않은 상태에서 직접 SSA Form으로 변환을 수행하였다. 하지만 SSA Form으로 변환하기 이전에 루프에 대한 부분을 처리하면 더욱 효율적인 SSA Form을 생성할 수 있게 된다. 본 논문은 루프에 대한 처리를 효율적으로 하기 위해 eCFG를 SSA Form으로 변환하는 과정 이전에 루프를 발견하고 이와 관련된 루프 트리를 생성하는 과정을 보인다.

Keywords

References

  1. Tim Linholm and Frank Yellin, 'The Java Virtual Machine Specification', The Java Series, Addison Wesley, Reading, MA, USA, Jan, 1997
  2. James Gosling, Bill Joy, and Guy Steel, 'The Java Language Specification' The Java Series, Addison Wesely, 1997
  3. 김기태, 유원희, “CTOC에서 자바 바이트코드를 이용한 제어 흐름 분석에 관한 연구”, 한국콘텐츠학회 논문지 제6권 제1호, pp. 160-169, 2006
  4. 김기태, 유원희, “CTOC에서 자바 바이트코드를 위한 정적 단일 배정 형태”, 정보처리학회논문지D 제13-D권 제 7호, pp. 939-946, 2006 https://doi.org/10.3745/KIPSTD.2006.13D.7.939
  5. 김기태, 유원희, “정적 단일 배정 형태를 위한 정적 타 입 배정에 관한 연구”, 한국콘텐츠학회 논문지 제6권 제2호, pp. 117-126, 2006
  6. 김기태, 김지민, 김제민, 유원희, “CTOC에서 자바 바이 트코드 최적화를 위한 Value Numbering”, 한국컴퓨터 정보학회논문지, 11권6호, pp. 19-26, 2006
  7. Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman, Compilers Principles, Techniques and Tools, Addison Wesley, 1986
  8. Andrew W. appel, Modern Compiler Implementation in Java. CAMBRIDGE UNIVERSITY PRESS, pp. 437-477, 1998
  9. Muchnick, S. Advanced Compiler Design and Implementation. Morgan Kaufmann Publishers, San Francisco. 1997
  10. Tarjan, R. E. Testing flow graph reducibility. J. Comput. Syst. Sci. 9, 355-365, 1974 https://doi.org/10.1016/S0022-0000(74)80049-8
  11. Havlak, P. Nesting of reducible and irreducible loops. ACM Trans. Program. Lang. Syst. 19, 4, 557-567, 1997 https://doi.org/10.1145/262004.262005
  12. Sreedhar, V. C., Cao, G. R., and Lee, Y. F. Identifying loops using DJ graphs. ACM Trans. Program. Lang. Syst. 18, 6, 649-658, 1996 https://doi.org/10.1145/236114.236115
  13. Steensgaard, B. Sequentializing program dependence graphs for irreducible programs. Tech. Rep. MSR-TR-93-14, Microsoft Research, Redmond, Wash. 1993
  14. http://www.graphviz.org/