Method for optimizing utilization of a cache memory
First Claim
1. A method of optimizing utilization of a cache memory unit in a computer system running a compiled computer program having loop instructions, said computer system having a main memory unit, which has an array of blocks of a predetermined block size, and having a cache memory unit with a multiplicity of blocks of said predetermined size, comprising the steps of:
- storing a set of compiled loop instructions of a compiled computer program in said main memory unit;
locating a set of compiled loop instructions which is stored in the main memory unit and which is smaller than the predetermined block size of said cache memory unit;
denoting the memory boundaries of said identified set of compiled loop instructions within said main memory unit;
moving the instructions of said located set of compiled loop instructions so that said instructions are stored within the boundaries of one of said predetermined blocks of said main memory unit;
loading said identified set of compiled loop instructions into said cache memory unit; and
running said identified set of loop instructions in said computer system;
thereby optimizing operation of said cache memory unit when said identified set of compiled loop instructions is loaded into said cache memory unit and the identified set of loop instructions is run in said computer system and cache misses are avoided for said identified set of loop instructions.
1 Assignment
0 Petitions
Accused Products
Abstract
A method is provided for minimizing cache misses in a compiled computer program having loop instructions. The compiled computer program is examined to identify a set of compiled loop instructions which is smaller than a cache memory block. The set of compiled loop instructions may straddle two blocks of main memory, which would cause cache misses when the program is executed. The identified set of compiled loop instructions is therefore positioned to fall entirely within the boundaries of a block of main memory so that cache misses are avoided when the set of compiled loop instructions is executed. Loop-invariant instructions are removed from the set of compiled loop instructions. When blocks of the main memory unit are mapped into the cache memory in a set-associative manner, external-call locations are mapped into different rows of the main memory then the corresponding loop instructions. As a result, when blocks of main memory are transferred to the cache memory unit, cache misses are avoided.
-
Citations
5 Claims
-
1. A method of optimizing utilization of a cache memory unit in a computer system running a compiled computer program having loop instructions, said computer system having a main memory unit, which has an array of blocks of a predetermined block size, and having a cache memory unit with a multiplicity of blocks of said predetermined size, comprising the steps of:
-
storing a set of compiled loop instructions of a compiled computer program in said main memory unit; locating a set of compiled loop instructions which is stored in the main memory unit and which is smaller than the predetermined block size of said cache memory unit; denoting the memory boundaries of said identified set of compiled loop instructions within said main memory unit; moving the instructions of said located set of compiled loop instructions so that said instructions are stored within the boundaries of one of said predetermined blocks of said main memory unit; loading said identified set of compiled loop instructions into said cache memory unit; and running said identified set of loop instructions in said computer system; thereby optimizing operation of said cache memory unit when said identified set of compiled loop instructions is loaded into said cache memory unit and the identified set of loop instructions is run in said computer system and cache misses are avoided for said identified set of loop instructions. - View Dependent Claims (2, 3, 4, 5)
-
Specification