JP5270257B2 - 予測されなかったブランチに対する命令バッファの深さを動的に管理するための方法および装置 - Google Patents
予測されなかったブランチに対する命令バッファの深さを動的に管理するための方法および装置 Download PDFInfo
- Publication number
- JP5270257B2 JP5270257B2 JP2008211300A JP2008211300A JP5270257B2 JP 5270257 B2 JP5270257 B2 JP 5270257B2 JP 2008211300 A JP2008211300 A JP 2008211300A JP 2008211300 A JP2008211300 A JP 2008211300A JP 5270257 B2 JP5270257 B2 JP 5270257B2
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- branch
- buffer
- path
- processor
- 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.)
- Expired - Fee Related
Links
- 239000000872 buffer Substances 0.000 title claims abstract description 66
- 238000000034 method Methods 0.000 title claims abstract description 21
- 238000012545 processing Methods 0.000 claims description 15
- 238000005259 measurement Methods 0.000 claims description 3
- 238000005192 partition Methods 0.000 claims 3
- 238000011156 evaluation Methods 0.000 claims 2
- 230000007246 mechanism Effects 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 7
- 230000015654 memory Effects 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 230000002093 peripheral effect Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000000717 retained effect Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000003139 buffering effect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline or look ahead
- G06F9/3802—Instruction prefetching
- G06F9/3804—Instruction prefetching for branches, e.g. hedging, branch folding
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)
Description
Claims (18)
- プロセッサにおける命令バッファ資源を管理するための方法であって、
ブランチ命令の可能性の高いパスに対応する第1命令ストリームを命令バッファの第1部分に格納するステップと、
ブランチ命令の可能性の低いパスに対応する第2命令ストリームを前記命令バッファの第2部分に格納するステップと、
命令スレッドに対するブランチ予測確度の値を計算するステップと、
前記ブランチ予測確度の値に従って、前記命令バッファの前記第1部分および前記第2部分のサイズを設定するステップと、を含む方法。 - 前記ブランチ予測確度の値が所定の閾値を越えるかどうかを決定するステップを更に含み、
前記設定するステップは、前記ブランチ予測確度の値が所定の閾値を越えるという決定に応答して、前記予測されなかったブランチに対して割振られた命令バッファのサイズをゼロに設定する、請求項1に記載の方法。 - 前記プロセッサによって実行される命令スレッドに対して前記計算するステップおよび前記設定するステップを反復するステップを更に含み、
それにより、前記ブランチ予測確度の値が変化するに従って、前記命令バッファの前記第2部分のサイズが動的に調節される、請求項1に記載の方法。 - 前記プロセッサは複数の命令スレッドに対する命令を実行し、
前記設定するステップは、各々が前記複数の命令スレッドの1つに対応する複数のパーティションに前記命令バッファにおける記憶域を、各対応するスレッドに対するブランチ予測確度の値に従って、前記複数のパーティションにおける第1部分および第2部分に割振る、請求項1に記載の方法。 - 前記計算するステップは、各ブランチ命令の前記命令スレッドに対するブランチ予測確度の値を計算し、
前記設定するステップは、次のブランチ命令に対するブランチ予測確度の値に従って前記命令バッファの前記第1部分および前記第2部分のサイズを設定する、請求項1に記載の方法。 - 前記計算するステップは、複数のブランチ命令の前記命令スレッドに対するブランチ予測確度の平均値を計算し、
前記設定するステップは、前記ブランチ予測確度の平均値に従って前記命令バッファの前記第1部分および前記第2部分のサイズを設定する、請求項1に記載の方法。 - 予測されなかったパスに対応する代替フェッチ・アドレスを格納するステップと、
ブランチ命令に関して実施されたパスを解析するステップと、
前記ブランチ命令が予測誤りされた場合、前記代替フェッチ・アドレスに従って前記第2部分から命令を検索するステップと、を更に含む、請求項1に記載の方法。 - 前記検索するステップは、前記予測されなかったブランチに対する格納された多数の命令が空になった後、前記第1部分から命令を検索する、請求項7に記載の方法。
- ブランチ命令を実行するためのブランチ実行ユニットを含み、プログラム命令を実行するための機能的実行ブロックと、
命令バッファと、
前記プログラム命令を前記命令バッファにロードするための命令フェッチ・ユニットと、
ブランチ命令に遭遇したことを決定し、前記ブランチ命令の可能性の高いパスを決定し、前記可能性の高いパスに対応する第1命令ストリームを前記命令バッファの第1部分にロードし、可能性の低いパスに対応する第2命令ストリームを前記命令バッファの第2部分にロードするように前記命令フェッチ・ユニットに指示するためのブランチ処理ユニットと、
前記ブランチ処理ユニットに接続され、前記ブランチ処理ユニットによる決定の確度を測定し、前記測定の結果に従って前記第1部分および前記第2部分のサイズを調節するための制御回路と、を含むプロセッサ。 - 前記制御回路は前記第2部分のサイズをゼロに設定し、
前記ブランチ処理ユニットは、所定の閾値を越える確度を前記処理ユニットが測定したことに応答して、前記第2命令ストリームに関するいずれの命令もロードしない、請求項9に記載のプロセッサ。 - 前記制御回路は前記確度を反復的に測定し、前記プロセッサによって実行された命令スレッドに対して前記命令バッファの前記第2部分のサイズを調節し、
それにより、前記ブランチ処理ユニットによる前記決定の確度が変化するに従って、前記命令バッファの前記第2部分のサイズが動的に調節される、請求項9に記載のプロセッサ。 - 前記プログラム命令は複数の命令スレッドに対するプログラム命令であり、
前記制御回路は、各々が前記複数の命令スレッドの1つに対応する複数のパーティションに前記命令バッファにおける記憶域を、各対応するスレッドに対するブランチ予測確度の値に従って、前記複数のパーティションにおける第1部分および第2部分に割振る、
請求項9に記載のプロセッサ。 - 前記制御回路は、各ブランチ命令の命令スレッドに対するブランチ予測確度の値を計算し、更に、次のブランチ命令に対するブランチ予測確度の値に従って前記命令バッファの前記第1部分および前記第2部分のサイズを設定する、請求項9に記載のプロセッサ。
- 前記制御回路は、複数のブランチ命令の命令スレッドに対するブランチ予測確度の平均値を計算し、更に、前記ブランチ予測確度の平均値に従って前記命令バッファの前記第1部分および前記第2部分のサイズを設定する、請求項9に記載のプロセッサ。
- 前記可能性の高いパスの命令をフェッチするために命令キャッシュに順次アドレスを供給するための命令フェッチ・アドレス・レジスタと、
前記予測されなかったパスに対応する命令キャッシュに代替アドレスを格納するための代替命令フェッチ・アドレス・テーブルと、
前記ブランチ命令が前記可能性の低いパスにブランチするものとして解析されたということを前記制御回路が決定したことに応答して前記代替アドレスを前記命令フェッチ・アドレス・レジスタにロードするための選択回路と、を更に含む、請求項9に記載のプロセッサ。 - 前記命令フェッチ・ユニットは、前記予測されなかったブランチに対する格納された命令が空になった後、前記第1部分から命令を検索する、請求項15に記載のプロセッサ。
- プロセッサ・パイプラインのための命令フェッチ回路であって、
次の命令フェッチ・アドレスを命令キャッシュに供給するための命令フェッチ・アドレス・レジスタと、
予測されなかったブランチ・パスのアドレスを格納するための代替命令フェッチ・アドレス・テーブルと、
ブランチ評価回路と、
前記命令フェッチ・アドレス・レジスタの出力および前記代替命令フェッチ・アドレス・テーブルの出力のどちらかを選択するためのセレクタと、
前記ブランチ命令に関する可能性の高いパスを指示するためのブランチ予測ユニットと、
前記命令フェッチ・アドレス・レジスタによって索引付けされ、予測されたブランチ・パスに対応するバッファ部分および予測されなかったブランチ・パスに対応するバッファ部分の2つのバッファ部分を有する命令バッファと、を含み、
前記セレクタは、前記ブランチ評価回路によるブランチ命令の解析に応答して作動し、それによって、前記次の命令フェッチ・アドレスが前記予測されなかったブランチが実施されるということを前記ブランチ命令の解析が示す場合、前記次の命令フェッチ・アドレスが前記予測されなかったブランチ・パスにリダイレクトされ、
前記2つのバッファ部分の相対的サイズが、前記ブランチ予測ユニットによって供給された前記指示における確度の量に従って設定される、命令フェッチ回路。 - 前記セレクタは、複数の命令スレッドのセットの各々に対して1つの複数のセレクタを含み、更に、前記命令フェッチ・アドレス・レジスタに次の値を供給するために前記複数のセレクタの出力のどれかを選択するための第2セレクタを更に含む、請求項17に記載の命令フェッチ回路。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US11/845838 | 2007-08-28 | ||
US11/845,838 US7779232B2 (en) | 2007-08-28 | 2007-08-28 | Method and apparatus for dynamically managing instruction buffer depths for non-predicted branches |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2009054150A JP2009054150A (ja) | 2009-03-12 |
JP5270257B2 true JP5270257B2 (ja) | 2013-08-21 |
Family
ID=40409332
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008211300A Expired - Fee Related JP5270257B2 (ja) | 2007-08-28 | 2008-08-20 | 予測されなかったブランチに対する命令バッファの深さを動的に管理するための方法および装置 |
Country Status (2)
Country | Link |
---|---|
US (1) | US7779232B2 (ja) |
JP (1) | JP5270257B2 (ja) |
Families Citing this family (32)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8370622B1 (en) * | 2007-12-31 | 2013-02-05 | Rockstar Consortium Us Lp | Method and apparatus for increasing the output of a cryptographic system |
US9529594B2 (en) | 2010-11-30 | 2016-12-27 | Oracle International Corporation | Miss buffer for a multi-threaded processor |
US9182991B2 (en) * | 2012-02-06 | 2015-11-10 | International Business Machines Corporation | Multi-threaded processor instruction balancing through instruction uncertainty |
US20130318332A1 (en) * | 2012-05-22 | 2013-11-28 | Jeffry E. Gonion | Branch misprediction behavior suppression using a branch optional instruction |
US9442737B2 (en) | 2012-06-15 | 2016-09-13 | International Business Machines Corporation | Restricting processing within a processor to facilitate transaction completion |
US9772854B2 (en) | 2012-06-15 | 2017-09-26 | International Business Machines Corporation | Selectively controlling instruction execution in transactional processing |
US8966324B2 (en) | 2012-06-15 | 2015-02-24 | International Business Machines Corporation | Transactional execution branch indications |
US9384004B2 (en) | 2012-06-15 | 2016-07-05 | International Business Machines Corporation | Randomized testing within transactional execution |
US9348642B2 (en) | 2012-06-15 | 2016-05-24 | International Business Machines Corporation | Transaction begin/end instructions |
US9436477B2 (en) | 2012-06-15 | 2016-09-06 | International Business Machines Corporation | Transaction abort instruction |
US8880959B2 (en) | 2012-06-15 | 2014-11-04 | International Business Machines Corporation | Transaction diagnostic block |
US9317460B2 (en) | 2012-06-15 | 2016-04-19 | International Business Machines Corporation | Program event recording within a transactional environment |
US8688661B2 (en) | 2012-06-15 | 2014-04-01 | International Business Machines Corporation | Transactional processing |
US8682877B2 (en) | 2012-06-15 | 2014-03-25 | International Business Machines Corporation | Constrained transaction execution |
US9336046B2 (en) | 2012-06-15 | 2016-05-10 | International Business Machines Corporation | Transaction abort processing |
US10437602B2 (en) | 2012-06-15 | 2019-10-08 | International Business Machines Corporation | Program interruption filtering in transactional execution |
US9361115B2 (en) | 2012-06-15 | 2016-06-07 | International Business Machines Corporation | Saving/restoring selected registers in transactional processing |
US9448796B2 (en) | 2012-06-15 | 2016-09-20 | International Business Machines Corporation | Restricted instructions in transactional execution |
US9740549B2 (en) | 2012-06-15 | 2017-08-22 | International Business Machines Corporation | Facilitating transaction completion subsequent to repeated aborts of the transaction |
US9367323B2 (en) | 2012-06-15 | 2016-06-14 | International Business Machines Corporation | Processor assist facility |
US20130339680A1 (en) | 2012-06-15 | 2013-12-19 | International Business Machines Corporation | Nontransactional store instruction |
US10628163B2 (en) | 2014-04-17 | 2020-04-21 | Texas Instruments Incorporated | Processor with variable pre-fetch threshold |
US9471314B1 (en) | 2015-12-15 | 2016-10-18 | International Business Machines Corporation | Auxiliary perceptron branch predictor with magnitude usage limit |
US11507380B2 (en) * | 2018-08-29 | 2022-11-22 | Advanced Micro Devices, Inc. | Branch confidence throttle |
US10853075B2 (en) * | 2018-09-10 | 2020-12-01 | Advanced Micro Devices, Inc. | Controlling accesses to a branch prediction unit for sequences of fetch groups |
US11099852B2 (en) * | 2018-10-25 | 2021-08-24 | Arm Limitied | Apparatus and method for maintaining prediction performance metrics for prediction components for each of a plurality of execution regions and implementing a prediction adjustment action based thereon |
US10846097B2 (en) * | 2018-12-20 | 2020-11-24 | Samsung Electronics Co., Ltd. | Mispredict recovery apparatus and method for branch and fetch pipelines |
US11188340B2 (en) * | 2018-12-20 | 2021-11-30 | International Business Machines Corporation | Multiple streams execution for hard-to-predict branches in a microprocessor |
US11360773B2 (en) | 2020-06-22 | 2022-06-14 | Microsoft Technology Licensing, Llc | Reusing fetched, flushed instructions after an instruction pipeline flush in response to a hazard in a processor to reduce instruction re-fetching |
US20220075624A1 (en) * | 2020-09-04 | 2022-03-10 | Advanced Micro Devices, Inc. | Alternate path for branch prediction redirect |
US12014182B2 (en) | 2021-08-20 | 2024-06-18 | International Business Machines Corporation | Variable formatting of branch target buffer |
GB2622362A (en) * | 2022-09-09 | 2024-03-20 | Advanced Risc Mach Ltd | Methods and apparatus controlling prediction units |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5918046A (en) * | 1994-01-03 | 1999-06-29 | Intel Corporation | Method and apparatus for a branch instruction pointer table |
US5870599A (en) * | 1994-03-01 | 1999-02-09 | Intel Corporation | Computer system employing streaming buffer for instruction preetching |
US5881278A (en) * | 1995-10-30 | 1999-03-09 | Advanced Micro Devices, Inc. | Return address prediction system which adjusts the contents of return stack storage to enable continued prediction after a mispredicted branch |
EP0848323B1 (en) * | 1996-12-10 | 2004-02-25 | Texas Instruments Incorporated | Improvements in the branch prediction within a pipelined microprocessor |
US6766441B2 (en) * | 2001-01-19 | 2004-07-20 | International Business Machines Corporation | Prefetching instructions in mis-predicted path for low confidence branches |
US7124287B2 (en) * | 2003-05-12 | 2006-10-17 | International Business Machines Corporation | Dynamically adaptive associativity of a branch target buffer (BTB) |
JP2005107666A (ja) * | 2003-09-29 | 2005-04-21 | Matsushita Electric Ind Co Ltd | データ処理装置 |
US20050216714A1 (en) * | 2004-03-25 | 2005-09-29 | Intel Corporation | Method and apparatus for predicting confidence and value |
-
2007
- 2007-08-28 US US11/845,838 patent/US7779232B2/en not_active Expired - Fee Related
-
2008
- 2008-08-20 JP JP2008211300A patent/JP5270257B2/ja not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2009054150A (ja) | 2009-03-12 |
US7779232B2 (en) | 2010-08-17 |
US20090063819A1 (en) | 2009-03-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5270257B2 (ja) | 予測されなかったブランチに対する命令バッファの深さを動的に管理するための方法および装置 | |
KR101493019B1 (ko) | 희소 및 조밀 예측 캐쉬들을 갖는 하이브리드 브랜치 예측 장치 | |
EP2035920B1 (en) | Local and global branch prediction information storage | |
US7890738B2 (en) | Method and logical apparatus for managing processing system resource use for speculative execution | |
US9286075B2 (en) | Optimal deallocation of instructions from a unified pick queue | |
US7734897B2 (en) | Allocation of memory access operations to memory access capable pipelines in a superscalar data processing apparatus and method having a plurality of execution threads | |
KR100745904B1 (ko) | 동시적 멀티스레드 프로세서에서 파이프라인 길이를변경하기 위한 방법 및 회로 | |
US7032097B2 (en) | Zero cycle penalty in selecting instructions in prefetch buffer in the event of a miss in the instruction cache | |
US20080126771A1 (en) | Branch Target Extension for an Instruction Cache | |
US20070288733A1 (en) | Early Conditional Branch Resolution | |
US20040215720A1 (en) | Split branch history tables and count cache for simultaneous multithreading | |
JP2008529191A (ja) | 電力的に効率的な命令プリフェッチ機構 | |
US11599361B2 (en) | Flushing a fetch queue using predecode circuitry and prediction information | |
US8301871B2 (en) | Predicated issue for conditional branch instructions | |
JP2009536770A (ja) | ブロックに基づく分岐先アドレスキャッシュ | |
US20070288732A1 (en) | Hybrid Branch Prediction Scheme | |
US20070288731A1 (en) | Dual Path Issue for Conditional Branch Instructions | |
US20070288734A1 (en) | Double-Width Instruction Queue for Instruction Execution | |
JP7046087B2 (ja) | キャッシュ・ミス・スレッド・バランシング | |
EP4020187A1 (en) | Segmented branch target buffer based on branch instruction type | |
EP4020167A1 (en) | Accessing a branch target buffer based on branch instruction information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110802 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20121204 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130226 |
|
RD12 | Notification of acceptance of power of sub attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7432 Effective date: 20130226 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20130226 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20130416 |
|
RD14 | Notification of resignation of power of sub attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7434 Effective date: 20130416 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130509 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |