Compiler that reduces call stack size through identification of stackless variables
First Claim
1. An apparatus comprising:
- a processor;
memory connected to said processor; and
a program stored in said memory, said program executing on said processor, said program containing a variable, said variable being stackless relative to at least one call statement contained in said program, said program storing said variable in said memory only when said variable is not considered stackless.
1 Assignment
0 Petitions
Accused Products
Abstract
The present invention uses an optimizing compiler to identify what are referred to herein as stackless variables. A variable is said to be stackless for a given call statement if the calling program does not have a need for the information stored in the variable when the calling program resumes execution after the program that is the subject of the call statement returns control of the processor to the calling program. The decision of whether a variable is stackless or not for a given call statement is made within the preferred embodiment by determining whether the live range of the particular variable spans the location of the call statement in question. If a variable'"'"'s live range is found to cross the location of the call statement, it is not considered stackless. However, if a variable'"'"'s live range is not found to cross the location of the call statement, it is considered to be stackless for that particular call statement.
39 Citations
18 Claims
-
1. An apparatus comprising:
-
a processor; memory connected to said processor; and a program stored in said memory, said program executing on said processor, said program containing a variable, said variable being stackless relative to at least one call statement contained in said program, said program storing said variable in said memory only when said variable is not considered stackless. - View Dependent Claims (2)
-
-
3. A program product, said program product comprising:
-
a program, said program being capable of executing on a processor, said program containing a variable, said variable being stackless relative to at least one call statement contained in said program, said program storing said variable in said memory only when said variable is not considered stackless; and signal bearing media, said signal bearing media bearing said program. - View Dependent Claims (4, 5, 6)
-
-
7. An apparatus, said apparatus comprising:
-
a processor; memory connected to said processor; and a compiler stored in said memory, said compiler being used to compile source code, said compiler determining that a variable within said source code is stackless. - View Dependent Claims (8, 9)
-
-
10. A program product, said program product comprising:
-
a compiler stored in said memory, said compiler being used to compile source code, said compiler determining that a variable within said source code is stackless; and signal bearing media, said signal bearing media bearing said compiler. - View Dependent Claims (11, 12, 13, 14)
-
-
15. A computer-implemented method, said method comprising the steps of:
-
accessing source code; and identifying a variable as stackless in said source code. - View Dependent Claims (16)
-
-
17. A computer-implemented method, said method comprising the step of:
-
invoking a program, said program containing a variable, said program storing said variable when said variable is considered stackless; and terminating execution of said program. - View Dependent Claims (18)
-
Specification