The predictability of branches in libraries
Brad Calder, Dirk C. Grunwald, Amitabh Srivastava · 1995
Profile-based optimizations are being used with increasing frequency. Profile information can be used to improve instruction scheduling, code layout, and to increase instruction level parallelism. These optimizations have been shown to be effective when they are applied to the same program from which the profile was gathered. However, it is an open question how profile-based optimizations should be applied to library subroutines. If many programs use libraries in the same way, it may be possible to "pre-optimize" a library, or to use an optimized shared library. This study examines the use of commonly used libraries among 43 C and FORTRAN programs to see if the libraries have common behavior across different programs. We examine the behavior of the most commonly used Unix libraries on Digital Unix. We found that libraries have very predictable behavior between applications. This implies that profile-based compiler optimizations may be effective for libraries across different applicatio...