CN1520547A - 预测间接分支目标地址的方法、装置和编译器 - Google Patents

预测间接分支目标地址的方法、装置和编译器 Download PDF

Info

Publication number
CN1520547A
CN1520547A CNA028128931A CN02812893A CN1520547A CN 1520547 A CN1520547 A CN 1520547A CN A028128931 A CNA028128931 A CN A028128931A CN 02812893 A CN02812893 A CN 02812893A CN 1520547 A CN1520547 A CN 1520547A
Authority
CN
China
Prior art keywords
branch
branch target
key information
target
prompting operation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CNA028128931A
Other languages
English (en)
Other versions
CN1265286C (zh
Inventor
J����³��
J·霍格尔布鲁格
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Pendragon Wireless LLC
Original Assignee
Koninklijke Philips Electronics NV
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Koninklijke Philips Electronics NV filed Critical Koninklijke Philips Electronics NV
Publication of CN1520547A publication Critical patent/CN1520547A/zh
Application granted granted Critical
Publication of CN1265286C publication Critical patent/CN1265286C/zh
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/32Address formation of the next instruction, e.g. by incrementing the instruction counter
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3802Instruction prefetching
    • G06F9/3804Instruction prefetching for branches, e.g. hedging, branch folding
    • G06F9/3806Instruction prefetching for branches, e.g. hedging, branch folding using address prediction, e.g. return stack, branch history buffer
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3005Arrangements for executing specific machine instructions to perform operations for flow control
    • G06F9/30054Unconditional branch instructions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3005Arrangements for executing specific machine instructions to perform operations for flow control
    • G06F9/30058Conditional branch instructions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3005Arrangements for executing specific machine instructions to perform operations for flow control
    • G06F9/30061Multi-way branch instructions, e.g. CASE
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/32Address formation of the next instruction, e.g. by incrementing the instruction counter
    • G06F9/322Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3836Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
    • G06F9/3842Speculative instruction execution
    • G06F9/3844Speculative instruction execution using dynamic branch prediction, e.g. using branch history tables

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Advance Control (AREA)
  • Executing Machine-Instructions (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

本发明涉及一种用于预测程序的分支目标的方法、处理器和编译器。在程序中提供一个提示操作来提示关于即将出现的间接分支的分支预测。可以用一个包含各个间接分支的分支目标的表来改善间接分支的预测精度。分支目标是根据从提示操作中导出的关键码信息确定的。

Description

预测间接分支目标地址的方法、装置和编译器
发明领域
本发明涉及一种用于在动态分支预测中预测分支地址的方法、处理器和编译器。
背景技术
随着高性能超级标量处理器的发布速率(issue rate)和流水线深度的增加,所发布的(issued)推测工作的量也增加。因为在分支失败预测的情况下必须抛弃预测工作,深度流水线的处理器必须采用精确的分支预测器(predictors)来有效地发挥它们的性能潜力。
程序的分支可以分类为有条件的或无条件的分支和直接的或间接的分支。有条件分支有条件地将指令流重定向到目标,而无条件分支则总是将指令流重定向到目标。直接分支有一个静态规定的目标,它指向程序中单一的位置,而间接分支则有一个动态规定的目标,它可能指向程序中任何数量的位置。由于现代命令式程序设计语言,间接分支可以划分成四种类型。这四种类型是功能返回(function returns)、开关指令(switches)产生的表跳转、虚拟功能调用(function calls)和通过功能指针的功能调用。
动态分支预测普遍被用来在出现分支的情况下向指令流水线提供稳定的指令流。为此,处理其中的取指(fetch)阶段必须检测分支、预测分支方向(采取或不采取)并提供分支目标。通常用分支目标缓冲器(BTB)来提供分支目标。每当解析出一个分支,即知道其方向和分支目标时,就将其分支目标放入BTB,BTB实质上是一个按指令地址索引化的分支目标的高速缓存。在流水线的取指阶段,用与用于访问指令高速缓存的相同的地址访问BTB。如果BTB命中,则从指令高速缓存中提取的指令必定是个分支,且由BTB返回的分支目标就被预测是该指令的目标。这个预测对目标地址是静态的直接分支--即具有由直接操作数规定的分支--来说是正确的。
然而,BTB做出的目标预测对于分支目标地址是动态的间接分支即由寄存器规定的目标的分支来说经常是不正确的。尽管间接分支比直接分支不常使用,但间接分支很重要,因为他们更难以预测。模拟结果显示,对间接分支的更好的预测能显著地提高准确性。
Po-Yung Chang等人在“Target Prediction for IndirectJumps”(间接跳转的目标预测)(第24届计算机体系结构年会论文集,美国丹佛,1997年6月)和Karen Driesen等人在“AccurateIndirect Branch Prediction”(准确的间接分支预测)(第25届计算机体系结构年会论文集,西班牙巴塞罗那,1998年6月)中提出了用于间接预测的目标预测器。这些预测器根据分支的地址和导向分支的执行路径提供目标,而BTB则仅仅根据分支的地址提供目标。这些预测器背后的思想是利用导向间接分支的路径与其目标之间存在的相关性。这个技术的后果是要为每个间接分支存储许多目标。
此外,美国专利US5,857,104披露了综合了编译器的动态分支预测(CS-DBP)过程,其中编译器动态地将计算值传送给分支预测器,使分支预测器能改进其预测。然而,该已知的CS-DBP过程提供的是一种概率方法,只预测分支方向或分支方向相关联的值。
因此,本发明的一个目的是通过一种用于分支预测的方法、处理器和编译器,利用它们能提高间接分支的预测精确性。
该目的由权利要求1中所定义的预测方法、权利要求11中所定义的处理器以及权利要求14中所定义的编译器实现。
按照本发明,提供一个操作来提示关于将要出现的间接分支的分支预测,其中可以或者用一个间接分支的分支目标表或者用一个编译器确定来改善间接分支的预测精确性。特别地,向硬件提供关于将要出现的间接分支的提示,其中导出与分支的目标有关的关键码(key)信息。
这个技术的应用显著地改善间接分支的目标预测精确性,但第一次执行某个方向上的分支除外。因此,如果有足够大的分支目标缓冲器或表,几乎所有的目标预测都导致一个正确的目标。
编译器对预测由功能指针产生的间接分支是有用的。在这种情况下,能及时得到由编译器确定的分支目标。
关键码信息可以从产生分支的开关(switch)语句的开关值导出。此外,关键码信息还可以从产生分支的虚拟功能调用的虚拟功能表的地址导出。事实上几乎所有间接分支都是由功能返回和开关语句产生的,因此能提供有效的和精确的分支预测。如果将处理器(例如VLIW处理器)的加载延迟选择得等于前段流水线阶段的段数,则可以与加载操作并行地调度提示操作。最好在程序的预定位置提供提示操作,该预定位置被选择成使得当对应的分支指令位于指令执行周期的取指阶段时提示操作正是指令执行周期的一个执行阶段。这样,当间接分支在取指时提示操作将到达处理器的执行阶段。由此,就能给出对取指阶段中的分支预测的直接反馈。
可以将关键码信息与分支指令或包含提示操作的指令的地址混编(hash),以获得用来访问分支目标表的变址(index)。分支目标表可以是一个包含对间接分支的分支目标的间接分支目标缓冲器。在分支目标表中存储的分支目标可以是跳转表和/或虚拟功能表的最近使用的表目。由此,在访问数据高速缓存的时间长的情况下能获得时间优势。
处理器的访问装置可以包含用于将键码信息与处理器的执行阶段或取指阶段的地址混编的混编装置。由此,就能简单而迅速地生成用来访问间接分支目标缓冲器的变址。
以下将结合各附图更详细地说明本发明的最佳实施例。
附图说明
图1表示按照最佳实施例的处理器的示意框图;
图2表示按照最佳实施例的分支预测器的示意框图;
图3表示包含一个提示操作的开关语句的一个实现;
图4表示包含一个提示操作的虚拟功能调用的一个实现;
图5表示包含提示操作的加载操作和间接分支操作的流水线执行。
现在将如图1中所示的VLIW(甚长指令字)处理器的体系结构为基础说明最佳实施例。
从图1中可见,分支解析功能50在处理器的执行阶段被提供,并被安排得向程序计数器生成阶段的多路转换器10提供正确的分支目标。多路转换器10具有由下一个程序计数器功能70生成的下一个顺序程序计数器以及由分支预测器100生成的预测分支目标。此外,可以将中断向量或其它例外向量加到多路转换器10,后者然后输出一个要被提供给取指阶段的指令高速缓冲存储器20的经选择的程序计数器。将当前程序计数器进一步提供到分支预测器100。根据当前程序计数器,指令高速缓存20输出一个压缩指令,压缩指令被提供到解压阶段的解压器300,以生成当前指令字。注意,在VLIW处理器中不一定非要提供解压阶段,仅当要使用压缩指令时才提供。该指令字然后被提供到译码阶段的指令译码器40,VLIW指令在那里被解码后提供分支解析单元50。此外,执行阶段包含一个更新队列单元60,用于更新在分支预测器100中提供的分支目标缓冲器。这个更新是根据分支预测器100的预测器更新信息输出而执行的。此外,分支预测器100向执行阶段的分支解析单元50输出预测采取(predict taken)信息。
按照最佳实施例,将一个提示操作加入或纳入一个指令中,以向处理器硬件传送关于即将出现的间接分支的键码信息。然后,当该间接分支被提取并且其目标要被预测时,在执行阶段就能得到该提示操作,使得键码信息能被提供到分支预测器100。如图1中所示,解码的指令的一部分被提供到分支预测器100,如从解码的指令指向分支预测器100的输入端的箭头所表示的那样。这样,分支预测器100就能注意到有一个对间接分支的提示,于是就可能接受所提供的键码信息,以访问对应的分支目标缓冲器。
图2表示图1中所示的分支预测器100的示意框图。按照图2,分支预测器100包含一个分支目标缓冲器(BTB)108,这是一个将指令地址与分支目标相关联的高速缓存。如果某指令地址在BTB 108中命中,就知道该地址与一个分支指令有关,并将通过目标选择器114生成并输出一个预测。
此外,还提供一个预测分支方向的分支历史表(BHT)110。BHT 110预测有条件分支的方向,即某分支是否被采取。这一般可以由一个以程序计数器的低位部分作为变址的两个位饱和计数器(bitsaturating counters)的表来实现。如果被解析的令支被采取,这种计数器递增;如果不被采取,则递减。如果对应的两位计数器的最高有效位被置位时,分支被预测为被采取。两位计数器可包含弱状态和强状态,以在分支预测器100中引入某种形式的滞后(hysteresis)。每当在一个方向上的分支被错误预测时,可以在改变该预测之前给第二个机会。这是通过从强状态转移到弱状态但是保持相同的预测而实现的。每当分支再次被错误预测,则预测就被改变。如果预测是正确的,则从弱状态转移回到强状态。事实上BHT 110是一个无标记(tag-less)表,所以不检测将多个分支映射到同一个计数器的冲突。当预测由图1的解压阶段开启时,AND门112开放,以输出预测被采取信息。
另外,功能返回的预测能通过保持一个返回地址堆栈(RAS)106而得到改善。功能调用分支上推返回地址到RAS106,功能返回分支则弹出RAS106的值。为了确定分支类型—这在取指阶段中检测功能返回是必要的,BTB 108一般也将类型信息与指令地址相关联。备择方法是,可以将类型信息预先编码在指令高速缓存20中。
在最佳实施例中,如果在解码阶段检测到提示操作,则将提示所检测到的信息施加到分支预测器100的输入端。该提示所检测到的信息被提供到分支预测器100的目标选择器114,以便选择在分支预测器100中提供的一个另外的间接分支目标缓冲器(IBTB)的输出。此外,将从提示操作中导出的关键码信息提供到分支预测器100的输入端,从那里提供到一个内部混编单元100,在混编单元中,关键码信息与通过输入端d从取指阶段提供的当前程序计数器被混编。这样,即将出现的间接分支就由一个与该分支的目标有关的关键码所提示。如果指令是与开关语句有关的,则关键码信息可以是开关语句的开关值。此外,如果指令是与虚拟功能调用有关的,则关键码信息可以是虚拟功能调用的虚拟功能表的地址。然后在混编单元102中,将关键码信息或关键码与包含提示操作的指令的地址(程序计数器)混编,以获得IBTB 104的分支目标的无标记表中的变址。
IBTB 104可以由执行阶段的更新队列单元60根据分支解析单元50的输出和包含从分支预测器100输出的IBTB变址的预测器更新信息而更新。
图3和图4表示包含开关语句和虚拟功能调用是如何实现的。在两种情况中,用一个称作“bphint”的操作向硬件传送关于即将出现的间接分支的关键码。图3中的一般表达式“1d32xa,i→v”的意思是“v=a[i]”,图4中的一般表达式“1d32d(0)xa,i→v”的意思是“v=a[0]”。当间接分支“pjmpt”被提取并且需要由分支预测器100预测其目标时,bphint如图5中所示的那样在执行阶段中,图中在不同的时间点的纵向列中显示VLIW处理器的相继各阶段的并发内容。
分支预测器100由其输入端f的信号得知一个间接分支已经被提取,被导出的关键码信息被混编,以生成用于访问IBTB 104的变址,以便通过目标选择器114和分支预测器的输出端a生成和输出分支目标。IBTB变址通过输出端c被输出,并通过流水线从取指阶段传送到执行阶段,用于更新IBTB 104。
图3和图4中的每一行对应一条VLIW指令,其中图3中的开关指令由一个查找表组成,后面接着是一个间接分支;其中图4中的虚拟功能调用的实现包括加载一个虚拟功能表指针,后面接着是从这个表加载方法指针和一个指向该方法的间接分支。
图5涉及图4的虚拟功能调用,其中的箭头表示如何将信息从执行阶段的提示操作传送到取指阶段,从而为间接分支提供改善的分支预测。图5中的每行表示图5的左边所表示的指令的连续处理阶段,其中各行的偏移表示指令的流水线处理。当包含bphint操作的加载指令位于第一执行阶段中时,则pjmp分支指令位于取指阶段。
注意到所述技术也可以用于对功能指针产生的间接分支的预测。在这种情况中,编译器必须检测到一个要被用作关键码的值,分支目标就是根据该关键码被确定或者计算而及时可用的。特别地,编译器从所检测到的提示操作中导出(例如抽取或解译)关键码信息。被导出的关键码信息可以被编译器直接用于确定分支目标。作为备择方案,编译器也可以访问IBTB 104来获得分支目标。
如果加载延迟等于VLIW处理器的前端流水线阶段的数目,如上所述,就可以将提示操作与加载操作并行地调度。提示操作将在间接分支被提取时到达执行阶段。如果加载延迟比流水线的前端长,则可以将提示操作晚于加载操作调度。如果加载延迟比前端阶段的数目短,则间接分支可能要在以后调度,以便能使用提示操作提供的关键码。这可能增加指令计数,因此降低提示程序的有用性。
作为备择方案,也可以将所提出的技术以一个保存跳转表和虚拟功能表的表目的高速缓存的形式实现。这样,将这些表中最近使用的表目存储在IBTB 104中。如果访问普通数据高速缓存太费时间的话,这样一个高速缓存功能可能是有用的。
因此,与开始时所述的已知的CS-DBT技术相比,本发明建议预测分支目标和向分支预测器提供一个与分支目标直接有关的关键码。由此实现一种确定性的方法。
注意到可以提供任何种类的提示操作来导出任何种类的适合于提供对间接分支目标缓冲器或其它目标表的变址或其它种类的访问的关键码信息。此外,可以采用任何种类的混编方法来从关键码信息生成变址信息。可以实现无标记间接目标高速缓存的变体。它们可能在将关键码信息与指令地址信息混编入IBTB 104的方法上有所不同。因此,本发明并不限于上述的最佳实施例,而是能应用于任何包含分支预测功能的处理器装置。本发明打算包含在后附权利要求的范围内的任何改变。

Claims (15)

1.一种用于预测程序的分支目标的方法,所述方法包含下述步骤:
a)提供一个包含多个分支目标的分支目标表(104);
b)用所述程序中的一个提示操作来导出关键码信息;
c)根据所述关键码信息从所述分支目标表(104)中选择所述分支目标。
2.按照权利要求1的方法,其中,根据由其产生分支的开关语句的开关值导出所述关键码信息。
3.按照权利要求1或2的方法,其中,根据由其产生分支的虚拟功能调用的虚拟功能表导出所述关键码信息。
4.按照前述任何一项权利要求的方法,其中,所述提示操作被包含在VLIW指令中。
5.按照前述任何一项权利要求的方法,其中,将所述关键码信息与分支指令或包含所述提示操作的指令的地址混编在一起,以获得用于访问所述分支目标表(104)的变址。
6.按照前述任何一项权利要求的方法,其中,所述分支目标表是一个包含用于间接分支的分支目标的间接分支目标缓冲器(104)。
7.按照前述任何一项权利要求的方法,其中,所述提示操作是在所述程序的预定位置提供的,所述预定位置的选择要使得当对应的分支指令位于指令执行周期的取指阶段时提示操作正位于指令执行周期的执行阶段。
8.按照前述任何一项权利要求的方法,其中,所述所述预测方法被用来预测由功能指针产生的间接分支的分支目标。
9.按照前述任何一项权利要求的方法,进一步包含在所述分支目标表中存储跳转表和/或虚拟功能能表的最近使用的表目的步骤。
10.按照前述任何一项权利要求的方法,其中,所述预测方法是一个编译器合成的动态分支预测方法。
11.一种用于预测程序的分支目标的处理器,所述处理器包含:
a)用于存储多个分支目标的分支目标缓冲器装置(104);
b)用于检测所述程序的一个提示操作并从该提示操作导出关键码信息的解译装置(4);
c)用于用所述关键码信息访问所述分支目标缓冲器装置(104)以选择所述分支目标的访问装置(102)。
12.按照权利要求11的处理器,其中,分支目标缓冲器装置(104)被安排得存储间接分支目标,并且其中提供另一个分支目标缓冲器装置(108)来存储直接分支目标。
13.按照权利要求11或12的处理器,其中,所述访问装置包含用于将所述关键码信息与所述处理器的执行阶段或取指阶段的地址混编的混编装置(102)。
14.一种用于预测程序的分支目标的编译器,其中所述编译器被安排得检测所述程序中的提示操作,从所述提示操作导出关键码信息,并根据所述关键码信息确定所述分支目标。
15.权利要求14的编译器,其中,所述分支目标是从功能指针的间接分支产生的。
CNB028128931A 2001-06-29 2002-06-20 预测间接分支目标地址的方法、装置和编译器 Expired - Fee Related CN1265286C (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
EP01202499 2001-06-29
EP01202499.8 2001-06-29

Publications (2)

Publication Number Publication Date
CN1520547A true CN1520547A (zh) 2004-08-11
CN1265286C CN1265286C (zh) 2006-07-19

Family

ID=8180556

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB028128931A Expired - Fee Related CN1265286C (zh) 2001-06-29 2002-06-20 预测间接分支目标地址的方法、装置和编译器

Country Status (6)

Country Link
US (1) US20040172524A1 (zh)
EP (1) EP1405174A1 (zh)
JP (1) JP3805339B2 (zh)
KR (1) KR20040014988A (zh)
CN (1) CN1265286C (zh)
WO (1) WO2003003195A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012145997A1 (zh) * 2011-04-28 2012-11-01 北京北大众志微系统科技有限责任公司 一种实现值关联间接跳转预测的装置
WO2012145992A1 (zh) * 2011-04-28 2012-11-01 北京北大众志微系统科技有限责任公司 一种实现值关联间接跳转预测的方法
CN102934075A (zh) * 2010-06-28 2013-02-13 高通股份有限公司 用于使用预先通知技术改变程序的顺序流程的方法和设备
CN103927149A (zh) * 2013-01-14 2014-07-16 想象力科技有限公司 间接分支预测

Families Citing this family (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7302380B2 (en) * 2002-12-12 2007-11-27 Matsushita Electric, Industrial Co., Ltd. Simulation apparatus, method and program
US20050273559A1 (en) * 2004-05-19 2005-12-08 Aris Aristodemou Microprocessor architecture including unified cache debug unit
US7409535B2 (en) * 2005-04-20 2008-08-05 International Business Machines Corporation Branch target prediction for multi-target branches by identifying a repeated pattern
US7747088B2 (en) 2005-09-28 2010-06-29 Arc International (Uk) Limited System and methods for performing deblocking in microprocessor-based video codec applications
US20070088937A1 (en) * 2005-10-13 2007-04-19 International Business Machines Corporation Computer-implemented method and processing unit for predicting branch target addresses
US8935517B2 (en) 2006-06-29 2015-01-13 Qualcomm Incorporated System and method for selectively managing a branch target address cache of a multiple-stage predictor
US20080010635A1 (en) * 2006-07-07 2008-01-10 O'brien John Kevin Method, Apparatus, and Program Product for Improving Branch Prediction in a Processor Without Hardware Branch Prediction but Supporting Branch Hint Instruction
US8909907B2 (en) * 2008-02-12 2014-12-09 International Business Machines Corporation Reducing branch prediction latency using a branch target buffer with a most recently used column prediction
US8312254B2 (en) 2008-03-24 2012-11-13 Nvidia Corporation Indirect function call instructions in a synchronous parallel thread processor
CN102099781A (zh) * 2009-05-19 2011-06-15 松下电器产业株式会社 分支预测装置、其分支预测方法、编译器、其编译方法及分支预测程序记录介质
US20110078425A1 (en) * 2009-09-25 2011-03-31 Shah Manish K Branch prediction mechanism for predicting indirect branch targets
US8612731B2 (en) 2009-11-06 2013-12-17 International Business Machines Corporation Branch target buffer for emulation environments
US9477478B2 (en) * 2012-05-16 2016-10-25 Qualcomm Incorporated Multi level indirect predictor using confidence counter and program counter address filter scheme
US20130346727A1 (en) * 2012-06-25 2013-12-26 Qualcomm Incorporated Methods and Apparatus to Extend Software Branch Target Hints
US20140250289A1 (en) * 2013-03-01 2014-09-04 Mips Technologies, Inc. Branch Target Buffer With Efficient Return Prediction Capability
US9442736B2 (en) 2013-08-08 2016-09-13 Globalfoundries Inc Techniques for selecting a predicted indirect branch address from global and local caches
CN104572024A (zh) * 2014-12-30 2015-04-29 杭州中天微系统有限公司 一种用于函数返回地址预测的装置及方法
US10185731B2 (en) 2016-03-31 2019-01-22 Arm Limited Indexing entries of a storage structure shared between multiple threads
CN105867880B (zh) * 2016-04-01 2018-12-04 中国科学院计算技术研究所 一种面向间接跳转分支预测的分支目标缓冲器及设计方法
US20180004627A1 (en) * 2016-06-29 2018-01-04 Centipede Semi Ltd. Sequential monitoring and management of code segments for run-time parallelization
US10884746B2 (en) 2017-08-18 2021-01-05 International Business Machines Corporation Determining and predicting affiliated registers based on dynamic runtime control flow analysis
US10884747B2 (en) 2017-08-18 2021-01-05 International Business Machines Corporation Prediction of an affiliated register
US10719328B2 (en) 2017-08-18 2020-07-21 International Business Machines Corporation Determining and predicting derived values used in register-indirect branching
US11150904B2 (en) 2017-08-18 2021-10-19 International Business Machines Corporation Concurrent prediction of branch addresses and update of register contents
US10908911B2 (en) 2017-08-18 2021-02-02 International Business Machines Corporation Predicting and storing a predicted target address in a plurality of selected locations
US10884745B2 (en) * 2017-08-18 2021-01-05 International Business Machines Corporation Providing a predicted target address to multiple locations based on detecting an affiliated relationship
US10534609B2 (en) 2017-08-18 2020-01-14 International Business Machines Corporation Code-specific affiliated register prediction
US11150908B2 (en) 2017-08-18 2021-10-19 International Business Machines Corporation Dynamic fusion of derived value creation and prediction of derived values in a subroutine branch sequence
US10819736B2 (en) * 2017-11-29 2020-10-27 Arm Limited Encoding of input to branch prediction circuitry
US11126714B2 (en) 2017-11-29 2021-09-21 Arm Limited Encoding of input to storage circuitry
GB2573119A (en) * 2018-04-24 2019-10-30 Advanced Risc Mach Ltd Maintaining state of speculation
US11301251B2 (en) * 2020-03-30 2022-04-12 SiFive, Inc. Fetch stage handling of indirect jumps in a processor pipeline
US20220197657A1 (en) * 2020-12-22 2022-06-23 Intel Corporation Segmented branch target buffer based on branch instruction type
CN117008979B (zh) * 2023-10-07 2023-12-26 北京数渡信息科技有限公司 一种分支预测器

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4860199A (en) * 1987-07-31 1989-08-22 Prime Computer, Inc. Hashing indexer for branch cache
CA2045790A1 (en) * 1990-06-29 1991-12-30 Richard Lee Sites Branch prediction in high-performance processor
DE4211222B4 (de) * 1991-04-05 2009-05-28 Kabushiki Kaisha Toshiba, Kawasaki Abzweigungs-Vorhersage-Vorrichtung und Abzweigungs-Vorhersage-Verfahren für einen Super-Skalar-Prozessor
US5790845A (en) * 1995-02-24 1998-08-04 Hitachi, Ltd. System with reservation instruction execution to store branch target address for use upon reaching the branch point
US5857104A (en) * 1996-11-26 1999-01-05 Hewlett-Packard Company Synthetic dynamic branch prediction
JP3570855B2 (ja) * 1997-05-29 2004-09-29 株式会社日立製作所 分岐予測装置
US6035118A (en) * 1997-06-23 2000-03-07 Sun Microsystems, Inc. Mechanism to eliminate the performance penalty of computed jump targets in a pipelined processor
US6185676B1 (en) * 1997-09-30 2001-02-06 Intel Corporation Method and apparatus for performing early branch prediction in a microprocessor
US6178498B1 (en) * 1997-12-18 2001-01-23 Idea Corporation Storing predicted branch target address in different storage according to importance hint in branch prediction instruction
US6314493B1 (en) * 1998-02-03 2001-11-06 International Business Machines Corporation Branch history cache
US7219217B1 (en) * 1998-10-16 2007-05-15 Intel Corporation Apparatus and method for branch prediction utilizing a predictor combination in parallel with a global predictor
US6601161B2 (en) * 1998-12-30 2003-07-29 Intel Corporation Method and system for branch target prediction using path information
US6499101B1 (en) * 1999-03-18 2002-12-24 I.P. First L.L.C. Static branch prediction mechanism for conditional branch instructions
US6324643B1 (en) * 1999-10-01 2001-11-27 Hitachi, Ltd. Branch prediction and target instruction control for processor

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102934075A (zh) * 2010-06-28 2013-02-13 高通股份有限公司 用于使用预先通知技术改变程序的顺序流程的方法和设备
CN102934075B (zh) * 2010-06-28 2015-12-02 高通股份有限公司 用于使用预先通知技术改变程序的顺序流程的方法和设备
WO2012145997A1 (zh) * 2011-04-28 2012-11-01 北京北大众志微系统科技有限责任公司 一种实现值关联间接跳转预测的装置
WO2012145992A1 (zh) * 2011-04-28 2012-11-01 北京北大众志微系统科技有限责任公司 一种实现值关联间接跳转预测的方法
CN103927149A (zh) * 2013-01-14 2014-07-16 想象力科技有限公司 间接分支预测
CN103927149B (zh) * 2013-01-14 2018-10-16 美普思技术有限责任公司 间接分支预测

Also Published As

Publication number Publication date
US20040172524A1 (en) 2004-09-02
JP2004533695A (ja) 2004-11-04
EP1405174A1 (en) 2004-04-07
CN1265286C (zh) 2006-07-19
KR20040014988A (ko) 2004-02-18
WO2003003195A1 (en) 2003-01-09
JP3805339B2 (ja) 2006-08-02

Similar Documents

Publication Publication Date Title
CN1265286C (zh) 预测间接分支目标地址的方法、装置和编译器
KR100974384B1 (ko) 분기 명령들을 예측하기 위한 방법 및 장치
EP0957428B1 (en) Method and apparatus for fetching non-contiguous instructions in a data processing system
US7197603B2 (en) Method and apparatus for high performance branching in pipelined microsystems
EP1513062B1 (en) Apparatus, method and computer data signal for selectively overriding return stack prediction in response to detection of non-standard return sequence
US7882338B2 (en) Method, system and computer program product for an implicit predicted return from a predicted subroutine
KR970029034A (ko) 프로세서내 인스트럭션 실행 방법 및 시스템과 데이타 처리 시스템
US20020199091A1 (en) Apparatus for branch prediction based on history table
EP2084602B1 (en) A system and method for using a working global history register
JP5579694B2 (ja) 復帰スタックを管理する方法および装置
CN101884025B (zh) 用于使过程返回序列加速的方法和系统
JP2010501913A (ja) 可変長命令セット内の分岐命令の最後の粒度(granularity)と関連付けられたキャッシュ分岐情報
CN117971324A (zh) 一种cpu指令预取方法、装置、设备及存储介质
US6701426B1 (en) Switching between a plurality of branch prediction processes based on which instruction set is operational wherein branch history data structures are the same for the plurality of instruction sets
US20040003213A1 (en) Method for reducing the latency of a branch target calculation by linking the branch target address cache with the call-return stack
US20090070569A1 (en) Branch prediction device,branch prediction method, and microprocessor
JP5696210B2 (ja) プロセッサ及びその命令処理方法
US20030131345A1 (en) Employing value prediction with the compiler
Koppelman The benefit of multiple branch prediction on dynamically scheduled systems

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: IPG ELECTRONICS 503 CO., LTD.

Free format text: FORMER OWNER: ROYAL PHILIPS ELECTRONICS CO., LTD.

Effective date: 20090821

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20090821

Address after: British Channel Islands

Patentee after: Koninkl Philips Electronics NV

Address before: Holland Ian Deho Finn

Patentee before: Koninklike Philips Electronics N. V.

ASS Succession or assignment of patent right

Owner name: PENDRAGON WIRELESS CO., LTD.

Free format text: FORMER OWNER: IPG ELECTRONICS 503 LTD.

Effective date: 20130109

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20130109

Address after: Washington State

Patentee after: Pendragon wireless limited liability company

Address before: British Channel Islands

Patentee before: Koninkl Philips Electronics NV

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20060719

Termination date: 20140620

EXPY Termination of patent right or utility model