Optimizing source code for iterative execution -> Monitor Keywords
Fresh Patents
Monitor Patents Patent Organizer File a Provisional Patent Browse Inventors Browse Industry Browse Agents Browse Locations
site info Site News  |  monitor Monitor Keywords  |  monitor archive Monitor Archive  |  organizer Organizer  |  account info Account Info  |  
01/31/08 - USPTO Class 717 |  64 views | #20080028381 | Prev - Next | About this Page  717 rss/xml feed  monitor keywords

Optimizing source code for iterative execution

USPTO Application #: 20080028381
Title: Optimizing source code for iterative execution
Abstract: An embodiment of the present invention provides an optimizer for optimizing source code to generate optimized source code having instructions for instructing a central processing unit (CPU) to iteratively compute values for a primary recurrence element. A computer programmed loop for computing the primary recurrence element and subsequent recurrence elements is an example of a case involving iteratively computing the primary recurrence element. The CPU is operatively coupled to fast operating memory (FOM) and operatively coupled to slow operating memory (SOM). SOM stores the generated optimized source code. The optimized source code includes instructions for instructing said CPU to store a computed value of the primary recurrence element in a storage location of FOM. The instructions also includes instructions to consign the computed value of the primary recurrence element from the storage location to another storage location of the FOM. (end of abstract)



Agent: Ibm Corp (ap) C/o Amy Pattillo - Austin, TX, US
Inventors: ROCH GEORGES ARCHAMBAULT, ROBERT JAMES BLAINEY, CHARLES BRIAN HALL, YINGWEI ZHANG
USPTO Applicaton #: 20080028381 - Class: 717152000 (USPTO)

Related Patent Categories: Data Processing: Software Development, Installation, And Management, Software Program Development Tool (e.g., Integrated Case Tool Or Stand-alone Development Tool), Translation Of Code, Compiling Code, Optimization, Static (source Or Intermediate Level)

Optimizing source code for iterative execution description/claims


The Patent Description & Claims data below is from USPTO Patent Application 20080028381, Optimizing source code for iterative execution.

Brief Patent Description - Full Patent Description - Patent Application Claims
  monitor keywords

FIELD OF THE INVENTION

[0001] This invention relates to optimizing source code and more specifically to optimizing source code having instructions for iterative execution by a central processing unit.

BACKGROUND OF THE INVENTION

[0002] Known to the inventor, which is depicted in FIG. 1, is a computing environment for executing executable code including a computer program programmed loop having related instructions. The computing environment includes computer system 112 having CPU (Central Processing Unit) 116 and memory 114 operatively connected to CPU 116.

[0003] Memory 114 stores source code 100, compiler 118, executable code 120, and memory storage locations 122. Typically, compiler 118 and source code 100 reside or are stored in long-term memory (not depicted) such as a hard disk or a floppy disk. As directed by a user, CPU 116 transfers compiler 118 and source code 100 from long-term memory to memory 114. Once transferred to memory 114, compiler 118 instructs CPU 116 to compile source code 100 to generate executable code 120. Typically, memory 114 is RAM (Random Access Memory).

[0004] Source code 100 includes computer programmed instructions written in a computer programming language. Instructions forming source code 100 are used for instructing CPU 116 to achieve or perform specific tasks. Source code 100 includes start instructions 102 for starting operations of CPU 116, set of instructions 104 (which will be executed once by CPU 116), computer programmed loop 105 having instructions 106 (which will be repeatedly executed "N-1" times by CPU 116) for computing numerical values of various array elements, and stop instructions 110 for stopping execution of source code 100.

