TRACKING VARIABLE INFORMATION IN OPTIMIZED CODE
First Claim
1. At a computer system including a processor and a memory, a computer-implemented method for tracking variable location information in optimized code, the method comprising:
- an act of receiving a portion of source code at a compiler, wherein the compiler is configured to compile and optimize the source code for execution;
an act of tagging one or more selected variables in the source code with a tag, wherein the tag is configured to provide location information for the variable;
an act of the compiler optimizing the received portion of source code, wherein optimizing at least includes changing one or more of the tagged variables;
an act of tracking the tagged variables as the variables are changed by the compiler during code optimization; and
an act of persisting the variable location information, such that the persisted variable location information is available to one or more other compiler components.
2 Assignments
0 Petitions
Accused Products
Abstract
Embodiments are directed to tracking variable location information in optimized code and efficiently collecting and storing reaching definition information. A computer system receives a portion of source code at a compiler, where the compiler is configured to compile and optimize the source code for execution. The computer system tags selected variables in the source code with a tag, where the tag is configured to provide location information for the variable. The computer system optimizes the received portion of source code including changing at least one of the tagged variables. The computer system also tracks the tagged variables as the variables are changed by the compiler during code optimization and persists the variable location information, so that the persisted variable location information is available to other compiler components.
-
Citations
20 Claims
-
1. At a computer system including a processor and a memory, a computer-implemented method for tracking variable location information in optimized code, the method comprising:
-
an act of receiving a portion of source code at a compiler, wherein the compiler is configured to compile and optimize the source code for execution; an act of tagging one or more selected variables in the source code with a tag, wherein the tag is configured to provide location information for the variable; an act of the compiler optimizing the received portion of source code, wherein optimizing at least includes changing one or more of the tagged variables; an act of tracking the tagged variables as the variables are changed by the compiler during code optimization; and an act of persisting the variable location information, such that the persisted variable location information is available to one or more other compiler components. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A computer program product for implementing a method for efficiently collecting and storing reaching definition information, the computer program product comprising one or more computer-readable storage media having stored thereon computer-executable instructions that, when executed by one or more processors of the computing system, cause the computing system to perform the method, the method comprising:
-
an act of accessing at least a portion of persisted variable location information; an act of calculating one or more reaching definitions for one or more different variables implemented by a compiler during code optimization, wherein the reaching definitions comprise sets of instructions for which the variables possess an indicated location, such that each variable that is written to is represented by its reaching definition; an act of compressing at least one of the calculated reaching definitions using a domain-specific compression algorithm; and an act of sending the compressed reaching definitions from the compiler to the debugger for display to the user. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19)
-
-
20. A computer system comprising the following:
-
one or more processors; system memory; one or more computer-readable storage media having stored thereon computer-executable instructions that, when executed by the one or more processors, causes the computing system to perform a method for tracking variable location information in optimized code, the method comprising the following; an act of receiving a portion of source code at a compiler, wherein the compiler is configured to compile and optimize the source code for execution; an act of tagging one or more selected variables in the source code with a tag, wherein the tag is configured to provide location information for the variable; an act of the compiler optimizing the received portion of source code, wherein optimizing at least includes changing one or more of the tagged variables; an act of tracking the tagged variables as the variables are changed by the compiler during code optimization; an act of persisting the variable location information, such that the persisted variable location information is available to one or more other compiler components; an act of compressing the persisted variable location information using a domain-specific compression algorithm; an act of a debugger decompressing the compressed variable location information; and an act of the debugger displaying the decompressed variable location information to a user.
-
Specification