• Title/Summary/Keyword: SSA(Static Single Assignment) Form

Search Result 13, Processing Time 0.027 seconds

Static Type Inference Based on Static Single Assignment for Bytecode (바이트코드를 위한 정적 단일 배정문 기반의 정적 타입 추론)

  • Kim Ji-Min;Kim Ki-Tea;Kim Je-Min;Yoo Weon-Hee
    • Journal of the Korea Society of Computer and Information
    • /
    • v.11 no.4 s.42
    • /
    • pp.87-96
    • /
    • 2006
  • Although bytecode has many good features, it has slow execution speed and it is not an ideal representation for program analysis or optimization. For analysises and optimizations. bytecode must be translated to a Static Single Assignment Form(SSA Form) But when bytecode is translated a SSA Form it has lost type informations of son variables. For resolving these problem in this paper, we create extended control flow graph on bytecode. Also we convert the control flow graph to SSA Form for static analysis. Calculation about many informations such as dominator, immediate dominator. dominance frontier. ${\phi}$-Function. renaming are required to convert to SSA Form. To obtain appropriate type for generated SSA Form, we proceed the followings. First. we construct call graph and derivation graph of classes. And the we collect information associated with each node. After finding equivalence nodes and constructing Strongly Connected Component based on the collected informations. we assign type to each node.

  • PDF

An Efficient Application o of Static Single Assignment Form (SSA Form의 효율적 적용)

  • Du, Li-Dan;Kim, Ki-Tae;Kim, Je-Min;Yoo, Weon-Hee
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 2007.06c
    • /
    • pp.505-509
    • /
    • 2007
  • Static Single Assignment (SSA) form is an intermediate representation which encodes information about data and control flow that is use used to facilitate program analysis and optimization. SSA form simplifies this process with its size linear to program size. Thus we use SSA form to efficiently facilitate bytecode level analysis and optimizations in our CTOC program processor project. In this paper, we illustrate the application and implement implementation of SSA form using an example. We give the conclusion after experimental results.

  • PDF

Static Single Assignment Form for Java Bytecodes in CTOC (CTOC에서 자바 바이트코드를 위한 정적 단일 배정 형태)

  • Kim, Ki-Tae;Yoo, Weon-Hee
    • The KIPS Transactions:PartD
    • /
    • v.13D no.7 s.110
    • /
    • pp.939-946
    • /
    • 2006
  • Although the Java bytecode has numerous advantages, there are also shortcomings such as slow execution speed and difficulty in analysis. In order to overcome such disadvantages, bytecode analysis and optimization must be performed. We implements CTOC for optimized codes. An extended CFG must be first created in order to analyze and optimize a bytecode. Due to unique bytecode properties, the existing CFG must be expanded according to the bytecode. Furthermore, the CFG must be converted into SSA Form for a static analysis, for which calculation is required for various information such as the dominate relation, dominator tree, immediate dominator, $\phi$-function, rename, and dominance frontier. This paper describes the algorithm and the process for converting the existing CFG into the SSA From. The graph that incorporates the SSA Form is later used for type inference and optimization.

Optimization Using Partial Redundancy Elimination in SSA Form (SSA Form에서 부분 중복 제거를 이용한 최적화)

  • Kim, Ki-Tae;Yoo, Weon-Hee
    • The KIPS Transactions:PartD
    • /
    • v.14D no.2
    • /
    • pp.217-224
    • /
    • 2007
  • In order to determine the value and type statically. CTOC uses the SSA Form which separates the variable according to assignment. The SSA Form is widely being used as the intermediate expression of the compiler for data flow analysis as well as code optimization. However, the conventional SSA Form is more associated with variables rather than expressions. Accordingly, the redundant expressions are eliminated to optimize expressions of the SSA From. This paper defines the partial redundant expression to obtain a more optimized code and also implements the technique for eliminating such expressions.

A Practical Improvement to the Partial Redundancy Elimination in SSA Form

  • Park, Jong-Soo;Lee, Jae-Jin
    • Journal of Computing Science and Engineering
    • /
    • v.2 no.3
    • /
    • pp.301-320
    • /
    • 2008
  • Partial redundancy elimination (PRE) is an interesting compiler optimization because of its effectiveness and generality. Among many PRE algorithms, the one in static single assignment form (SSAPRE) has benefits over other bit-vector-based PRE algorithms. It preserves the properties of the SSA form after PRE and exploits the sparsity of the SSA form, resulting in reduced analysis and optimization time. This paper presents a practical improvement of the SSAPRE algorithm that further reduces the analysis and optimization time. The underlying idea is removing unnecessary ${\Phi}$'s during the ${\Phi}$-Insertion phase that is the first step of SSAPRE. We classify the expressions into three categories: confined expressions, local expressions, and the others. We show that unnecessary ${\Phi}$'s for confined and local expressions can be easily detected and removed. We implement our locality-based SSAPRE algorithm in a C compiler and evaluate its effectiveness with 20 applications from SPEC benchmark suites. In our measurements, on average 91 of ${\Phi}$'s identified by the original demand-driven SSAPRE algorithm are unnecessary for PRE. Pruning these unnecessary ${\Phi}$'s in the ${\Phi}$-Insertion phase makes our locality-based SSAPRE algorithm 1.8 times faster, on average, than the original SSAPRE algorithm.

