IP Library › Granted Patent US 9,110,691
Granted Patent B2
US 9,110,691 · App. 12/947,336 · Granted Aug 18, 2015

Compiler support technique for hardware transactional memory systems

Inventors: Jaewoong Chung (Bellevue, WA); Rahmet U. Karpuzcu (Urbana, IL); David S. Christie (Austin, TX); Michael P. Hohmuth (Dresden, DE); Stephan Diestelhorst (Dresden, DE); Martin T. Pohlack (Dresden, DE)
Assignee: Advanced Micro Devices, Inc.
G06F8/447G06F9/467
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,110,691
App. No.
12/947,336
Granted
Aug 18, 2015
Kind
B2
Abstract

A method and apparatus for compiling software written to be executed on a microprocessor that supports at least one hardware transactional memory function is provided. A compiler that supports at least one software transactional memory function is adapted to include a runtime system that maps between the at least one software transactional memory function and the at least one hardware transactional memory instruction.

Claims (34)

1. An apparatus for compiling software written to be executed on a microprocessor that supports at least one hardware transactional memory function, comprising:

a processor configured to implement:

a compiler, providing native software transactional memory (STM) support, to identify demarcations of atomic blocks of the software and to generate, based on the atomic blocks, assembly code annotated with STM functions; and

a shim layer to implement the STM functions using corresponding hardware transactional memory instructions and any necessary additional code to make the HTM instructions compatible with the STM functions,

wherein the STM functions include transaction boundary demarcation and memory barriers.

2. An apparatus, as set forth in claim 1 , wherein the STM functions include a function that begins a transaction and the shim layer maps the function that begins the transaction to at least a speculate instruction.

3. An apparatus, as set forth in claim 1 , wherein the STM functions include a function that ends a transaction and the shim layer maps the function that ends the transaction to a commit instruction.

4. An apparatus, as set forth in claim 1 , wherein memory barriers include a read barrier.

5. An apparatus, as set forth in claim 4 , wherein the shim layer is to map the read barrier to at least a LOCK MOV instruction.

6. An apparatus, as set forth in claim 1 , wherein the memory barriers include a write barrier.

7. An apparatus, as set forth in claim 6 , wherein the shim layer is to map the write barrier to at least a LOCK MOV instruction.

8. An apparatus, as set forth in claim 1 , wherein the STM functions include a function that begins a transaction and the shim layer maps the function that begins the transaction to a speculate instruction.

9. An apparatus, as set forth in claim 1 , wherein the processor is further configured to implement the shim layer as a runtime system.

10. A method for providing compiler support for at least one hardware transactional memory function, comprising:

providing a compiler, having native software transactional memory (STM) support, to identify demarcations of atomic blocks of a portion of software and generate, based on the atomic blocks, assembly code annotated with at least one STM function; and

providing a shim layer that implements the at least one STM function of the compiler using at least one HTM instruction and any additional code to needed to make the HTM instructions compatible with the STM functions,

wherein the at least one software transactional memory function is selected from a group including transactional boundary demarcation and memory barriers.

11. A method, as set forth in claim 10 , wherein the at least one software transactional memory function includes a function that begins a transaction and the shim layer maps the function that begins the transaction to at least a speculate instruction.

12. A method, as set forth in claim 10 , wherein the at least one software transactional memory function includes a function that ends a transaction and the shim layer maps the function that ends the transaction to a commit instruction.

13. A method, as set forth in claim 10 , wherein the at least one software transactional memory function includes a includes a read barrier.

14. A method, as set forth in claim 13 , wherein the shim layer maps the read barrier to a LOCK MOV instruction.

15. A method, as set forth in claim 10 , wherein the at least one software transactional memory function includes a write barrier.

16. A method, as set forth in claim 15 , wherein the shim layer maps the write barrier to a LOCK MOV instruction.

17. A method, as set forth in claim 10 , wherein the shim layer is a runtime system.

18. A non-transitory computer readable program storage device encoded with at least one instruction that, when executed by a computer, performs a method comprising:

identifying, by a compiler having native software transactional memory (STM) support, demarcations of atomic blocks of a portion of software; and

generating, by the compiler, assembly code based on the atomic blocks, the assembly code annotated with STM functions; and

providing a shim layer that implements the STM functions using corresponding hardware transactional memory (HTM) instructions and any additional code to needed to make the HTM instructions compatible with the STM functions,

wherein the STM functions include boundary demarcation and memory barriers.

19. A non-transitory computer readable program storage device, as set forth in claim 18 , wherein the STM functions include a function that begins a transaction and mapping comprises mapping the function that begins the transaction to a speculate instruction.

20. A non-transitory computer readable program storage device, as set forth in claim 18 , wherein the STM functions include a function that ends a transaction and mapping comprises mapping the function that ends the transaction to a commit instruction.

21. A non-transitory computer readable program storage device, as set forth in claim 18 , wherein the STM functions include a read barrier.

22. A non-transitory computer readable program storage device, as set forth in claim 18 , wherein mapping comprises mapping read barrier mapped to a LOCK MOV instruction.

23. A non-transitory computer readable program storage device, as set forth in claim 18 , wherein the STM functions include a write barrier.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 16, 2010
From: CHUNG, JAEWOONG; KARPUZCU, ULYA K.; CHRISTIE, DAVID S.; HOHMUTH, MICHAEL P.; DIESTELHORST, STEPHAN; POHLACK, MARTIN T.
To: ADVANCED MICRO DEVICES, INC.
Reel/Frame 025372/0519 →
Continuity (1)
Related Publication 20120124563A1 · May 17, 2012