Macroscalar Vector Partitioning Loop Branch Prediction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional branch predictors in processors often mispredict backward branches in vector partitioning loops, leading to adverse effects on processor performance due to poor prediction accuracy.

Innovation Solution

A method is introduced to predict a backward conditional branch instruction in a vector partitioning loop by detecting the first conditional branch after consuming a dependency index vector, forcing a misprediction of the terminal instance, and using a Macroscalar Vectorindex instruction to determine the number of iterations, allowing for accurate prediction based on the vector length parameter.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If conventional branch predictors are used to predict backward branches in vector partitioning loops, then the device complexity remains low, but the prediction accuracy deteriorates leading to performance degradation

Engineering Contradiction:
Improvebranch prediction accuracyVSAvoidbranch prediction mechanism complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The system performs preliminary detection of the first conditional branch instruction that occurs after consumption of a dependency index vector. This early detection allows the branch predictor to prepare accurate predictions before execution, improving prediction accuracy without requiring complex runtime mechanisms. The predictor uses the dependency index vector information in advance to determine the number of iterations.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The branch prediction mechanism incorporates feedback by detecting when the terminal instance of a conditional branch has already been fetched and forcing a misprediction accordingly. This feedback loop allows the system to adapt its predictions based on the actual execution state, improving accuracy for vector partitioning loops where the number of iterations is determined by the dependency index vector.

Inventive Principle:
Principle #23Feedback

2Productivity

If the terminal instance of conditional branch is predicted using conventional methods, then the prediction process is simple, but misprediction penalties increase adversely affecting processor performance

Engineering Contradiction:
Improveprocessor execution efficiencyVSAvoidmisprediction penalty time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system forces a misprediction of the terminal instance of the first conditional branch instruction before the terminal instance executes. This preliminary action prevents the processor from fetching and executing unnecessary instructions that would result from incorrect predictions, thereby eliminating misprediction penalties and improving overall execution efficiency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The branch prediction mechanism takes preliminary anti-action by anticipating the terminal instance of the conditional branch and pre-forcing a misprediction. This counteracts the potential harm of misprediction before it occurs, preventing pipeline stalls and maintaining high processor throughput in vector partitioning loops.

Inventive Principle:
Principle #9Preliminary anti-action

3Productivity

If accurate prediction of vector partitioning loop iterations is implemented, then execution efficiency improves, but the complexity of the prediction mechanism increases

Engineering Contradiction:
Improvevector partitioning loop execution efficiencyVSAvoidprediction mechanism complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system uses the dependency index vector as an intermediary to bridge the loop-carried dependency and the branch prediction mechanism. By detecting the first conditional branch after consumption of this vector, the system obtains accurate iteration count information without requiring complex analysis of the entire loop structure, thus improving efficiency with moderate complexity increase.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The prediction mechanism is segmented into distinct detection stages: detecting the first conditional branch instruction, determining the number of iterations from the dependency index vector, and forcing misprediction at the terminal instance. This segmentation allows each component to remain relatively simple while achieving accurate overall prediction for vector partitioning loops.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS9389860B2Prediction optimizations for Macroscalar vector partitioning loops
Publication Date: 2016.07.12 APPLE INC
  • US9389860B2 patent drawing
  • US9389860B2 patent drawing
  • US9389860B2 patent drawing

AI summary

A method of predicting a backward conditional branch instruction used in a vector partitioning loop includes detecting the first conditional branch instruction that occurs after consumption of a dependency index vector by a predicate generating instruction. The dependency index vector includes information indicative of a number of iterations of the vector partitioning loop, and the conditional branch instruction may branch backwards when taken. The conditional branch instruction may then be predicted to be taken a number of times that is determined by the dependency index vector.