IT Instruction Pre-decode for Branch Prediction Accuracy

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In processor pipelines, accurately predicting unconditional branches following if-then instructions can be challenging, leading to performance penalties due to prolonged fetching on incorrect paths, especially when the boundaries of the IT instruction block are unclear.

Innovation Solution

The implementation of a pre-decode unit that sets pre-decode bits for cache lines containing if-then instructions, treating unconditional branches within their shadow as conditional, allowing early prediction and correction of fetch paths.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If the branch prediction mechanism waits to predict the branch direction until after the IT instruction block boundaries are resolved, then the accuracy of branch prediction is improved, but the instruction fetch path remains on the wrong path for too long, causing performance penalty

Engineering Contradiction:
Improvebranch prediction accuracyVSAvoidfetch path correction time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The pre-decode unit performs preliminary analysis of IT instruction blocks and sets pre-decode bits to mark unconditional branches that fall within IT blocks before the main branch prediction mechanism processes them. This preliminary action allows the branch prediction to be made earlier with the correct conditional treatment, resolving the contradiction between waiting for accuracy and minimizing delay.

Inventive Principle:
Principle #10Preliminary action

2Ease of manufacture

If the pre-decode unit sets pre-decode bits on a coarse-grained level for cache line portions, then the detection of IT instructions is simplified, but the precision of identifying branches within IT blocks is reduced

Engineering Contradiction:
Improvepre-decode unit implementationVSAvoidIT block boundary detection
Core Design Contradiction:
Ease of manufactureVSMeasurement precision

Solution Approach 1:

The cache line is segmented into multiple portions (e.g., four quarters), and pre-decode bits are set for specific portions containing IT instructions and following portions. This segmentation allows the pre-decode unit to work with manageable segments rather than entire cache lines, balancing implementation simplicity with adequate precision for branch prediction.

Inventive Principle:
Principle #1Segmentation

3Reliability

If the pre-decode unit marks following portions after an IT instruction, then unconditional branches are correctly treated as conditional, but more cache line portions are marked, potentially increasing processing overhead

Engineering Contradiction:
Improvebranch classification accuracyVSAvoidpre-decode bit management
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

Pre-decode bits are set selectively for specific portions of the cache line rather than uniformly marking all portions. The pre-decode unit identifies the portion containing the IT instruction and marks that portion plus a limited number of following portions, applying different treatment to different regions of the cache line to balance reliability with processing efficiency.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS9626185B2IT instruction pre-decode
Publication Date: 2017.04.18 APPLE INC
  • US9626185B2 patent drawing
  • US9626185B2 patent drawing
  • US9626185B2 patent drawing

AI summary

Various techniques for processing and pre-decoding branches within an IT instruction block. Instructions are fetched and cached in an instruction cache, and pre-decode bits are generated to indicate the presence of an IT instruction and the likely boundaries of the IT instruction block. If an unconditional branch is detected within the likely boundaries of an IT instruction block, the unconditional branch is treated as if it were a conditional branch. The unconditional branch is sent to the branch direction predictor and the predictor generates a branch direction prediction for the unconditional branch.