Performing aggressive code optimization with an ability to rollback changes made by the aggressive optimizations

A technology for executing code and code, applied in the field of active code optimization mechanism, which can solve the problems of overthrowing the normal behavior of the compiler, indecision, not knowing whether specific semantics are necessary, and wrong operation of transformed code

Inactive Publication Date: 2012-11-14
IBM CORP
View PDF6 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

As a result, the compiler may still perform the transformation, but this may result in incorrect operation of the transformed code
Furthermore, users are often unaware whether specific semantics in the source code or transformed code are necessary and are hesitant to override the normal behavior of the compiler

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Performing aggressive code optimization with an ability to rollback changes made by the aggressive optimizations
  • Performing aggressive code optimization with an ability to rollback changes made by the aggressive optimizations
  • Performing aggressive code optimization with an ability to rollback changes made by the aggressive optimizations

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] The illustrative embodiments provide a mechanism that enables aggressive compiler optimizations in systems that support rollback of changes caused by aggressively compiled code (eg, systems that use transactional memory structures or other types of atomic operations). In some demonstrative embodiments, the mechanisms of the illustrative embodiments utilize the atomic behavior of the system (e.g., that of a transaction-based system) to determine whether aggressive compiler optimizations will result in incorrect operation of transformed and optimized code (e.g., Boundary condition violation, thread-level race condition, etc.), if the determination is positive, the changes caused by the execution of the aggressively optimized code are rolled back and replaced with a less optimized or non-optimized version of the code. Although a transaction-based system will be used as the basis for the description of the illustrative embodiments below, it should be understood that the inve...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

Mechanisms for aggressively optimizing computer code (415) are provided. With these mechanisms, executable code (415) is received having a portion of code for which an aggressively compiled code version (420) and a conservatively compiled code version (430) of the portion of code are provided. The aggressively compiled code version (420) of the portion of code is executed (610) in a processor (206) of the data processing system (450). A determination (620) is made as to whether an exception condition occurs during execution of the aggressively compiled code version (420). Changes to a state of the portion of code are rolled-back (630) in response to a determination (620) that an exception condition occurs. The conservatively compiled code version (430) in the processor (206) of the data processing system (450) is executed in response to rolling-back (630) changes to the state of the portion of code.

Description

[0001] This invention was made with United States Government support under Contract No. B554331 awarded by the United States Department of Energy. The US Government has certain rights in this invention. technical field [0002] The present application relates generally to an improved data processing apparatus and method, and more particularly to mechanisms for performing aggressive code optimization with the ability to roll back changes caused by aggressive optimization. Background technique [0003] Generally, for a program to be executed on a computing system, the program's source code is compiled and linked to produce executable code. As part of the compilation process, the compiler typically performs one or more optimizations on the source code to enable more efficient execution of the program. Although a compiler recognizes many opportunities to transform source code to optimize its execution, the compiler is usually limited in which optimizations it can perform, or wh...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/30
CPCG06F11/1497G06F11/1489G06F8/443
InventorM·K·格什温
OwnerIBM CORP