Invention Grant
US07809933B2 System and method for optimizing branch logic for handling hard to predict indirect branches
有权
用于优化分支逻辑以处理难以预测间接分支的系统和方法
- Patent Title: System and method for optimizing branch logic for handling hard to predict indirect branches
- Patent Title (中): 用于优化分支逻辑以处理难以预测间接分支的系统和方法
-
Application No.: US11759350Application Date: 2007-06-07
-
Publication No.: US07809933B2Publication Date: 2010-10-05
- Inventor: David S. Levitan , Wolfram Sauer
- Applicant: David S. Levitan , Wolfram Sauer
- Applicant Address: US NY Armonk
- Assignee: International Business Machines Corporation
- Current Assignee: International Business Machines Corporation
- Current Assignee Address: US NY Armonk
- Agent Stephen J. Walder, Jr.; Diana R. Gerhardt
- Main IPC: G06F7/38
- IPC: G06F7/38 ; G06F9/00 ; G06F9/44 ; G06F15/00

Abstract:
A system and method for optimizing the branch logic of a processor to improve handling of hard to predict indirect branches are provided. The system and method leverage the observation that there will generally be only one move to the count register (mtctr) instruction that will be executed while a branch on count register (bcctr) instruction has been fetched and not executed. With the mechanisms of the illustrative embodiments, fetch logic detects that it has encountered a bcctr instruction that is hard to predict and, in response to this detection, blocks the target fetch from entering the instruction buffer of the processor. At this point, the fetch logic has fetched all the instructions up to and including the bcctr instruction but no target instructions. When the next mtctr instruction is executed, the branch logic of the processor grabs the data and starts fetching using that target address. Since there are no other target instructions that were fetched, no flush is needed if that target address is the correct address, i.e. the branch prediction is correct.
Public/Granted literature
- US20080307210A1 System and Method for Optimizing Branch Logic for Handling Hard to Predict Indirect Branches Public/Granted day:2008-12-11
Information query