Loop Fusion in the JikesRVM - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Loop Fusion in the JikesRVM

Description:

Little work has been done on loop optimizations for Java JIT compilers ... James Gosling, Bill Joy, Guy Steele and Gilad Bracha. ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 16
Provided by: csUal
Category:
Tags: jikesrvm | fusion | loop

less

Transcript and Presenter's Notes

Title: Loop Fusion in the JikesRVM


1
Loop Fusion in the JikesRVM
Kit Barton CMPUT 605 Project Proposal February
25, 2003
2
Introduction
  • Little work has been done on loop optimizations
    for Java JIT compilers
  • Loop optimizations have the potential to improve
    program performance
  • Many loop optimizations are expensive in both
    time and space
  • Investigate tradeoffs (benefits vs costs)

3
Loop Fusion
  • Combine the bodies of two loops, creating a
    single loop
  • Advantages
  • Decrease loop overhead
  • Increase data reuse
  • Disadvantages
  • Analysis can be expensive
  • Requires fairly specific loop structure

4
Objectives
  • Implement basic loop fusion in the JikesRVM
  • Analyze impact on performance
  • Enhance loop fusion
  • Create cost function

5
Timeline
  • February 28
  • Understand loop structure in JikesRVM
  • Modification of JikesRVM
  • Addition of new compilation phase to JikesRVM
  • March 7
  • Basic loop fusion instrumentation
  • Begin loop fusion implementation

6
Timeline
  • March 14
  • Basic loop fusion implementation complete
  • Detailed loop fusion instrumentation complete
  • Initial performance measurements
  • March 21
  • Investigation of additional code transformations
  • Initial planning of cost function

7
Timeline
  • March 28
  • Decision on additional code transformations
  • Description of cost function
  • Project progress report
  • April 4
  • Implementation of code transformations
  • Implementation of cost function

8
Timeline
  • April 11
  • Implementation of code transformations
  • Integration of cost function and loop fusion into
    JikesRVM
  • April 18
  • Performance measurements

9
Timeline
  • April 25
  • Performance measurements
  • Final report
  • Project presentation

10
Potential Roadblock (1)
  • Potential Exception-throwing Instructions
  • Jikes uses a Factored Control Flow Graph
  • Loops containing PEIs cannot be fused because
    exceptions in Java are precise
  • "When the transfer of control takes place,
    all effects of the statements executed and
    expressions evaluated before the point from which
    the exception is thrown must appear to have taken
    place. No expressions, statements, or parts
    thereof that occur after the point from which the
    exception is thrown may appear to have been
    evaluated."1

11
Possible PEI Solutions
  • Hoist PEIs out of loop
  • Create a Lfused loop and two Lorig loops
  • Lfused is executed normally
  • If an exception occurs, execute Lorig
  • Ignore exceptions for the purpose of this study

12
Potential Roadblock (2)
  • Loop structure not sufficient for loop fusion
  • All information necessary for loop fusion may not
    be available
  • eg. exit test may not be easily obtained
  • Loop structure may not be in a format that is
    typical for loop fusion
  • eg. loops may not be normalized

13
Loop Structure Solution
  • Modify loop structure
  • Add necessary information
  • Transform loop structure into one that is easier
    to use during fusion
  • Modify algorithms

14
Conclusions
  • Results will show the relationship between the
    benefits and costs of loop fusion
  • Results may help predict the potential impact on
    performance for other loop optimizations

15
References
  • Christopher Barton. Code Transformations to
    Augment the Scope of Loop Fusion in a Production
    Compiler. Master's thesis, University of Alberta,
    January 2003.
  • Jong-Deok Choi, David Grove, Michael Hind and
    Vivek Sarkar. Efficient and precise modeling of
    exceptions for the analysis of Java programs. In
    Proceedings of the 1999 ACM SIGPLAN-SIGSOFT
    workshop on Program analysis for software tools
    and engineering, pages 21-31, Toulouse, France,
    1999.
  • James Gosling, Bill Joy, Guy Steele and Gilad
    Bracha. The Java language specification, second
    edition. http//java.sun.com/docs/books/jls/second
    \_edition/html/j.title.doc.html
Write a Comment
User Comments (0)
About PowerShow.com