[0005] Executable code 120 includes executable instructions related to loop 105 for instructing or directing CPU 116 to compute numerical values for the elements of array A[1], A[2], A [3], . . . , A[N-1], provided that a numerical value for array element A[0] exists prior to the commencement of computation. When CPU 116 executes executable code 120, the compiled instructions related to block 102 are initially executed, followed by the execution of the compiled instructions related to block 104 and block 105, and then followed by the execution of the compiled instructions of block 110. CPU 116 will repetitively execute the compiled instructions of computer programmed loop 105 for a predetermined number of executions. For each iterative step of a computer programmed loop, a numerical value of an array element (such as A[i]) is computed by CPU 116 which then will store the computed numerical value to a memory storage location 122 (before CPU computes another numerical value for another array element).

[0006] A computer programmed loop is a series of instructions which are performed repeatedly until some specific condition is satisfied, whereupon a branch instruction is obeyed to exit from the computer programmed loop. The branch instruction specifies the address of the next instruction to be performed by a CPU. Computer programmed loop 105 includes instructions for repeated execution by CPU 116. Computer programmed loops are also known as strongly connected regions. Computer programmed loop 105 includes an induction variable (depicted as "i") which has a related induction value that changes for each iterated or repeated step of computer programmed loop 105. For each iterated step of computer programmed loop 105, the induction value is changed in a predetermined manner, such as adding a numerical value of `1` to a current induction value related to a current iterated step. As shown in FIG. 1, for each iterative step of the computer programmed loop, computation 106 will be performed by CPU 116 in which a value for an array element A[i] in block 107 will be computed by adding the value of a previously computed array element A[i-1] plus the numerical value of "1". The computational task is depicted in block 108. Typically, the changed induction value is subsequently used in a next iterative step for modifying the instructions related to the next iterated step. Computer programmed loop 105 provides a convenient way to avoid repeatedly expressing repetitive instructions by expressing the instructions once. It is understood that CPU 116 will repeatedly execute the instructions of computer programmed loop `N-1` times. This conveniently allows a software programmer to avoid explicitly writing the instructions `N-1` times. Disadvantageously, a significant amount of CPU processing time will be spent executing the compiled instructions of computer programmed loop 105.

[0007] It will be understood that for each iterative step of computer programmed loop 105, executable code 120 instructs CPU 116 to obtain (load/read) a value of an array element A[i-1] from a specific location in memory storage locations 122, to add a numerical value of "1" to array element A[i-1], and to place (store/write) the computational result (that is array element A[i]) to another specific location in memory storage location 122. Disadvantageously, computer programmed loop 105 requires, with each iterative step of an induction variable, CPU 116 to load/read various recurrence elements from main memory, compute a value for a primary recurrence element, and then store/write the primary recurrence element to the main memory (such as locations 122). Recurrence elements are values which are re-computed for each iterative step of a computation process. An example of a computation process which re-computes values of recurrence elements is a computer programmed loop which computes various array elements (which act like recurrence elements) for each step of the loop. This is an inefficient system for computing or processing values (such as numerical data or alphanumeric data) associated with a computer programmed loop because time is wasted when the CPU interacts with slow operating memory when performing a multitude of load/read or store/write operations for each iterative step of the computer programmed loop. Additionally, if storage locations 122 are storage locations in nonvolatile memory (that is not RAM), the effects are exaggerated.

[0008] Accordingly, a system which addresses, at least in part, these and other shortcomings is desired.

SUMMARY OF THE INVENTION

[0009] An object of the present invention is to reduce the amount of CPU processing time to be spent executing compiled instructions of a computer programmed loop.

[0010] Another object of the present invention is to construct a computer programmed loop that reduces the need to repetitively require a CPU to load/read values of recurrence elements from slow operating memory for computing a value for a primary recurrence element.

[0011] An embodiment of the present invention provides an optimizer for optimizing source code to generate optimized source code having instructions for instructing a central processing unit (CPU) to iteratively compute values for a primary recurrence element. A computer programmed loop for computing the primary recurrence element and subsequent recurrence elements is an example of a case involving iteratively computing the primary recurrence element. The CPU is operatively coupled to fast operating memory (FOM) and operatively coupled to slow operating memory (SOM). SOM stores the generated optimized source code. The optimized source code includes instructions for instructing said CPU to store a computed value of the primary recurrence element in a storage location of FOM. The instructions also includes instructions to consign the computed value of the primary recurrence element from the storage location to another storage location of the FOM.

