Pointer-Selective Branch History Storage for Accurate Prediction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing data processing systems face challenges in efficiently managing storage requirements and prediction accuracy for control flow instructions, particularly with hard-to-predict branch instructions, leading to instability and increased execution time due to polluting branch histories.
Innovation Solution
A data processing apparatus with pointer storage and history storage circuitry that uses multiple pointers with different live pointer value update conditions, allowing selective storage and retrieval of resolved behaviors based on runtime conditions, and includes mechanisms for training and recovery to optimize storage and prediction efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If all branch instructions are stored in branch history for prediction, then prediction coverage is improved, but storage requirements and history pollution increase
Solution Approach 1:
The patent segments the branch history storage into multiple separate history structures (e.g., loop history, conditional branch history, indirect branch history) rather than using a single unified history. Each history structure stores resolved behaviors for specific pointer values, allowing the system to selectively store only relevant branch outcomes and reduce overall storage requirements while maintaining prediction accuracy for different branch types.
Solution Approach 2:
The patent applies different update conditions and storage policies to different pointers based on their local characteristics. Each pointer has its own live pointer value update condition that determines when its resolved behavior should be stored. This local quality approach allows the system to optimize storage for each pointer type individually, storing detailed history only where needed and reducing pollution from irrelevant branches.
2Reliability
If multiple pointers with different update conditions are maintained, then prediction accuracy is improved, but device complexity increases
Solution Approach 1:
The patent implements dynamic pointer management where the set of live pointers and their update conditions can change at runtime based on observed branch patterns. The system dynamically adds or removes pointers from the live set based on training data and runtime behavior, allowing the complexity to adapt to the actual program characteristics rather than maintaining a fixed complex structure for all possible scenarios.
Solution Approach 2:
The patent changes the parameters of pointers (specifically their update conditions and associated history storage) based on runtime observations and training. The live pointer value update conditions are modified dynamically to reflect actual branch behavior patterns, allowing the system to optimize the number and characteristics of pointers maintained without requiring a permanently complex structure.
3Reliability
If branch history is frequently updated to maintain accuracy, then prediction reliability is improved, but execution time increases
Solution Approach 1:
The patent implements periodic updates to branch history based on live pointer value update conditions rather than continuous updating. Each pointer is updated only when its specific update condition is met (e.g., when a loop iteration completes, when a conditional branch is taken), reducing the frequency of updates while maintaining prediction reliability for the relevant branch patterns.
Solution Approach 2:
The patent extracts and stores only the essential resolved behavior information needed for prediction in the history structures, rather than storing complete branch context. By taking out only the critical prediction-relevant data (resolved behavior associated with specific pointer values), the system reduces the amount of data that needs to be updated and stored, thereby reducing execution time overhead while maintaining prediction reliability.
Data Source
AI summary
A data processing apparatus includes pointer storage configured to store pointer values for pointers. Increment circuitry, responsive to one or more increment events, increments each of the pointer values in dependence on a corresponding live pointer value update condition from corresponding live pointer value update conditions. The corresponding live pointer value update condition is different for each of the pointers. History storage circuitry stores resolved behaviours of instances of a control flow instruction, each of the resolved behaviours being associated with one of the pointers. At least one of the live pointer value update conditions is changeable at runtime. Consequently, storage can be reduced as compared to a situation where all pointer value update conditions are active.


