Compiler method of exploiting data value locality for computation reuse

US9361078B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-9361078-B2
Application numberUS-68809007-A
CountryUS
Kind codeB2
Filing dateMar 19, 2007
Priority dateMar 19, 2007
Publication dateJun 7, 2016
Grant dateJun 7, 2016

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

A compiler method for exploiting data value locality for computation reuse. When a code region having single entry and exit points and in which a potential computation reuse opportunity exists is identified during runtime, a helper thread is created separate from the master thread. One of the helper thread and master thread performs a computation specified in the code region, and the other of the helper thread and master thread looks up a value of the computation previously executed and stored in a lookup table. If the value of the computation previously executed is located in the lookup table, the other thread retrieves the value from the table, and ignores the computation performed by the thread. If the value of the computation is not located, the other thread obtains a result of the computation performed by the thread and stores the result in the lookup table for future computation reuse.

First claim

Opening claim text (preview).

What is claimed is: 1. A computer implemented method for computation reuse in a region of software code, the computer implemented method comprising: identifying a region of software code during runtime which has single entry and exit points and in which a potential computation reuse opportunity exists; creating a helper thread separate from a master thread for the region of software code, wherein one of the helper thread and master thread performs a computation specified in the region of software code, and wherein the other of the helper thread and master thread looks up a value of the computation previously executed and stored in a lookup table; responsive to the other of the helper thread and master thread locating the value of the computation previously executed in the lookup table, retrieving the value from the lookup table, wherein the other of the helper thread and master thread ignores the computation performed by the one of the helper thread and master thread; and responsive to a failure of the other of the helper thread and master thread to locate the value of the computation in the lookup table, obtaining a result of the computation performed by the one of the helper thread and master thread and storing the result in the lookup table for future computation reuse. 2. The computer implemented method of claim 1 , wherein a potential computation reuse opportunity exists if the region of software code comprises a data value locality. 3. The computer implemented method of claim 1 , further comprising: creating a pool of helper threads when the software code is initialized, wherein each helper thread waits to receive a work item comprising an outlined procedure and corresponding input parameters from the master thread. 4. The computer implemented method of claim 3 , further comprising: marking a helper thread as unavailable when the helper thread receives a work item from the master thread. 5. The computer implemented method of claim 1 , further comprising: automatically caching the result of the computation performed by the one of the helper thread and master thread. 6. The computer implemented method of claim 1 , further comprising: responsive to a failure to identify a region of software code during runtime in which a potential computation reuse opportunity exists, ceasing the computation reuse. 7. A computer implemented method for generating multiple thread code for computation reuse, the computer implemented method comprising: identifying code regions in a computer program which have single entry and exit points and are executed with data value locality; estimating a profitability cost of performing computations of each identified code region; building a candidate list of the code regions for computation reuse based on the estimated profitability cost; outlining the code regions in the candidate list; building a lookup table to hold values of computations performed for the code regions in the candidate list; embedding the code regions in the candidate list with a procedure which spawns a helper thread, wherein an embedded procedure is created, wherein one of the helper thread and a master thread performs computations in the code regions while the other of the helper thread and master thread performs a lookup to locate values of the computations previously stored in the lookup table; and generating multiple thread code comprising the embedded procedure. 8. The computer implemented method of claim 7 , wherein identifying a code region further comprises: building a call graph for each process in the computer program; identifying variables in the code regions which show data value locality; and determining values of computations for the identified variables. 9. The computer implemented method of claim 8 , wherein the call graph represents calling relationships among subroutines in the computer program. 10. The computer implemented method of claim 8 , wherein building the call graph includes building a control flow graph and a data flow graph. 11. The computer implemented method of claim 8 , wherein the values are determined using dynamic value profiling. 12. The computer implemented method of claim 7 , wherein the code region is a subset of another code region. 13. The computer implemented method of claim 7 , further comprising: responsive to a determination that no data value locality exists for a given code region, terminating the computation reuse. 14. A data processing system for computation reuse in a region of software code, the data processing system comprising: a bus; a storage device coupled to the bus, wherein the storage device contains computer usable code; at least one managed device coupled to the bus; a communications unit coupled to the bus; and a processing unit coupled to the bus, wherein the processing unit executes the computer usable code to identify a region of software code during runtime which has single entry and exit points and in which a potential computation reuse opportunity exists; create a helper thread separate from a master thread for the region of software code to cause one of the helper thread and master thread to perform a computation specified in the region of software code and to cause the other of the helper thread and master thread to look up a value of the computation previously executed and stored in a lookup table; retrieve the value from the lookup table in response to the other of the helper thread and master thread locating the value of the computation previously executed in the lookup table, wherein the other of the helper thread and master thread ignores the computation performed by the one of the helper thread and master thread; and, in response to a failure of the other of the helper thread and master thread to locate the value of the computation in the lookup table, obtain a result of the computation performed by the one of the helper thread and master thread and store the result in the lookup table for future computation reuse. 15. A data processing system for generating multiple thread code for computation reuse, the data processing system comprising: a bus; a storage device coupled to the bus, wherein the storage device contains computer usable code; at least one managed device coupled to the bus; a communications unit coupled to the bus; and a processing unit coupled to the bus, wherein the processing unit executes the computer usable code to identify code regions in a computer program which have single entry and exit points and are executed with data value locality; estimate a profitability cost of performing computations of each identified code region; build a candidate list of the code regions for computation reuse based on the estimated profitability cost; outline the code regions in the candidate list; build a lookup table to hold values of computations performed for the code regions in the candidate list; embed the code regions in the candidate list with a procedure which spawns a helper thread to create an embedded procedure, wherein one of the helper thread and a master thread performs computations in the code regions while the other of the helper thread and master thread performs a lookup to locate values of the computations previously stored in the lookup table; and generate multiple thread code comprising the embedded procedure. 16. A non-transitory computer readable storage medium storing a computer program product for computation reuse in a region of software code, the computer program product comprising: computer usable program code for identifying a region of software code during runtime w

Assignees

Inventors

Classifications

  • from multiple instruction streams, e.g. multistreaming · CPC title

  • Operand prefetching (cache prefetching G06F12/0862) · CPC title

  • G06F8/4441Primary

    Reducing the execution time required by the program code · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US9361078B2 cover?
A compiler method for exploiting data value locality for computation reuse. When a code region having single entry and exit points and in which a potential computation reuse opportunity exists is identified during runtime, a helper thread is created separate from the master thread. One of the helper thread and master thread performs a computation specified in the code region, and the other of t…
Who is the assignee on this patent?
Gao Yaoqing, Hu Liangxiao, Zhang Guansong, and 2 more
What technology area does this patent fall under?
Primary CPC classification G06F8/4441. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Jun 07 2016 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 8 related publications on this page (citations in our corpus or others sharing the same primary CPC).