Patent ID: 6129460
Filing Date: 2000-10-10
Classification: G06F

Abstract:
A computer-implemented method for selecting optimal pointer kinds in a compiler during an operation of compiling a source program into machine instructions for a target computer, said method comprising the steps of:a. parsing said source program in order to create variable objects and expression objects including their sub-expression objects;b. reducing each of said expression objects a first time to determine the kinds of pointers that can be given as an expression result and the kinds of pointers that can be taken from each of said sub-expression objects;c. inlining calls on inline functions, including creating copies of each of said expression objects representing a function being inlined into the place of a call on said function and reducing said copies of expression objects to determine the kinds of pointers that can be given as an expression result and the kinds of pointers that can be taken from each of said sub-expression objects;d. determining storage allocation for variable objects based on kinds of pointers used;e. reducing each of said expression objects a final time, including inlined copies, thereby causing all pointer kinds to become known; and,f. generating machine instructions based on known kinds and allocations.