IP Library › Granted Patent US 7,870,544
Granted Patent B2
US 7,870,544 · App. 11/278,759 · Granted Jan 11, 2011

Insuring maximum code motion of accesses to DMA buffers

Assignee: International Business Machines Corporation
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 7,870,544
App. No.
11/278,759
Granted
Jan 11, 2011
Kind
B2
Abstract

A “kill” intrinsic that may be used in programs for designating specific data objects as having been “killed” by a preceding action is provided. The concept of a data object being “killed” is that the compiler is informed that no operations (e.g., loads and stores) on that data object, or its aliases, can be moved across the point in the program flow where the data object is designated as having been “killed.” The “kill” intrinsic limits the reordering capability of an optimization scheduler of a compiler with regard to operations performed on “killed” data objects. The “kill” intrinsic may be used with DMA operations. Data objects being DMA'ed from a local store of a processor may be “killed” through use of the “kill” intrinsic prior to submitting the DMA request. Data objects being DMA'ed to the local store of the processor may be “killed” after verifying the transfer completes.

Claims (30)

1. A method, in a data processing system, for optimizing code execution, comprising:

associating, in the code of a program, an instruction with a kill data object intrinsic specifying a data object of the instruction, wherein the instruction is a wait instruction in the code of the program that is used to wait for completion of an operation,

wherein if the operation is a Direct Memory Access (DMA) “get” operation then the kill data object intrinsic is placed prior to the wait instruction for waiting for the DMA “get” operation to complete, wherein if the operation is a DMA “put” operation then the kill data object intrinsic is placed after the wait instruction for waiting for the DMA “put” operation to complete, wherein the data object is a DMA buffer, wherein the DMA buffer is one of a plurality of DMA buffers, and wherein other DMA buffers are not associated with a kill data object intrinsic;

compiling the code of the program, wherein compiling the code of the program comprises performing an optimization operation for reordering instructions in a program flow of the code; and

restricting reordering of instructions in the program flow of the code that operate on the data object such that the instructions are not moved across a point in the program flow of the program where the data object is specified as having been killed by the kill data object intrinsic, wherein restricting reordering of instructions in the program flow of the code that operate on the data object comprises adding an entry to the killed data object list having an identifier of a point in the code where the kill data object intrinsic associated with the data object is encountered and using the killed data object list when optimizing the code for execution to determine if an instruction may be reordered.

2. The method of claim 1 , wherein the kill data object intrinsic defines a bather at a point in a program flow of the program that prevents operations on the data object from being reordered to a point prior to the barrier in the program flow.

3. The method of claim 1 , wherein the operation is one of a load operation or a store operation to a storage device.

4. The method of claim 1 , wherein instructions in the program flow of the code that do not operate on the data object are reordered by a compiler optimization scheduler.

5. The method of claim 1 , wherein the kill data object intrinsic specifics a pointer to the data object.

6. The method of claim 1 , wherein the data processing system is a system-on-a-chip that comprises a master processor and one or more co-processors.

7. A computer program product comprising a non-transitory computer useable medium having a computer readable program, wherein the computer readable program, when executed on a computing device, causes the computing device to:

associate, in the code of a program, an instruction with a kill data object intrinsic specifying a data object of the instruction, wherein the instruction is a wait instruction in the code of the program that is used to wait for completion of an operation, wherein if the operation is a Direct Memory Access (DMA) “get” operation then the kill data object intrinsic is placed prior to the wait instruction for waiting for the DMA “get” operation to complete, wherein if the operation is a DMA “put” operation then the kill data object intrinsic is placed after the wait instruction for waiting for the DMA “put” operation to complete, wherein the data object is a DMA buffer, wherein the DMA buffer is one of a plurality of DMA buffers, and wherein other DMA buffers are not associated with a kill data object intrinsic;

compile the code of the program, wherein compiling the code of the program comprises performing an optimization operation for reordering instructions in a program flow of the code; and

restrict reordering of instructions in the program flow of the code that operate on the data object such that the instructions are not moved across a point in the program flow of the program where the data object is specified as having been killed by the kill data object intrinsic, wherein restricting reordering of instructions in the program flow of the code that operate on the data object comprises adding an entry to the killed data object list having an identifier of a point in the code where the kill data object intrinsic associated with the data object is encountered and using the killed data object list when optimizing the code for execution to determine if an instruction may be reordered.

8. The computer program product of claim 7 , wherein the kill data object intrinsic defines a barrier at a point in a program flow of the program that prevents operations on the data object from being reordered to a point prior to the barrier in the program flow.

9. The computer program product of claim 7 , wherein the operation is one of a load operation or a store operation to a storage device.

10. The computer program product of claim 7 , wherein instructions in the program flow of the code that do not operate on the data object are reordered by a compiler optimization scheduler.

11. The computer program product of claim 7 , wherein the kill object intrinsic specifies a pointer to the data object.

12. The computer program product of claim 7 , wherein the data processing system is a system-on-a-chip that comprises a master processor and one or more co-processors.

13. An apparatus for optimizing code execution, comprising:

a processor; and

a memory coupled to the processor, wherein the memory comprises instructions that, when executed by the processor, cause the processor to:

associate, in the code of a program, an instruction with a kill data object intrinsic specifying a data object of the instruction, wherein the instruction is a wait instruction in the code of the program that is used to wait for completion of an operation, wherein if the operation is a Direct Memory Access (DMA) “get” operation then the kill data object intrinsic is placed prior to the wait instruction for waiting for the DMA “get” operation to complete, wherein if the operation is a DMA “put” operation then the kill data object intrinsic is placed after the wait instruction for waiting for the DMA “put” operation to complete, wherein the data object is a DMA buffer, wherein the DMA buffer is one of a plurality of DMA buffers, and wherein other DMA buffers are not associated with a kill data object intrinsic;

compile the code of the program, wherein compiling the code of the program comprises performing an optimization operation for reordering instructions in a program flow of the code; and

restrict reordering of instructions in the program flow of the code that operate on the data object such that the instructions are not moved across a point in the program flow of the program where the data object is specified as having been killed by the kill data object intrinsic, wherein restricting reordering of instructions in the program flow of the code that operate on the data object comprises adding an entry to the killed data object list having an identifier of a point in the code where the kill data object intrinsic associated with the data object is encountered and using the killed data object list when optimizing the code for execution to determine if an instruction may be reordered.

14. The apparatus of claim 13 , wherein the kill data object intrinsic defines a barrier at a point in a program flow of the program that prevents operations on the data object from being reordered to a point prior to the barrier in the program flow.

15. The apparatus of claim 13 , wherein the operation is one of a load operation or a store operation to a storage device.

16. The apparatus of claim 13 , wherein instructions in the program flow of the code that do not operate on the data object are reordered by a compiler optimization scheduler.

17. The apparatus of claim 13 , wherein the kill data object intrinsic specifies a pointer to the data object.

18. The apparatus of claim 13 , wherein the data processing system is a system-on-a-chip that comprises a master processor and one or more co-processors.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 12, 2006
From: BROKENSHIRE, DANIEL A.; O'BRIEN, JOHN K.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 017763/0415 →
Continuity (1)
Related Publication 20070240142A1 · Oct 11, 2007