JIT Code Linking to Avoid Redundant Translation Passes
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Compilers often translate combined code unnecessarily, wasting time and computing resources by repeating translation processes.
Innovation Solution
Implementing a just-in-time (JIT) linker that uses reference information to optimize the linking process by separately compiling and then linking code portions, such as host and device code, and pruning unreferenced elements to generate optimized executable code.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If compilers translate combined code every time, then code translation is thorough and complete, but translation time and computing resources are wasted due to redundancy
Solution Approach 1:
The system performs preliminary actions by storing indication information in a cache that marks whether portions of code have been combined. Before translating combined code, the compiler checks this cache to determine if translation has already occurred, thereby avoiding redundant translation operations while ensuring translation completeness when needed.
2Reliability
If compilers translate combined code every time, then code translation is thorough and complete, but computing resources are wasted due to redundancy
Solution Approach 1:
The system performs preliminary actions by storing indication information in a cache that marks whether portions of code have been combined. Before translating combined code, the compiler checks this cache to determine if translation has already occurred, thereby avoiding redundant translation operations while ensuring translation completeness when needed.
3Productivity
If JIT linker separately compiles and links code portions, then compilation efficiency is improved, but device complexity increases
Solution Approach 1:
The JIT linker divides code into separate portions (host code and device code) that are compiled and processed independently. This segmentation allows each portion to be optimized separately and linked together later, improving compilation efficiency while managing complexity through modular processing.
Solution Approach 2:
The system introduces a cache as an intermediary component that stores indication information about code combination status. This intermediary layer simplifies the linker's workload by providing pre-computed information about which code portions have been combined, reducing the complexity of tracking code translation states.
Data Source
AI summary
Apparatuses, systems, and techniques to optimize processor performance. In at least one embodiment, a method optimizes linked code based, at least in part, on storing an indication of whether two portions of code have been linked.


