IR Annotation Mapping for Internal Run-Time Code Locations
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods fail to accurately associate run-time locations in executable software objects with internal locations in the intermediate representation (IR) that are not referenced by the global IR symbol table, limiting the accuracy of analysis and optimization of software programs.
Innovation Solution
Add annotation entries to the IR program data for internal locations not referenced by the global IR symbol table, which are propagated to the executable object, allowing run-time locations to be referenced and updated during linking or loading, thereby associating internal IR locations with corresponding run-time locations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If annotation entries are added to IR program data for internal locations not referenced by the global IR symbol table, then the accuracy of associating run-time locations with internal IR entities is improved, but the complexity of the IR program data and processing is increased
Solution Approach 1:
Annotation entries are added to the IR program data during the compilation phase, before the executable object is created. This preliminary action ensures that internal locations are marked with annotation information that will later enable accurate association with run-time locations, without requiring complex processing during execution
Solution Approach 2:
Annotation entries serve as an intermediary mechanism between the IR program data and the executable object. These entries carry information about internal locations through the compilation and linking process, enabling the association of run-time locations with internal IR entities without direct complex interactions between the systems
2Measurement precision
If annotation entries are propagated to the executable object and updated during linking or loading, then the accuracy of location association is improved, but the processing time and complexity of linking/loading is increased
Solution Approach 1:
Annotation entries are prepared and attached to the relevant data structures during the compilation phase, before the linking or loading process begins. This preliminary preparation reduces the workload during linking/loading, as the annotation information is already in place and only needs to be propagated and updated with run-time locations
Solution Approach 2:
The linking and loading processes automatically propagate and update the annotation entries with run-time location information without requiring external intervention or complex additional processing. The system uses its existing mechanisms to handle the annotation propagation, minimizing additional time overhead
Data Source
Figure 1
Figure 2
Figure 3
AI summary
A system for generating executable code, comprising a hardware processor adapted for: to program data in an intermediate representation (IR) of a source code of a software program, adding one or more annotation entries, each for a location in the IR, wherein 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; compiling the IR to produce a binary object comprising binary program data comprising the annotation entries; and providing the binary object to a linker or to a dynamic loader to update in an executable object generated using the binary object an executable internal annotation entry associated with an internal annotation entry to reference a run-time location in the executable object where the run-time location is associated with the internal location in the IR of the internal annotation entry.