[0012] Another embodiment of the present invention provides an optimization mechanism for optimizing computer programmed instructions which direct a Central Processing Unit (CPU) to iteratively compute values for a primary recurrence value based on the values of various recurrence elements. The computer programmed instructions direct the CPU to alternatively execute load/read and store write instructions which transfer computed recurrence values between main memory and fast operating memory for each iteration. The optimized computer programmed instructions direct the CPU to execute a single read/load instruction for moving initial recurrence values from main memory to fast operating memory. For each subsequent iteration, the instructions direct the CPU to compute and store/write final values of recurrence elements to main memory, and direct the CPU to setup subsequently required values of recurrence elements by interchanging loaded values of recurrence elements in fast operating memory. The optimization mechanism can be incorporated with a compiler for compiling the optimized code to generate optimized executable code for execution by the CPU.

[0013] Another embodiment of the present invention provides a compiler for compiling computer programmed instructions that will be iteratively executed by a CPU. An example of computer programmed instructions to be iteratively executed are instructions associated with a computer programmed loop. The computer programmed loop is also known as a `strongly connected region` because the `region` of instructions or code is to be re-executed in response to the CPU repeatedly executing a branching instruction. The compiler includes mechanisms for detecting when a branching instruction occurs such that a portion of code is being repeated. The compiler can detect whether a value associated with variable within the portion of code is required to change with each iterative step (that is each time the branching operation occurs).

[0014] In a first aspect of the present invention, there is provided an optimizer for optimizing source code to generate optimized source code having instructions for instructing a central processing unit (CPU) to iteratively compute values for a recurrence element, the CPU operatively coupled to fast operating memory (FOM) and operatively coupled to slow operating memory (SOM) for storing the generated optimized source code, wherein the generated optimized source code comprises instructions for instructing the CPU to store a computed value of the recurrence element in a storage location of the FOM for use in a further iteration.

[0015] In a further aspect of the present invention, there is provided a method for optimizing source code to generate optimized source code having instructions for instructing a central processing unit (CPU) to iteratively compute values for a recurrence element, the CPU operatively coupled to fast operating memory (FOM) and operatively coupled to slow operating memory (SOM) for storing the generated optimized source code, wherein the generated optimized source code comprises instructions for instructing the CPU to store a computed value of the recurrence element in a storage location of the FOM for use in a further iteration.

[0016] In a further aspect of the present invention, there is provided a computer program product for use in a computer system operatively coupled to a computer readable memory, the computer program product including a computer-readable data storage medium tangibly embodying computer readable program instructions for providing an optimizer for optimizing source code to generate optimized source code having instructions for instructing a central processing unit (CPU) to iteratively compute values for a recurrence element, the CPU operatively coupled to fast operating memory (FOM) and operatively coupled to slow operating memory (SOM) for storing the generated optimized source code, wherein the generated optimized source code comprises instructions for instructing the CPU to store a computed value of the recurrence element in a storage location of the FOM for use in a further iteration.

[0017] In a further aspect of the present invention, there is provided a computer program product for use in a computer system operatively coupled to a computer readable memory, the computer program product including a computer-readable data storage medium tangibly embodying computer readable program instructions for providing a method for optimizing source code to generate optimized source code having instructions for instructing a central processing unit (CPU) to iteratively compute values for a recurrence element, the CPU operatively coupled to fast operating memory (FOM) and operatively coupled to slow operating memory (SOM) for storing the generated optimized source code, wherein the generated optimized source code comprises instructions for instructing the CPU to store a computed value of the recurrence element in a storage location of the FOM for use in a further iteration.

