Instruction Prefetch Halting for Flow-Altering Instructions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing data processing systems face performance issues due to spurious errors caused by speculative prefetching of instructions that alter program flow, leading to memory faults when accessing uninitialized memory regions, especially with difficult-to-predict program flow altering instructions.

Innovation Solution

Incorporating instruction identifying circuitry to halt prefetching of subsequent instructions when a predetermined type of program flow altering instruction is identified, and resuming prefetching only after the outcome of such instructions is resolved, thereby preventing memory faults and improving accuracy of branch predictions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If prefetching continues beyond program flow altering instructions, then instruction queue utilization is improved, but spurious errors and memory faults increase

Engineering Contradiction:
Improveinstruction queue utilizationVSAvoidspurious errors
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The prefetching operation is performed in advance of actual instruction execution, but is preliminarily halted when a program flow altering instruction is detected. This allows the system to prepare instruction queues proactively while avoiding the harmful effect of prefetching beyond control flow boundaries, resolving the contradiction between productivity and reliability.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If prefetching is halted upon encountering program flow altering instructions, then spurious errors are reduced, but instruction fetching delays increase

Engineering Contradiction:
Improvespurious errorsVSAvoidinstruction fetching delays
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The prefetching mechanism dynamically adjusts its behavior based on the type of instruction encountered. Prefetching is actively performed for regular instructions but automatically halted when program flow altering instructions are detected, and subsequently resumed when appropriate. This dynamic control resolves the contradiction by optimizing prefetching behavior to different operational contexts.

Inventive Principle:
Principle #15Dynamics

3Productivity

If speculative prefetching is used for difficult-to-predict instructions, then performance is improved, but memory faults in uninitialized regions occur

Engineering Contradiction:
ImproveperformanceVSAvoidmemory faults
Core Design Contradiction:
ProductivityVSObject-affected harmful factors

Solution Approach 1:

The system applies preliminary anti-action by detecting program flow altering instructions before speculative prefetching can cause harm. When such instructions are identified, the prefetching operation is preemptively halted, preventing potential memory faults in uninitialized regions while still allowing performance optimization for predictable instruction sequences.

Inventive Principle:
Principle #9Preliminary anti-action

Data Source

PatentUS10620953B2Instruction prefetch halting upon predecoding predetermined instruction types
Publication Date: 2020.04.14 ARM LTD
  • US10620953B2 patent drawing
  • US10620953B2 patent drawing
  • US10620953B2 patent drawing

AI summary

A data processing apparatus has prefetch circuitry for prefetching instructions from a data store into an instruction queue. Branch prediction circuitry is provided for predicting outcomes of branch instructions and the prefetch circuitry may prefetch instructions subsequent to the branch based on the predicted outcome. Instruction identifying circuitry identifies whether a given instruction prefetched from the data store is a predetermined type of program flow altering instruction and if so then controls the prefetch circuitry to halt prefetching of subsequent instructions into the instruction queue.