Compiler having automatic common blocks of memory splitting
AssigneeSilicon Graphics, Inc.
InventorsDror E. Maydan, Sun C. Chan, James C. Dehnert, Jack C. Carter
Life of this patent
Estimating the term…
Abstract
In a computer system having a cache memory and a main memory for storing data, a method for laying out blocks of data to minimize a number of memory transfers between the cache memory and the main memory. Memory layout normally occurs at link time, after all the source files have been compiled. The code is compiled with the assumption that the memory blocks can be optimally placed. The linker then determines whether there has been any memory violations. Memory violations are marked. All marked memory locations are then placed in a layout that satisfies adjacency requirements.
Claims18
In a compiler, a method for optimizing memory accesses, comprising the steps of:
- compiling a source file into an object file, wherein memory locations are left unassigned;
- assigning memory locations at link time;
- determining whether an address layout assumption has occurred;
- if the address layout assumption has occurred, placing blocks of data with memory layout assumptions so that the blocks are adjacent;
- placing other blocks of data in a way that optimizes performance.
A computer system having a compiler for compiling source code into object code, wherein the compiler is comprised of:
- a converter for converting source files into object files, wherein common variables are assumed to be global and memory locations are assigned so that common blocks of data are spaced apart in memory in order to minimize memory accesses;
- a linker for linking the objects files together, wherein the linker determines whether an address assumption is violated due to splitting apart common blocks of data and if an address assumption does occur, the corresponding blocks of data are placed so that the blocks are adjacent to each other.
In a computer system having a cache memory and a main memory for storing data, a method for laying out blocks of data to minimize a number of memory transfers between the cache memory and the main memory, comprising the steps of:
- compiling source files into object files;
- laying out the blocks of memory so that memory addresses differing by powers of two are avoided;
- linking the compiled object files;
- determining whether two blocks of data have illegally been split apart;
- if the two blocks of data have been illegally split apart, placing the two blocks of data so that the blocks are adjacent to one another.
Dependencies are inferred from the claim text.