[0018] In a further aspect of the present invention, there is provided an optimizer for generating optimized source code from source code including code for instructing a central processing unit (CPU) to compute a primary recurrence element, the CPU operatively coupled to fast operating memory (FOM) and slow operating memory (SOM) for storing the generated optimized source code, including means for replacing instructions to direct the CPU to store a computed value of the primary recurrence element in a storage location of the SOM with instructions to direct the CPU to place the computed value of the primary recurrence element in a storage location of the FOM, and means for inserting instructions to direct the CPU to consign a value of the primary recurrence element loaded in the storage location of the FOM to another storage location of the FOM.

[0019] In a further aspect of the present invention, there is provided a method for generating optimized source code from source code including code for instructing a central processing unit (CPU) to compute a primary recurrence element, the CPU operatively coupled to fast operating memory (FOM) and slow operating memory (SOM) for storing the generated optimized source code, the method including replacing instructions to direct the CPU to store a computed value of the primary recurrence element in a storage location of the SOM with instructions to direct the CPU to place the computed value of the primary recurrence element in a storage location of the FOM, and inserting instructions to direct the CPU to consign a value of the primary recurrence element loaded in the storage location of the FOM to another storage location of the FOM.

[0020] In a further aspect of the present invention, there is provided a computer program product for use in a computer system operatively coupled to a computer readable memory, the computer program product including a computer-readable data storage medium tangibly embodying computer readable program instructions for providing an optimizer for generating optimized source code from source code including code for instructing a central processing unit (CPU) to compute a primary recurrence element, the CPU operatively coupled to fast operating memory (FOM) and slow operating memory (SOM) for storing the generated optimized source code, including means for replacing instructions to direct the CPU to store a computed value of the primary recurrence element in a storage location of the SOM with instructions to direct the CPU to place the computed value of the primary recurrence element in a storage location of the FOM, and means for inserting instructions to direct the CPU to consign a value of the primary recurrence element loaded in the storage location of the FOM to another storage location of the FOM.

[0021] In a further aspect of the present invention there is provided a computer program product for use in a computer system operatively coupled to a computer readable memory, the computer program product including a computer-readable data storage medium tangibly embodying computer readable program instructions for providing a method for generating optimized source code from source code including code for instructing a central processing unit (CPU) to compute a primary recurrence element, the CPU operatively coupled to fast operating memory (FOM) and slow operating memory (SOM) for storing the generated optimized source code, the method including replacing instructions to direct the CPU to store a computed value of the primary recurrence element in a storage location of the SOM with instructions to direct the CPU to place the computed value of the primary recurrence element in a storage location of the FOM, and inserting instructions to direct the CPU to consign a value of the primary recurrence element loaded in the storage location of the FOM to another storage location of the FOM.

Continue reading about Optimizing source code for iterative execution...
Full patent description for Optimizing source code for iterative execution

Brief Patent Description - Full Patent Description - Patent Application Claims

Click on the above for other options relating to this Optimizing source code for iterative execution patent application.
###
monitor keywords

How KEYWORD MONITOR works... a FREE service from FreshPatents
1. Sign up (takes 30 seconds). 2. Fill in the keywords to be monitored.
3. Each week you receive an email with patent applications related to your keywords.  
Start now! - Receive info on patent apps like Optimizing source code for iterative execution or other areas of interest.
###


Previous Patent Application:
Utilizing prior usage data for software build optimization
Next Patent Application:
Dynamic optimization of prepared statements in a statement pool
Industry Class:
Data processing: software development, installation, and management

###

FreshPatents.com Support
Thank you for viewing the Optimizing source code for iterative execution patent info.
IP-related news and info


Results in 0.15143 seconds


Other interesting Feshpatents.com categories:
Software:  Finance AI Databases Development Document Navigation Error 174
filepatents (1K)

* Protect your Inventions
* US Patent Office filing
patentexpress PATENT INFO