Compiler Parallelization Method for Multi-Core Code Execution
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Designing applications to utilize multiple processor cores effectively is complex and requires significant effort, especially when ensuring data integrity and thread execution order, as existing methods often necessitate rewriting code to accommodate multi-core processors.
Innovation Solution
A method that identifies and modifies computer program code to execute different parts on specific processing elements, using markers and memory access operations to ensure correct execution and data access across multiple cores, allowing for parallel processing and efficient use of multi-core processors.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If applications are designed to use multiple processor cores, then processor performance is improved, but design complexity and difficulty increase
Solution Approach 1:
The system automatically analyzes existing program code and determines parallelization opportunities without requiring manual redesign. The compilation system self-services by identifying suitable code sections for parallel execution and generating appropriate multi-core code, eliminating the need for developers to manually design multi-threaded applications
Solution Approach 2:
The compilation system performs preliminary analysis of the program code before execution to identify parallelizable sections. By pre-processing the code during compilation to detect data dependencies and determine execution order, the system prepares the multi-core execution plan in advance, avoiding complex runtime management
2Productivity
If existing programs are rewritten to use multiple processor cores, then processing capability is improved, but program integrity becomes harder to maintain
Solution Approach 1:
The system creates copies of code sections that need to execute in parallel on different processor cores. By generating duplicate code paths with appropriate data bindings instead of manually refactoring existing code, the original program logic is preserved while enabling multi-core execution, thus maintaining program integrity
Solution Approach 2:
The compilation system acts as an intermediary between the original sequential code and multi-core execution. It automatically inserts synchronization mechanisms and data binding code as intermediaries that manage communication between parallel code sections, ensuring correct execution order without requiring developers to manually manage thread synchronization
3Productivity
If code is partitioned for distributed computing, then execution efficiency is improved, but code complexity increases
Solution Approach 1:
The system automatically segments the program code into suitable sections for parallel execution by analyzing data dependencies and control flow. This automatic segmentation identifies independent code blocks that can execute in parallel without requiring developers to manually divide the code, thus improving execution efficiency while avoiding manual code complexity
Solution Approach 2:
The compilation system provides a universal solution that works with existing programs regardless of their original design. The same compilation process handles both sequential and parallel code generation, and can adapt to different multi-core configurations, making the system versatile without requiring program-specific customization
Data Source
Figure 1
Figure 2~3A
Figure 3B
AI summary
A method for processing computer program code to enable different parts of the computer program code to be executed by different processing elements of a plurality of communicating processing elements. The method comprises identifying at least one first part of the computer program code, which is to be executed by a particular one of said processing elements. The method further comprises identifying at least one further part of the computer code which is related to the at least one first part of the computer code. The at least one first part of the computer program code and the at least one further part of the computer program code are caused to be executed by the particular one of said processing elements.