Static Type Assignment for SSA Form in CTOC

  • Kim, Ki-Tae;Yoo, Weon-Hee
    • Journal of Information Processing Systems
    • /
    • v.3 no.1
    • /
    • pp.26-32
    • /
    • 2007
  • Although the Java bytecode has numerous advantages, it also has certain shortcomings such as its slow execution speed and difficulty of analysis. In order to overcome such disadvantages, a bytecode analysis and optimization must be performed. The control flow of the bytecode should be analyzed; next, information is required regarding where the variables are defined and used to conduct a dataflow analysis and optimization. There may be cases where variables with an identical name contain different values at different locations during execution, according to the value assigned to a given variable in each location. Therefore, in order to statically determine the value and type, the variables must be separated according to allocation. In order to achieve this, variables can be expressed using a static single assignment form. After transformation into a static single assignment form, the type information of each node expressed by each variable and expression must be configured to perform a static analysis and optimization. Based on the basic type information, this paper proposes a method for finding the related equivalent nodes, setting nodes with strong connection components, and efficiently assigning each node type.

A Study on Static Type Assignment for Static Single Assignment Form (정적 단일 배정 형태를 위한 정적 타입 배정에 관한 연구)

  • Kim, Ki-Tae;Yoo, Weon-Hee
    • The Journal of the Korea Contents Association
    • /
    • v.6 no.2
    • /
    • pp.117-126
    • /
    • 2006
  • Although the Java bytecode has numerous advantages, there are also shortcomings such as slow execution speed and difficulty in analysis. In order to overcome such disadvantages, bytecode analysis and optimization must be performed. First control flow of the bytecode should be analyzed, after which information is required regarding where the variables are defined and used to conduct data flow analysis and optimization. There may be cases where variables with an identical name contain different values at a different location during the execution according to the value assigned to a variable in each location. Therefore, in order to statically determine the value and type, the variables must be separated according to allocation. In order to do so, the variables can be expressed using a static single assignment form. After the transformation into a static single assignment form, the type information of each node expressed by each variable and expression must be configured to perform static analysis and optimization. Based on the basic type information, this paper proposes a method for finding related equivalent nodes, setting the nodes with strongly connection components and efficiently assigning each node the type.

  • PDF

Constructing A Loop Tree in CTOC (CTOC에서 루프 트리 구성하기)

  • Kim, Ki-Tae;Kim, Je-Min;Yoo, Weong-Hee
    • The KIPS Transactions:PartD
    • /
    • v.15D no.2
    • /
    • pp.197-206
    • /
    • 2008
  • 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.

Implementation of Dead Code Elimination in CTOC (CTOC에서 죽은 코드 제거 구현)

  • Kim, Ki-Tae;Kim, Je-Min;Yoo, Won-Hee
    • Journal of the Korea Society of Computer and Information
    • /
    • v.12 no.2 s.46
    • /
    • pp.1-8
    • /
    • 2007
  • Although the Java bytecode has numerous advantages, there are also shortcomings such as slow execution speed and difficulty in analysis. Therefore, in order for the Java class file to be effectively executed under the execution environment such as the network, it is necessary to convert it into optimized code. We implements CTOC. In order to statically determine the value and type, CTOC uses the SSA Form which separates the variable according to assignment. Also, it uses a Tree Form for statements. But, due to insertion of the $\phi$-function in the process of conversion into the SSA Form, the number of nodes increased. This paper shows the dead code elimination to obtain a more optimized code in SSA Form. We add new live field in each node and achieve dead code elimination in tree structures. We can confirm after dead code elimination though test results that nodes decreases.

  • PDF

Split Local Variables Using Static Single Assignment Form in CTOC (CTOC에서 정적 단일 배정문 형태를 이용한 지역 변수 분리)

  • Lee Kab-Lae;Yoo Weon-Hee;Kim Ki-Tae
    • The Journal of the Korea Contents Association
    • /
    • v.5 no.3
    • /
    • pp.73-81
    • /
    • 2005
  • CTOC(Classes To Optimized Classes) is a Java bytecode framework for optimization and analysis. Although Java bytecode has a significant amount of type information embedded in it, there are no explicit types for local variables. However, knowing types for local variables is very useful for both program optimization and analysis. This paper is a first part of CTOC framework. In this paper, we present methods for inferring static types for local variables in a 3-address, stackless, representation of Java bytecode. We use SSA Form(Single Static Assignment Form) for spliting local variables. Splited local variables will use to prepare for static type inference.

  • PDF