TAGE branch predictor with perceptron predictor as fallback predictor
AssigneeArm Limited
InventorsIlias Vougioukas, Stephan Diestelhorst, Andreas Lars Sandberg, Nikos Nikoleris
Life of this patent
Estimating the term…
Abstract
A TAGE branch predictor has, as its fallback predictor, a perceptron predictor. This provides a branch predictor which reduces the penalty of context switches and branch prediction state flushes.
Claims17
A TAGE branch predictor for predicting a branch instruction outcome, comprising:
- a plurality of TAGE prediction tables to provide a TAGE prediction for the branch instruction outcome, each TAGE prediction table comprising a plurality of prediction entries trained based on previous branch instruction outcomes;
- lookup circuitry to lookup each of the TAGE prediction tables based on an index determined as a function of a target instruction address and a portion of previous execution history indicative of execution behaviour preceding an instruction at the target instruction address, said portion of the previous execution history used to determine the index having different lengths for different TAGE prediction tables;
- and
- a fallback predictor to provide a fallback prediction for the branch instruction outcome in case the lookup misses in all of the TAGE prediction tables;
- in which:
- the fallback predictor comprises a perceptron predictor comprising at least one weight table to store weights trained based on previous branch instruction outcomes, and to predict the branch instruction outcome based on a sum of terms, each term depending on a respective weight selected from said at least one weight table based on a respective portion of at least one of the target instruction address and the previous branch history;
- and
- a total size of branch prediction state stored by the perceptron predictor is smaller than a total size of branch prediction state stored by the plurality of TAGE prediction tables.
A TAGE branch predictor for predicting a branch instruction outcome, comprising:
- means for storing TAGE prediction tables to provide a TAGE prediction for the branch instruction outcome, each TAGE prediction table comprising a plurality of prediction entries trained based on previous branch instruction outcomes;
- means for looking up each of the TAGE prediction tables based on an index determined as a function of a target instruction address and a portion of previous execution history indicative of execution behaviour preceding an instruction at the target instruction address, said portion of the previous execution history used to determine the index having different lengths for different TAGE prediction tables;
- and
- means for providing a fallback prediction for the branch instruction outcome in case the lookup misses in all of the TAGE prediction tables;
- in which:
- the means for providing a fallback prediction comprises means for providing a perceptron prediction, comprising means for storing weights trained based on previous branch instruction outcomes, and means for predicting the branch instruction outcome based on a sum of terms, each term depending on a respective weight selected from said at least one weight table based on a respective portion of at least one of the target instruction address and the previous branch history;
- and
- a total size of branch prediction state stored by the means for providing a perceptron prediction is smaller than a total size of branch prediction state stored by the TAGE prediction tables.
A method for predicting a branch instruction outcome using a TAGE branch predictor comprising a plurality of TAGE prediction tables for providing a TAGE prediction for the branch instruction outcome, each TAGE prediction table comprising a plurality of prediction entries trained based on previous branch instruction outcomes;
- the method comprising:
- looking up each of the TAGE prediction tables based on an index determined as a function of a target instruction address and a portion of previous execution history indicative of execution behaviour preceding an instruction at the target instruction address, said portion of the previous execution history used to determine the index having different lengths for different TAGE prediction tables;
- and
- providing a fallback prediction for the branch instruction outcome in case the lookup misses in all of the TAGE prediction tables, using a perceptron predictor comprising at least one weight table to store weights trained based on previous branch instruction outcomes, the fallback prediction being predicted based on a sum of terms, each term depending on a respective weight selected from said at least one weight table based on a respective portion of at least one of the target instruction address and the previous branch history;
- and
- a total size of branch prediction state stored by the perceptron predictor is smaller than a total size of branch prediction state stored by the plurality of TAGE prediction tables.
Dependencies are inferred from the claim text.