Design, Implementation, and Evaluation of Optimizations in a Just-In-Time Compiler - PowerPoint PPT Presentation

About This Presentation
Title:

Design, Implementation, and Evaluation of Optimizations in a Just-In-Time Compiler

Description:

Translation Time of JIT Compiler Execution Time of Native Code = Running Time ... No CHA. 54.648 seconds. All Opt. OFF. 6/6/2000. 14. Conclusion ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 15
Provided by: ape64
Learn more at: https://cseweb.ucsd.edu
Category:

less

Transcript and Presenter's Notes

Title: Design, Implementation, and Evaluation of Optimizations in a Just-In-Time Compiler


1
Design, Implementation, and Evaluation of
Optimizations in a Just-In-Time Compiler
  • Kazuaki Ishizaki, Motohiro Kawahito, et al.
  • IBM Tokyo Research Laboratory
  • Presentation By
  • Allen Chu

2
Outline
  • Introduction
  • Motivation
  • JIT Optimizations
  • Exception Elimination,
  • Common Subexpression Elimination
  • Type Inclusion Test
  • Result
  • Conclusion

3
Introduction
  • Advantage and Disadvantage of Java
  • Safety (Array-Bound Check)
  • Reusability and Portability
  • But It Is Slow
  • Compiler for Java
  • Compiler (byte code to native code)
  • Just-In-Time Compiler

4
Motivation
  • Regular Compiler Looses the Portability and
    Reusability of Code.
  • Goal for JIT Compiler
  • Preserve Safety and Reusability
  • Translation Time of JIT Compiler Execution Time
    of Native Code lt Running Time on JVM

5
JIT Compiler
class file
  • Translation occurs when new method is called.

Build Flow Graph
Method Inlining
Exception Check Elimination
CSE
Register Mapping
Code Generation
native code
6
Exception Check Elimination
  • Null-Pointer Check Eliminated By Data Flow
    Analysis
  • Array-Bound Check Eliminated By Propagating the
    Information of Checked Exception in Data Flow
    Analysis
  • Keep Track of Indices and Range of Checked
    Indices.

7
Array-Bound Elimination (Cont.)
8
CSE
  • Scalar Replacement Of Array Element
  • Consecutive Array Access Using Interior Pointer
  • Instance Variable Elimination
  • Replace this.variable

9
CSE (Cont.)
Original Code for (x0 x lt 8 x) if
(this.ax lt this.ax1) int t
this.ax this.ax this.ax1
this.ax1 t
CSE Code int la this.a for (x0 x lt 8
x) if (lax lt lax1) int t lax
lax lax1 lax1 t
CSE for Instance Variable
10
CSE (Cont.)
Instance Code int la this.a for (x0 x lt
8 x) if (lax lt lax1) int t
lax lax lax1 lax1 t
Array Code int la this.a for (x0 x lt 8
x) int la0lax iv0ia0
iv1(iao1) if (iv0 lt iv1) int t iv0
la0 iv1 (la01) t
CSE for Array
11
Type Inclusion Test
Java Code Type to (Type) from Pseudo
Code if (from NULL) then to from else if
(from.type Type) then to from else if
(from.type.lastsucc Type) then to from
else if (call expensive test) then (to from
from.type.lastsucc Type)
12
Result - Compress
13
Result - Overall
45.433 seconds
No CSE
No Exception
47.294 seconds
45.037 seconds
No Type Test
52.432 seconds
No Inlining
44.993 seconds
No CHA
All Opt. ON
45.168 seconds
54.648 seconds
All Opt. OFF
Execution Time
14
Conclusion
  • All Optimizations Do Not Improve Execution Speed
    All the Time
  • Overall Combined Optimizations Do Improve
    Execution.
Write a Comment
User Comments (0)
About PowerShow.com