Staged loop instructions
AssigneeAnalog Devices, Inc.
InventorsMichael G. Perkins, Andrew J. Higham
Life of this patent
Estimating the term…
Abstract
Loop instructions are analyzed and assigned stage numbers based on dependencies between them and machine resources available. The loop instructions are selectively executed based on their stage numbers, thereby eliminating the need for explicit loop set-up and tear-down instructions. On a Single Instruction, Multiple Data machine, the final instance of each instruction may be executed on a subset of the processing elements or vector elements, dependent on the number of iterations of the original loop.
Claims16
A method of executing a loop by a computer processor, the method comprising:
- loading loop kernel instructions for the loop into a memory of the computer processor, each loop kernel instruction having a stage number associated therewith;
- determining a stage threshold during each iteration of the loop;
- executing a loop prolog by executing subsets of the loop kernel instructions based on the stage threshold and stage numbers;
- executing a loop kernel by repeatedly executing the loop kernel instructions;
- and
- executing a loop epilog by executing a second set of subsets of the loop kernel instructions based on the stage threshold and stage numbers.
A system for executing computer-executable loop instructions, the system comprising:
- a sequencer for receiving a loop-setup instruction comprising loop information;
- a register or registers for storing data related to a stage threshold, the data being derived from the loop information;
- and
- a processing element for executing (i) a loop prolog by executing subsets of received loop kernel instructions based on the stage threshold and stage numbers associated with the loop kernel instructions, (ii) a loop kernel by repeatedly executing the loop kernel instructions, and (iii) a loop epilog by executing a second set of subsets of the loop kernel instructions based on the stage threshold and stage numbers.
Dependencies are inferred from the claim text.