IR Annotation Mapping for Internal Executable Code Locations
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods fail to accurately associate run-time locations in executable code that are not referenced by the global symbol table with corresponding intermediate representation (IR) entities, leading to incomplete analysis and optimization of software programs.
Innovation Solution
Adding internal annotation entries to the IR to propagate references to internal locations not referenced by the global IR symbol table, allowing these references to be updated during linking or loading to associate with run-time locations in the executable object.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If only global symbol table references are used to associate IR entities with executable code, then the symbol table structure remains simple and manageable, but internal locations in the executable code that are not referenced by the global symbol table cannot be accurately associated with corresponding IR entities
Solution Approach 1:
The patent segments the symbol reference system into two parts: the existing global symbol table for externally visible entities, and new internal annotation entries for internal locations. This segmentation allows comprehensive tracking of all IR entity references without overwhelming the global symbol table structure, thereby improving association accuracy while maintaining structural manageability.
Solution Approach 2:
The patent introduces internal annotation entries as an intermediary mechanism between the IR and executable code. These annotation entries serve as mediators that capture references to internal locations not visible in the global symbol table, enabling accurate association without requiring modifications to the existing global symbol table structure.
2Loss of information
If internal annotation entries are added to propagate references to internal locations, then all IR entity references can be tracked, but the IR program data structure becomes more complex
Solution Approach 1:
The patent applies preliminary action by adding internal annotation entries during the IR code generation phase, before compilation and linking. This allows all references to internal locations to be captured and propagated through the compilation pipeline in advance, ensuring complete information tracking without requiring complex post-processing mechanisms.
Solution Approach 2:
The patent uses copying by creating annotation entries that replicate reference information from the IR to the executable code. Instead of fundamentally restructuring the IR data structure, the system copies essential reference information into annotation entries that can be processed independently, thereby maintaining information completeness while minimizing structural complexity.
3Measurement precision
If annotation entries are updated during linking or loading, then accurate run-time location associations are achieved, but the linking and loading processes become more complex
Solution Approach 1:
The patent implements self-service by enabling the linking and loading processes to automatically update internal annotation entries with run-time location information. The annotation entries are designed to be self-updating during these standard processes, achieving accurate associations without requiring additional manual intervention or complex external management systems.
Solution Approach 2:
The patent applies universality by designing internal annotation entries to serve multiple functions: they track IR entity references during compilation, propagate through the compilation pipeline, and automatically receive run-time location updates during linking and loading. This multi-functionality allows accurate association to be achieved within existing standard processes without adding separate specialized mechanisms.
Data Source
AI summary
A system for generating executable code of a software program that is matched with an intermediate representation (IR) of a source code of the software program. The system comprises a processor adapted for adding one or more annotation entries, each for a location in the IR, to program data in the IR. An internal annotation entry is generated for an internal location in the IR that is not referenced by an IR symbol in the global IR symbol table of the IR. The processor is further adapted for compiling the IR to produce a binary object comprising the annotation entries, and providing the binary object to a linker or to a dynamic loader to update in an executable object an executable internal annotation entry associated with an internal annotation entry to reference a run-time location in the executable object.


