Analyzing Branch Prediction Contexts Influence Marius Oancea, Arpad Gellert, Adrian Florea, Lucian Vintan University “Lucian Blaga” of Sibiu, Computer Science Department, E. Cioran 4, 550025 Sibiu, Romania, E-mail: marius.oancea@ulbsibiu.ro ABSTRACT All present branch prediction techniques are limited in their accuracy. Our aim is to demonstrate that an important limitation cause is given by the used prediction contexts (global and local histories respectively path information). Using these dynamic contexts, some branches are unbiased and randomly shuffled, therefore unpredictable. The percentages of these branches represent a fundamental prediction limitation. For outperforming this limitation it is necessary additional more relevant context information, in order to further reduce the entropy of these branches. KEYWORDS: Branch Prediction, Prediction Context, Unbiased Branches, SimpleScalar, SPEC Benchmarks 1 Introduction The main aim of this paper is to analyze the present day branch prediction contexts from the point of view of their limits in predicting unbiased braches. We vary the contexts length and observed that some of dynamic contexts remained unpredictable despite of their length (32 bits of local history concatenated with 32 bits of global history). In our study we will ignore technology constraints (memory limits, predictors structures and algorithms) being only interested if the context information used by the state-of-the art predictors is or is not sufficient. The main idea is: in a perfect dynamic context all branch instances should have the same outcome. If the outcome is not the same a first solution might consists in extending the context information. Different context sizes and different context information will be studied during this article. 2 Methodology 2.1 Defining the metrics and ranges of parameters To have a metric of that distribution we define polarization index (P) of a certain branch context as: ⎩ ⎨ ⎧ < ≥ = = 5 . 0 , 5 . 0 , ) , max( ) ( 0 1 0 0 1 0 f f f f f f S P i (1) where: • = set of distinct contexts that appear during all branch instances; { k S S S S ..., , , 2 1 = }