Vector Partitioning Loop Branch Prediction Suppression

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional branch predictors perform poorly in predicting backward branches within vector-partitioning loops, leading to adverse effects on processor performance, especially when the vector is frequently partitioned.

Innovation Solution

The method involves detecting the first backward branch instruction after a predicate generating instruction and suppressing its prediction if the prediction accuracy does not meet a threshold value, waiting for the dependency vector to become available before making predictions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If conventional branch predictors are used to predict backward branches in vector-partitioning loops, then branch prediction is performed continuously, but prediction accuracy deteriorates when vectors are frequently partitioned

Engineering Contradiction:
Improveprocessor performanceVSAvoidbranch prediction accuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent changes the prediction state parameter from always-predict to suppressed-prediction based on the availability of dependency vector information. When the dependency vector is not yet available, the branch prediction is suppressed, preventing mispredictions. This dynamic parameter change resolves the contradiction by adapting prediction behavior to the actual data dependency state.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent implements feedback by monitoring the availability status of the dependency vector and adjusting branch prediction accordingly. The system receives feedback about whether the dependency vector is ready, and uses this feedback to enable or suppress prediction, thereby maintaining high accuracy while preserving processor productivity.

Inventive Principle:
Principle #23Feedback

2Measurement precision

If branch prediction is suppressed until dependency vector is available, then prediction accuracy improves, but execution time increases due to waiting

Engineering Contradiction:
Improvebranch prediction accuracyVSAvoidexecution time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent performs preliminary computation of the dependency vector before it is strictly needed for branch prediction. By computing the dependency vector in advance during the predicate-generating instruction execution, the system ensures that when prediction is needed, the information is already available, thus avoiding execution time delays while maintaining high prediction accuracy.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If vector partitioning is performed frequently, then data dependency handling is improved, but branch prediction performance deteriorates

Engineering Contradiction:
Improvedata dependency handlingVSAvoidbranch prediction performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent introduces the dependency vector as an intermediary between the predicate-generating instruction and the backward branch instruction. This intermediary carries data dependency information that mediates the relationship between frequent vector partitioning and branch prediction, allowing the system to maintain both reliable dependency handling and good prediction performance by using the intermediary's information to guide prediction decisions.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS9116686B2Selective suppression of branch prediction in vector partitioning loops until dependency vector is available for predicate generating instruction
Publication Date: 2015.08.25 APPLE INC
  • US9116686B2 patent drawing
  • US9116686B2 patent drawing
  • US9116686B2 patent drawing

AI summary

A method for suppressing prediction of a backward branch instruction used in a vector partitioning loop includes detecting the first backward branch instruction that occurs after a predicate generating instruction. The predicate generating instruction generates a predicate vector that is dependent upon a dependency vector where each element of the dependency vector indicates whether a data dependency exists between elements of a vector instruction. The method also includes receiving an indication of a prediction accuracy of a prediction of the backward branch instruction. If the prediction accuracy does not satisfy a threshold value, the prediction of the backward branch instruction is suppressed until the dependency vector on which the predicate-generating instruction depends is available.