Software Optimization Guide for AMD64 Processors

25112 Rev. 3.06 September 2005

4.3Branch Targets in Program Hot Spots

Optimization

In program “hot spots” (as determined by either profiling or loop-nesting analysis), branch targets should be placed at or near the beginning of code windows that are 16-byte aligned. The smaller the basic block, the more beneficial this optimization will be.

Application

This optimization applies to:

32-bit software

64-bit software

Rationale

Aligning branch targets maximizes the number of instructions in the pick window and preserves instruction-cache space in branch-intensive code outside such hot spots.

76

Instruction-Decoding Optimizations

Chapter 4

Page 92
Image 92
AMD 250 manual Branch Targets in Program Hot Spots