Analysis of Branch Predictors

Slides:



Advertisements
Similar presentations
Tuning of Loop Cache Architectures to Programs in Embedded System Design Susan Cotterell and Frank Vahid Department of Computer Science and Engineering.
Advertisements

Branch prediction Titov Alexander MDSP November, 2009.
Dynamic History-Length Fitting: A third level of adaptivity for branch prediction Toni Juan Sanji Sanjeevan Juan J. Navarro Department of Computer Architecture.
Lecture 8 Dynamic Branch Prediction, Superscalar and VLIW Advanced Computer Architecture COE 501.
Hardware-based Devirtualization (VPC Prediction) Hyesoon Kim, Jose A. Joao, Onur Mutlu ++, Chang Joo Lee, Yale N. Patt, Robert Cohn* ++ *
Dynamic Branch Prediction
A PPM-like, tag-based predictor Pierre Michaud. 2 Main characteristics global history based 5 tables –one 4k-entry bimodal (indexed with PC) –four 1k-entry.
CPE 731 Advanced Computer Architecture ILP: Part II – Branch Prediction Dr. Gheith Abandah Adapted from the slides of Prof. David Patterson, University.
Computer Architecture 2011 – Branch Prediction 1 Computer Architecture Advanced Branch Prediction Lihu Rappoport and Adi Yoaz.
EECS 470 Branch Prediction Lecture 6 Coverage: Chapter 3.
1 Improving Branch Prediction by Dynamic Dataflow-based Identification of Correlation Branches from a Larger Global History CSE 340 Project Presentation.
EE8365/CS8203 ADVANCED COMPUTER ARCHITECTURE A Survey on BRANCH PREDICTION METHODOLOGY By, Baris Mustafa Kazar Resit Sendag.
VLSI Project Neural Networks based Branch Prediction Alexander ZlotnikMarcel Apfelbaum Supervised by: Michael Behar, Spring 2005.
EECC551 - Shaaban #1 lec # 5 Fall Reduction of Control Hazards (Branch) Stalls with Dynamic Branch Prediction So far we have dealt with.
EENG449b/Savvides Lec /17/04 February 17, 2004 Prof. Andreas Savvides Spring EENG 449bG/CPSC 439bG.
EECC722 - Shaaban #1 Lec # 10 Fall Conventional & Block-based Trace Caches In high performance superscalar processors the instruction fetch.
Goal: Reduce the Penalty of Control Hazards
Branch Target Buffers BPB: Tag + Prediction
Improving Branch Prediction by Dynamic Dataflow-based Identification of Correlated Branches from a Large Global History Renjiu Thomas, Manoij Franklin,
EECC551 - Shaaban #1 lec # 5 Winter Reduction of Control Hazards (Branch) Stalls with Dynamic Branch Prediction So far we have dealt with.
Computer Architecture Instruction Level Parallelism Dr. Esam Al-Qaralleh.
Adaptive Cache Compression for High-Performance Processors Alaa R. Alameldeen and David A.Wood Computer Sciences Department, University of Wisconsin- Madison.
Dynamic Branch Prediction
EENG449b/Savvides Lec /25/05 March 24, 2005 Prof. Andreas Savvides Spring g449b EENG 449bG/CPSC 439bG.
Prophet/Critic Hybrid Branch Prediction Falcon, Stark, Ramirez, Lai, Valero Presenter: Christian Wanamaker.
CIS 429/529 Winter 2007 Branch Prediction.1 Branch Prediction, Multiple Issue.
1 Runahead Execution A review of “Improving Data Cache Performance by Pre- executing Instructions Under a Cache Miss” Ming Lu Oct 31, 2006.
EECC722 - Shaaban #1 Lec # 9 Fall Conventional & Block-based Trace Caches In high performance superscalar processors the instruction fetch.
Evaluation of Dynamic Branch Prediction Schemes in a MIPS Pipeline Debajit Bhattacharya Ali JavadiAbhari ELE 475 Final Project 9 th May, 2012.
Improving the Performance of Object-Oriented Languages with Dynamic Predication of Indirect Jumps José A. Joao *‡ Onur Mutlu ‡* Hyesoon Kim § Rishi Agarwal.
1 Storage Free Confidence Estimator for the TAGE predictor André Seznec IRISA/INRIA.
Evaluation of the Gini-index for Studying Branch Prediction Features Veerle Desmet Lieven Eeckhout Koen De Bosschere.
Computer Architecture 2012 – advanced branch prediction 1 Computer Architecture Advanced Branch Prediction By Dan Tsafrir, 21/5/2012 Presentation based.
ACSAC’04 Choice Predictor for Free Mongkol Ekpanyapong Pinar Korkmaz Hsien-Hsin S. Lee School of Electrical and Computer Engineering Georgia Institute.
André Seznec Caps Team IRISA/INRIA 1 Analysis of the O-GEHL branch predictor Optimized GEometric History Length André Seznec IRISA/INRIA/HIPEAC.
1 A New Case for the TAGE Predictor André Seznec INRIA/IRISA.
CSCI 6461: Computer Architecture Branch Prediction Instructor: M. Lancaster Corresponding to Hennessey and Patterson Fifth Edition Section 3.3 and Part.
Predicting Conditional Branches With Fusion-Based Hybrid Predictors Gabriel H. Loh Yale University Dept. of Computer Science Dana S. Henry Yale University.
Lecture Topics: 11/24 Sharing Pages Demand Paging (and alternative) Page Replacement –optimal algorithm –implementable algorithms.
Computer Architecture 2015 – Advanced Branch Prediction 1 Computer Architecture Advanced Branch Prediction By Yoav Etsion and Dan Tsafrir Presentation.
André Seznec Caps Team IRISA/INRIA 1 A 256 Kbits L-TAGE branch predictor André Seznec IRISA/INRIA/HIPEAC.
CS 6290 Branch Prediction. Control Dependencies Branches are very frequent –Approx. 20% of all instructions Can not wait until we know where it goes –Long.
Adapted from Computer Organization and Design, Patterson & Hennessy, UCB ECE232: Hardware Organization and Design Part 13: Branch prediction (Chapter 4/6)
Prophet/Critic Hybrid Branch Prediction B B B
Branch Prediction Perspectives Using Machine Learning Veerle Desmet Ghent University.
André Seznec Caps Team IRISA/INRIA 1 Analysis of the O-GEHL branch predictor Optimized GEometric History Length André Seznec IRISA/INRIA/HIPEAC.
Dynamic Branch Prediction
CS203 – Advanced Computer Architecture
Computer Structure Advanced Branch Prediction
Dynamic Branch Prediction
Computer Architecture Advanced Branch Prediction
COSC3330 Computer Architecture Lecture 15. Branch Prediction
FA-TAGE Frequency Aware TAgged GEometric History Length Branch Predictor Boyu Zhang, Christopher Bodden, Dillon Skeehan ECE/CS 752 Advanced Computer Architecture.
CMSC 611: Advanced Computer Architecture
Looking for limits in branch prediction with the GTL predictor
So far we have dealt with control hazards in instruction pipelines by:
Dynamic Branch Prediction
So far we have dealt with control hazards in instruction pipelines by:
Lecture 10: Branch Prediction and Instruction Delivery
Serene Banerjee, Lizy K. John, Brian L. Evans
So far we have dealt with control hazards in instruction pipelines by:
So far we have dealt with control hazards in instruction pipelines by:
Adapted from the slides of Prof
So far we have dealt with control hazards in instruction pipelines by:
So far we have dealt with control hazards in instruction pipelines by:
So far we have dealt with control hazards in instruction pipelines by:
So far we have dealt with control hazards in instruction pipelines by:
So far we have dealt with control hazards in instruction pipelines by:
The O-GEHL branch predictor
Gang Luo, Hongfei Guo {gangluo,
Presentation transcript:

Analysis of Branch Predictors Guang Pan Ming Lu Dec 12, 2006

Outline Motivation Introduction Previous works Our works Simulation results Conclusion & Recommendations Future works

Motivation Branches are very frequent Approx. 20% of all instructions Accurate branch prediction improves performance of a superscalars or superpipled processor. Decreasing miss prediction rate saves cycles. Decreasing miss prediction rate saves energy.

Introduction Need to know two things Direct jumps, function calls Whether the branch is taken or not (direction) The target address if it is taken (target) Direct jumps, function calls Direction known (always taken), target easy to compute Conditional branches (typically PC-relative) Direction difficult to predict, target easy to compute Indirect jumps, function returns Direction known (always taken), target difficult

Introduction (cont’) Framework and traces are based on a branch predictor competition (Championship Branch Prediction) Focused on conditional branches, evaluated several branch predictors by measurements on real traces from IBS (Instruction Benchmark Set) Proposed two closely related modifications of global adaptive prediction mechanisms which can achieve satisfactory accuracy.

Previous Works Static predictor Always predict Not taken (predictor_nottaken) Easy to implement 30-40% accuracy … not so good Always predict Taken (predictor_taken) 60-70% accuracy

Previous Works (cont’) Local 2-bit predictor (with hysteresis) T NT Predict Taken Predict Taken T T NT NT Predict Not Taken Predict Not Taken T NT

Previous Works (cont’) Bimodal predictor With a table of two-bit entries, indexed with the least significant bits of the instruction addresses. Entries typically do not have tags. A particular counter mapped to different branch instructions Each counter has one of four states: Strongly not taken Weakly not taken Weakly taken Strongly taken

Previous Works (cont’) Branch address (4 bits) Correlating predictor Branch outcome correlates with the outcome of some recently executed branches Use this in our prediction Keep N bits of history of recent outcomes Use a different M-addr-bit predictor for each different history Note: N-bit history means 2^N different predictors for each branch 2-bits per branch local predictors Prediction 2-bit global branch history

Previous Works (cont’) Gshare predictor Correlating predictors often wasteful Some histories are rare or even impossible Yet we dedicate a counter for each history Solution: hashing Use a single large predictor table Hash history and branch address together Use the hash to index into the table The hash is just an XOR, so it’s fast K bits of branch instruction address Index XOR Prediction N bits of global branch history Table of 2-bit predictors with 2^max(N,K) entries

Previous Works (cont’) Why Gshare is bad? Needs a lot of branch instances to train the different 2-bit predictors Simple 2-bit predictor Has a prediction after it sees one instance of a branch The gShare predictor Has a prediction after it sees an instance of that branch and that particular history But for the same number of counters, gShare usually gives better prediction accuracy

Previous Works (cont’) Tag-based PPM (Prediction by Partial Matching) predictor PPM was originally introduced for text compression, and it was used in for branch prediction. Tag-based, global-history predictor derived from PPM. Features five tables. (indexed with a different history length) Prediction is given by the up-down saturating counter associated with the longest matching history.

Previous Works (cont’) The PPM predictor features 5 tables. The “bimodal” table on the left has 4k entries, with 4 bits per entry. Each of the 4 other tables has 1k entries, with 12 bits per entry. The table on the right is the one using the more global history bits (80 bits).

Our Work Hybrid_vote Predictor Combination of bimodal, gshare, ppm predictors (hardware achievable) Three predictors predict a conditional branch simultaneously Using voting mechanism to predict Compare the predictions of three predictors Choose the final prediction from the majority. Update each of the predictors by its own updating method.

Our Work (Cont’) Hybrid_select Predictor Combination of bimodal, gshare, ppm predictors (hardware achievable) Three predictors predict a conditional branch simultaneously Using bimodal selecting mechanism to predict Compare the predictions of three predictors Choose the final prediction by: Bimodal >= 2 choose ppm prediction Bimodal < 2 choose gshare prediction Update each of the predictors by its own updating method.

Simulation Results

Bench mark of MPKI (MPKI = Misses per 1000 Instructions)

Simulation Results (Cont’)

Simulation Results (Cont’)

Simulation Results (Cont’) MPKI = Misses per 1000 Instructions

Simulation Results (Cont’)

Conclusion & Recommendations Identifying a good branch predictor plays an important role in improving performance more effective. By combining current predictors, new hybrid predictors also perform well in the Benchmark. Different structures of branch prediction schemes perform well on different branch structures. The benchmark trace files are in favor of Not taken. Recommendations: For embedded systems -> gshare For desktop/server systems -> ppm, hybrid_vote

Future Works Research new methods for selecting more accurate predictions among the predictors. Research new algorithms for implementing more effective and accurate dynamic branch predictors.

References [1] David Tarjan & Kevin Skadron, “Merging Path and Gshare indexing in Perceptron Branch Prediction “, ACM Transactions on Architecture and Code Optimization, Vol. 2, No. 3, September 2005, Pages 280–300. [2] Wikipedia.org, “Branch predictor “, http://en.wikipedia.org/wiki/Branch_prediction, 2006. [3] A. N. Eden & T. Mudge, “The YAGS Branch Prediction Scheme,” Dept. EECS, University of Michigan, Ann Arbor. [4] Lecture notes, “Branch Prediction”, http://www.cs.utah.edu/classes/cs6810/lectures/6810-bp.pdf, School of Computing, University of Utah [5] Pierre Michaud, “A PPM-like, tag-based predictor”, http://www.jilp.org/cbp/Pierre.pdf [6] John L. Hennessy & David A. Patterson, “Computer Archetecture – A Quantitative Approach”, Third Edition Morgan Kaufmann Publisher, 2003.

Thanks and Questions?