Load-Dependent Branch Pre-Resolution Using Pre-Execute Loops

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional branch prediction methods perform poorly on load-dependent branches (LDBs) due to their lack of historical behavior and the potential for cache misses, leading to increased latency and pipeline flushing.

Innovation Solution

A combination of software and hardware is used to pre-execute a loop of instructions, determining branch outcomes in advance and storing them in a branch-outcome memory, allowing the processor to use these pre-computed outcomes for accurate branch prediction.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If conventional branch prediction methods are used, then the processor pipeline can be kept fed with instructions, but load-dependent branches exhibit little historical behavior and cause mis-predictions

Engineering Contradiction:
Improvebranch prediction accuracyVSAvoidpipeline flushing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent pre-executes loop instructions before the main loop to determine branch outcomes in advance. A pre-execute loop runs the same instructions that will be executed in the main loop, capturing branch outcomes from this preliminary execution. These pre-determined outcomes are stored and used during main loop execution, eliminating the need for real-time branch prediction and preventing pipeline flushing.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If load instructions are executed to receive branch conditions, then accurate branch evaluation can be performed, but cache misses increase the time required to fetch data

Engineering Contradiction:
Improvebranch condition accuracyVSAvoiddata fetch time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent executes load instructions in a pre-execute loop before the main loop to fetch branch condition data in advance. By performing the data fetch operation preliminarily, the system captures branch outcomes when the data is available, storing these outcomes for use during main loop execution. This preliminary data fetching eliminates cache miss delays during critical main loop branch evaluation.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If branch outcomes are pre-computed and stored, then 100% accurate branch prediction is achieved, but additional hardware memory is required

Engineering Contradiction:
Improvebranch prediction accuracyVSAvoidbranch-outcome memory
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent creates a copy of the loop instructions in a pre-execute loop that mirrors the main loop's instruction sequence. This pre-execute copy is used solely to determine branch outcomes, which are then stored in branch-outcome memory. The copying approach allows the system to pre-compute branch behavior without modifying the main loop, achieving accurate prediction while isolating the complexity to a dedicated pre-execution mechanism.

Inventive Principle:
Principle #26Copying

4Reliability

If a pre-execute loop is implemented to determine branch outcomes, then mis-prediction ratios are reduced to zero, but the device complexity increases due to software-hardware combination

Engineering Contradiction:
Improvebranch prediction accuracyVSAvoidsoftware-hardware interface
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent introduces branch-outcome memory as an intermediary component between the pre-execute loop and the main loop. This intermediary stores pre-computed branch outcomes and makes them available during main loop execution. The branch-outcome memory acts as a buffer that decouples the pre-execution phase from the main execution phase, simplifying the software-hardware interface while maintaining zero mis-prediction ratios.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS12530199B2Systems and methods for load-dependent-branch pre-resolution
Publication Date: 2026.01.20 HUAWEI TECH CO LTD
  • US12530199B2 patent drawing
  • US12530199B2 patent drawing
  • US12530199B2 patent drawing

AI summary

A method of branch prediction includes, in a pre-execute loop, loading a series of instructions leading to a load dependent branch (LDB) instruction including a load instruction, executing the load instruction to receive a part of a branch condition, computing a branch outcome of the LDB instruction based on the branch condition, and storing the branch outcome to a branch-outcome memory. Then, in a main loop corresponding to the pre-execute loop, the method includes loading the LDB instruction, reading the branch outcome from the branch-outcome memory, and executing the main loop based on the branch outcome. In some cases, the method, in the main loop, computes the branch outcome of the branch condition LDB instruction again.