Link-time optimization of address calculation on a 64-bit architecture

  • Authors:
  • Amitabh Srivastava;David W. Wall

  • Affiliations:
  • Digital Equipment Western Research Laboratory, 250 University Ave., Palo Alto, CA;Digital Equipment Western Research Laboratory, 250 University Ave., Palo Alto, CA

  • Venue:
  • PLDI '94 Proceedings of the ACM SIGPLAN 1994 conference on Programming language design and implementation
  • Year:
  • 1994

Quantified Score

Hi-index 0.00

Visualization

Abstract

Compilers for new machines with 64-bit addresses must generate code that works when the memory used by the program is large. Procedures and global variables are accessed indirectly via global address tables, and calling conventions include code to establish the addressability of the appropriate tables. In the common case of a program that does not require a lot of memory, all of this can be simplified considerably, with a corresponding reduction in program size and execution time.We have used our link-time code modification system OM to perform program transformations related to global address use on the Alpha AXP. Though simple, many of these arewhole-program optimizations that can be done only when we can see the entire program at once, so link-time is an ideal occasion to perform them.This paper describes the optimizations performed and shows their effects on program size and performance. Relatively modest transformations, possible without moving code, improve the performance of SPEC benchmarks by an average of 1.5%. More ambitious transformations, requiring an understanding of program structure that is thorough but not difficult at link-time, can do even better, reducing program size by 10% or more, and improving performance by an average of 3.8%.Even a program compiled monolithically with interprocedural optimization can benefit nearly as much from this technique, if it contains statically-linked pre-compiled library code. When the benchmark sources were compiled in this way, we were still able to improve their performance by 1.35% with the modest transformations and 3.4% with the ambitious transformations.