Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Effective handling of unoptimized region in a region-based compilation for dynamic compilers

IP.com Disclosure Number: IPCOM000019356D
Original Publication Date: 2003-Sep-12
Included in the Prior Art Database: 2003-Sep-12
Document File: 3 page(s) / 24K

Publishing Venue

IBM

Abstract

This article describes a technique to effectively handle unoptimized or unselected regions in a region-based compilation for dynamic compilers.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 32% of the total text.

Page 1 of 3

  Effective handling of unoptimized region in a region-based compilation for dynamic compilers

  Disclosed is a technique to effectively handle unoptimized or unselected regions in a region-based compilation for dynamic compilers. The region-based compilation is a technique to identify rarely or never executed portion of the target code, and to remove them from the compilation target. This allows dynamic compilers to increase optimization opportunities by removing the merge points from the rarely executed code to frequently executed code. It can also significantly contribute for the reduction of the total compilation overhead.

The key parts of the region-based compilation are region selection and region exit handling. The region selection identifies rarely or never executed parts of the code by using some heuristics and dynamically collected profile information. The region exit handling determines how to treat those rarely executed portions (unselected regions for optimizations, or unoptimized regions) in the compilation process. The existing approach for performing region-based compilation is designed to employ either of the following three methods for handling the unselected regions.

We compile the entire body of the target code with the same optimization level, including unselected portion. We generate code for unselected regions, but place the code in a separate section of code from the common code to increase the code locality. This is a policy when we use the code splitting technique. We remove unselected parts of the code from the compilation target. When the control exits from the selected region, we drive recompilation, generate the transition target code, and then perform on-stack replacement to continue the execution. We remove unselected parts of the code from the compilation target. When the control exits from the selected region, we transfer the control to the interpreter using on-stack replacement technique.

There are advantages / disadvantages among the above three methods of handling unselected regions. However, the existing approaches employ either of the three methods as a way of handling all the region exit points, and thus it imposes a fixed overhead of handling unselected regions. This means we need to be conservative for some region selections in order to minimize the overhead of the region exit handling possibly occurred at runtime, and thus the effectiveness of the region-based compilation can be decreased from the viewpoint of the total performance improvement or the reduction of the compilation overhead.

This article proposes a new technique for handling unselected regions by employing the best from several options according to the characteristics of each region exit point, and allows the region selection process to be more aggressive for increasing the effectiveness of the region-based compilation in dynamic compilers.

The technique uses both program's static information and dynamic profile information, and...