Knowledge (XXG)

Branch target predictor

Source 📝

179: 77: 409: 36: 288:
would have an even larger loss. To ameliorate the loss, some machines implement branch target prediction: given the address of a branch, they predict the target of that branch. A refinement of the idea predicts the start of a sequential run of instructions given the address of the start of the previous sequential run of instructions.
287:
In machines where this recurrence takes two cycles, the machine loses one full cycle of fetch after every predicted taken branch. As predicted branches happen every 10 instructions or so, this can force a substantial drop in fetch bandwidth. Some machines with longer instruction cache latencies
305:
As the predictor RAM can be 5–10% of the size of the instruction cache, the fetch happens much faster than the instruction cache fetch, and so this recurrence is much faster. If it were not fast enough, it could be parallelized, by predicting target addresses of target branches.
94: 49: 450: 333: 327: 321: 141: 217: 160: 113: 63: 474: 469: 120: 98: 238:
is the part of a processor that predicts the target, i.e. the address of the instruction that is executed next, of a taken
264:
latency grows longer and the fetch width grows wider, branch target extraction becomes a bottleneck. The recurrence is:
188: 127: 55: 443: 109: 87: 315: 243: 436: 231: 134: 257: 239: 370: 253:
which attempts to guess whether a conditional branch will be taken or not-taken (i.e., binary).
280: 261: 250: 420: 298:
Fetch the prediction for the addresses of the targets of branches in that run of instructions
416: 195:
Please help update this article to reflect recent events or newly available information.
383: 463: 17: 76: 357:
The Behavior of Efficient Virtual Machine Interpreters on Modern Architectures
379: 408: 301:
Select the address corresponding to the branch predicted taken
172: 70: 29: 424: 271:
Instructions in block are scanned to identify branches
246:
is computed by the execution unit of the processor.
101:. Unsourced material may be challenged and removed. 384:"The microarchitecture of Intel, AMD and VIA CPUs" 295:Hash the address of the first instruction in a run 242:or an unconditional branch instruction before the 191:may be compromised due to out-of-date information 291:This predictor reduces the recurrence above to: 268:Instruction cache fetches block of instructions 444: 8: 249:Branch target prediction is not the same as 64:Learn how and when to remove these messages 451: 437: 274:First predicted taken branch is identified 218:Learn how and when to remove this message 161:Learn how and when to remove this message 334:Single thread indirect branch predictor 328:Indirect branch restricted speculation 7: 405: 403: 99:adding citations to reliable sources 349:Accurate Indirect Branch Prediction 423:. You can help Knowledge (XXG) by 322:Indirect branch prediction barrier 25: 277:Target of that branch is computed 45:This article has multiple issues. 407: 244:target of the branch instruction 177: 75: 34: 86:needs additional citations for 53:or discuss these issues on the 1: 27:Part of a computer processor 491: 402: 283:restarts at branch target 110:"Branch target predictor" 347:Driesen; Hölzle (1992), 371:"Branch Target Buffers" 316:Indirect branch control 236:branch target predictor 475:Computer science stubs 470:Instruction processing 232:computer architecture 355:Ertl; Gregg (2001), 95:improve this article 18:Branch Target Buffer 258:parallel processor 240:conditional branch 432: 431: 281:Instruction fetch 262:instruction cache 251:branch prediction 228: 227: 220: 210: 209: 171: 170: 163: 145: 68: 16:(Redirected from 482: 453: 446: 439: 417:computer science 411: 404: 396: 394: 393: 388: 374: 359: 351: 260:designs, as the 223: 216: 205: 202: 196: 189:factual accuracy 181: 180: 173: 166: 159: 155: 152: 146: 144: 103: 79: 71: 60: 38: 37: 30: 21: 490: 489: 485: 484: 483: 481: 480: 479: 460: 459: 458: 457: 400: 391: 389: 386: 378: 369: 366: 354: 346: 343: 341:Further reading 312: 224: 213: 212: 211: 206: 200: 197: 194: 186:This article's 182: 178: 167: 156: 150: 147: 104: 102: 92: 80: 39: 35: 28: 23: 22: 15: 12: 11: 5: 488: 486: 478: 477: 472: 462: 461: 456: 455: 448: 441: 433: 430: 429: 412: 398: 397: 376: 365: 364:External links 362: 361: 360: 352: 342: 339: 338: 337: 331: 325: 319: 311: 308: 303: 302: 299: 296: 285: 284: 278: 275: 272: 269: 226: 225: 208: 207: 185: 183: 176: 169: 168: 83: 81: 74: 69: 43: 42: 40: 33: 26: 24: 14: 13: 10: 9: 6: 4: 3: 2: 487: 476: 473: 471: 468: 467: 465: 454: 449: 447: 442: 440: 435: 434: 428: 426: 422: 419:article is a 418: 413: 410: 406: 401: 385: 381: 377: 372: 368: 367: 363: 358: 353: 350: 345: 344: 340: 335: 332: 329: 326: 323: 320: 317: 314: 313: 309: 307: 300: 297: 294: 293: 292: 289: 282: 279: 276: 273: 270: 267: 266: 265: 263: 259: 254: 252: 247: 245: 241: 237: 233: 222: 219: 204: 192: 190: 184: 175: 174: 165: 162: 154: 143: 140: 136: 133: 129: 126: 122: 119: 115: 112: –  111: 107: 106:Find sources: 100: 96: 90: 89: 84:This article 82: 78: 73: 72: 67: 65: 58: 57: 52: 51: 46: 41: 32: 31: 19: 425:expanding it 414: 399: 390:. Retrieved 356: 348: 304: 290: 286: 255: 248: 235: 229: 214: 198: 187: 157: 151:October 2007 148: 138: 131: 124: 117: 105: 93:Please help 88:verification 85: 61: 54: 48: 47:Please help 44: 464:Categories 392:2017-08-09 380:Fog, Agner 201:March 2017 121:newspapers 50:improve it 56:talk page 310:See also 256:In more 375:(EE461) 336:(STIBP) 135:scholar 330:(IBRS) 324:(IBPB) 137:  130:  123:  116:  108:  415:This 387:(PDF) 318:(IBC) 142:JSTOR 128:books 421:stub 234:, a 114:news 230:In 97:by 466:: 382:. 59:. 452:e 445:t 438:v 427:. 395:. 373:. 221:) 215:( 203:) 199:( 193:. 164:) 158:( 153:) 149:( 139:· 132:· 125:· 118:· 91:. 66:) 62:( 20:)

Index

Branch Target Buffer
improve it
talk page
Learn how and when to remove these messages

verification
improve this article
adding citations to reliable sources
"Branch target predictor"
news
newspapers
books
scholar
JSTOR
Learn how and when to remove this message
factual accuracy
Learn how and when to remove this message
computer architecture
conditional branch
target of the branch instruction
branch prediction
parallel processor
instruction cache
Instruction fetch
Indirect branch control
Indirect branch prediction barrier
Indirect branch restricted speculation
Single thread indirect branch predictor
"Branch Target Buffers"
Fog, Agner

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.