Compiler implementation of lock/unlock using hardware transactional memory
First Claim
1. A method executable by a processor for parallelizing code using transaction memory comprising:
- examining one or more program instructions;
identifying a transaction synchronization region (TSR) within said program instructions, wherein the TSR accesses a shared region of memory within a shared memory;
performing no transformation of the TSR, in response to predicting a transformed TSR will fail during execution; and
in response to predicting a transformed TSR will not fail during execution;
replacing the TSR with a first portion of code and a second portion of code, wherein the first portion of code is configured to access the shared region without lock and unlock function calls and without software transactional memory semantics;
executing the first portion of code without disabling existing hardware transactional memory support; and
said first portion calling said second portion to perform a failure handling routine in response to an indication a failure occurs within said first portion.
2 Assignments
0 Petitions
Accused Products
Abstract
A system and method for automatic efficient parallelization of code combined with hardware transactional memory support. A software application may contain a transaction synchronization region (TSR) utilizing lock and unlock transaction synchronization function calls for a shared region of memory within a shared memory. The TSR is replaced with two portions of code. The first portion comprises hardware transactional memory primitives in place of lock and unlock function calls. Also, the first portion ensures no other transaction is accessing the shared region without disabling existing hardware transactional memory support. The second portion performs a fail routine, which utilizes lock and unlock transaction synchronization primitives in response to an indication that a failure occurs within said first portion.
33 Citations
20 Claims
-
1. A method executable by a processor for parallelizing code using transaction memory comprising:
-
examining one or more program instructions; identifying a transaction synchronization region (TSR) within said program instructions, wherein the TSR accesses a shared region of memory within a shared memory; performing no transformation of the TSR, in response to predicting a transformed TSR will fail during execution; and in response to predicting a transformed TSR will not fail during execution; replacing the TSR with a first portion of code and a second portion of code, wherein the first portion of code is configured to access the shared region without lock and unlock function calls and without software transactional memory semantics; executing the first portion of code without disabling existing hardware transactional memory support; and said first portion calling said second portion to perform a failure handling routine in response to an indication a failure occurs within said first portion. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A computer system comprising:
-
a processor; and a memory configured to store first program instructions and second program instructions; wherein the processor is configured assign software threads to waiting hardware threads and to execute said first program instructions to; examine said second program instructions; identify a transaction synchronization region (TSR) within said second program instructions, wherein the TSR accesses a shared region of memory within a shared memory; perform no transformation of the TSR, in response to predicting a transformed TSR will fail during execution; and in response to predicting a transformed TSR will not fail during execution; replace the TSR with a first portion of code and a second portion of code, wherein the first portion of code is configured to access the shared region without lock and unlock function calls and without software transactional memory semantics; and execute the first portion of code without disabling existing hardware transactional memory support; and cause said first portion to call said second portion to perform a failure handling routine in response to an indication a failure occurs within said first portion. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. A non-transitory computer readable storage medium storing program instructions operable to parallelize code combined with hardware transactional memory support, wherein the program instructions are executable to:
-
examine one or more program instructions; identify a transaction synchronization region (TSR) within said program instructions, wherein the TSR accesses a shared region of memory within a shared memory; perform no transformation of the TSR, in response to predicting a transformed TSR will fail during execution; and in response to predicting a transformed TSR will not fail during execution; replace the TSR with a first portion of code and a second portion of code, wherein the first portion of code is configured to access the shared region without lock and unlock function calls and without software transactional memory semantics; and execute the first portion of code without disabling existing hardware transactional memory support; and cause said first portion to call said second portion to perform a failure handling routine in response to an indication a failure occurs within said first portion. - View Dependent Claims (18, 19, 20)
-
Specification