Dynamic Code Switching for Conditional Branch Execution
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for executing application programs with conditional branches on high-performance computers are inefficient when the true rate of conditional branch executions fluctuates, leading to redundant instructions and decreased processing efficiency.
Innovation Solution
A dynamic execution control method that switches between codes using predicated instructions and list vector generation based on the true rate of conditional branch executions, utilizing hardware counters to determine the optimal code execution dynamically.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If predicated instructions are used to execute conditional branches, then execution speed is improved when true rate is high, but processing efficiency decreases when true rate is low or fluctuates
Solution Approach 1:
The patent dynamically switches between predicated instruction execution and list vector generation based on the true rate of conditional branches. When true rate is high, predicated instructions are used for fast execution; when true rate is low or fluctuates, list vector generation is employed to avoid redundant computations. This dynamic adaptation resolves the contradiction between execution speed and processing efficiency.
Solution Approach 2:
The patent changes the execution parameter (method selection) based on the true rate parameter. By monitoring the true rate and switching between different execution methods (predicated instructions vs. list vector generation), the system optimizes processing efficiency while maintaining execution speed across varying conditions.
2Productivity
If list vector generation is used to eliminate redundant instructions, then processing efficiency is improved when true rate is low, but execution speed decreases when true rate is high
Solution Approach 1:
The system dynamically selects between list vector generation and predicated instruction execution based on the true rate. When true rate is low, list vector generation is used to improve processing efficiency by eliminating redundant instructions; when true rate is high, predicated instructions are used to maximize execution speed. This dynamic selection resolves the speed-efficiency tradeoff.
Solution Approach 2:
The execution method parameter is changed based on the true rate parameter. By adjusting which execution method is active (list vector vs. predicated instructions) according to the measured true rate, the system achieves both high execution speed and high processing efficiency under different conditions.
3Adaptability or versatility
If branch instructions are included in the code, then adaptability to varying true rates is improved, but redundant instructions increase and processing efficiency decreases
Solution Approach 1:
The patent employs dynamic code generation that adapts to varying true rates. Instead of using static branch instructions that create redundancy, the system dynamically generates appropriate code (either predicated instructions or list vector operations) based on the observed true rate, thereby maintaining adaptability while eliminating redundant instructions and improving processing efficiency.
Solution Approach 2:
The patent extracts the conditional branch logic from traditional branch instructions and replaces it with predicated instructions or list vector operations. This extraction eliminates the need for actual branch jumps and reduces redundant instruction execution, improving processing efficiency while maintaining adaptability through dynamic method selection.
4Loss of energy
If predicated instructions are used, then redundant computations are reduced when true rate is high, but computational results are discarded when true rate is low
Solution Approach 1:
The system dynamically switches between predicated instructions and list vector generation based on true rate. When true rate is high, predicated instructions reduce redundant computations by conditionally executing only necessary operations; when true rate is low, list vector generation is used to avoid discarding computational results. This dynamic switching resolves the contradiction between reducing redundant computations and maintaining computational efficiency.
Solution Approach 2:
The execution method is changed based on the true rate parameter to optimize the balance between reducing redundant computations and maintaining computational efficiency. By adjusting which method is active according to the measured true rate, the system minimizes both redundant computations and wasted computational results.
Data Source
AI summary
While a first code, in an object code generated from a source code, for a loop included in the source code or a second code in the object code is executed, a feature amount concerning the number of times that a condition of a conditional branch is true is obtained. The loop includes the conditional branch, and the conditional branch is coded in the first code. The second code is a code to perform computation of a branch destination for a case where the condition of the conditional branch is true, only for loop indices that were extracted as the aforementioned case. Then, a processor executes, based on the feature amount, the second code or a third code included in the object code. The third code is a code to write, by using a predicated instruction and into a memory, any computation result of computations of branch destinations.


