# US 2010/0169870 A1 · System and Method for Reducing Transactional Abort Rates Using Compiler Optimization Techniques

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2010/0169870 A1
- Document ID: US20100169870A1
- Status: Published application
- Kind: A1
- Application number: 12/345,189
- Filed: 2008-12-29
- Published: 2010-07-01
- Earliest claimed: 2008-12-29
- Assignees: Oracle America, Inc.
- Inventors: David Dice
- Web page: https://patentgrep.com/patent/US20100169870A1

## CPC

- G06F 8/4441: {Reducing the execution time required by the program code}
- G06F 9/467: {Transactional memory (G06F9/528 takes precedence)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In transactional memory systems, transactional aborts due to conflicts between concurrent threads may cause system performance degradation. A compiler may attempt to minimize runtime abort rates by performing one or more code transformations and/or other optimizations on a transactional memory program in an attempt to minimize one or more store-commit intervals. The compiler may employ store deferral, hoisting of long-latency operations from within a transaction body and/or store-commit interval, speculative hoisting of long-latency operations, and/or redundant store squashing optimizations. The compiler may perform optimizing transformations on source code and/or on any intermediate representation of the source code (e.g., parse trees, un-optimized assembly code, etc.). In some embodiments, the compiler may preemptively avoid naïve target code constructions. The compiler may perform static and/or dynamic analysis of a program in order to determine which, if any, transformations should be applied and/or may dynamically recompile code sections at runtime, based on execution analysis.

## Claims

### Claim 1

A computer-implemented method, comprising:
preparing an executable sequence of instructions corresponding to a source representation of code comprising an atomic transaction;
wherein said preparing comprises:
attempting to minimize a runtime interval between execution of a store instruction of the atomic transaction and an attempt to commit the atomic transaction.

### Claim 2 (depends on 1)

The method of claim 1, wherein said attempting comprises configuring the executable sequence to execute the store instruction only if the store instruction is configured to store a value into a memory location that does not already contain the value.

### Claim 3 (depends on 1)

The method of claim 1, wherein said attempting comprises attempting to minimize the number of instructions comprising a dynamic execution path of the executable sequence between the store instruction and the attempt to commit the atomic transaction.

### Claim 4 (depends on 1)

The method of claim 1, wherein said attempting comprises attempting to minimize a cumulative runtime of instructions comprising a dynamic execution path of the executable sequence between the store instruction and the attempt to commit the atomic transaction.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
performing a static analysis of the source representation;
wherein said attempting is dependent on the static analysis.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
performing dynamic analysis of the executable sequence of instructions;
wherein said attempting is dependent on the dynamic analysis.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
performing dynamic analysis of the executable sequence of instructions;
wherein said preparing is performed in response to the dynamic analysis.

### Claim 8 (depends on 1)

The method of claim 1, wherein said preparing further comprises:
attempting to minimize the number of infeasible transactions included in the executable sequence of instructions, wherein an infeasible transaction is a transaction that comprises at least one instruction that cannot be executed transactionally.

### Claim 9

A computer-readable storage medium storing program instructions executable by a processor in a multi-processor system to implement:
preparing an executable sequence of instructions corresponding to a source representation of code comprising an atomic transaction;
wherein said preparing comprises:
attempting to minimize a runtime interval between execution of a store instruction of the atomic transaction and an attempt to commit the atomic transaction.

### Claim 10 (depends on 9)

The storage medium of claim 9, wherein said attempting comprises configuring the executable sequence to execute the store instruction only if the store instruction is configured to store a value into a memory location that does not already contain the value.

### Claim 11 (depends on 9)

The storage medium of claim 9, wherein said attempting comprises attempting to minimize the number of instructions comprising a dynamic execution path of the executable sequence between the store instruction and the attempt to commit the atomic transaction.

### Claim 12 (depends on 9)

The storage medium of claim 9, wherein said attempting comprises attempting to minimize a cumulative runtime of instructions comprising a dynamic execution path of the executable sequence between the store instruction and the attempt to commit the atomic transaction.

### Claim 13 (depends on 9)

The storage medium of claim 9, wherein said attempting is dependent on one or more of: a static analysis of the source representation, or a dynamic analysis of the executable sequence of instructions.

### Claim 14 (depends on 9)

The storage medium of claim 9, wherein said preparing is performed in response to a dynamic analysis of the executable sequence of instructions.

### Claim 15

A system comprising:
two or more processors;
a memory coupled to the two or more processors and storing program instructions executable by two or more processors to implement:
preparing an executable sequence of instructions corresponding to a source representation of code comprising an atomic transaction;
wherein said preparing comprises:
attempting to minimize a runtime interval between execution of a store instruction of the atomic transaction and an attempt to commit the atomic transaction.

### Claim 16 (depends on 15)

The system of claim 15, wherein said attempting comprises configuring the executable sequence to execute the store instruction only if the store instruction is configured to store a value into a memory location that does not already contain the value.

### Claim 17 (depends on 15)

The system of claim 15, wherein said attempting comprises attempting to minimize the number of instructions comprising a dynamic execution path of the executable sequence between the store instruction and the attempt to commit the atomic transaction.

### Claim 18 (depends on 15)

The system of claim 15, wherein said attempting comprises attempting to minimize a cumulative runtime of instructions comprising a dynamic execution path of the executable sequence between the store instruction and the attempt to commit the atomic transaction.

### Claim 19 (depends on 15)

The system of claim 15, wherein said attempting is dependent on one or more of: a static analysis of the source representation, or a dynamic analysis of the executable sequence of instructions.

### Claim 20 (depends on 15)

The system of claim 15, wherein said preparing is performed in response to a dynamic analysis of the executable sequence of instructions.
