Simple and effective link-time optimization of Modula-3 programs
Author:
Open Access
- 1 June 1995
- journal article
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 30 (6) , 103-115
Abstract
Modula-3 supports development of modular programs by separating an object's interface from its implementation. This separation induces a runtime overhead in the implementation of objects, because it prevents the compiler from having complete information about a program's type hierarchy. This overhead can be reduced at link time, when the entire type hierarchy becomes available. We describe opportunities for link-time optimization of Modula-3, present two link-time optimizations that reduce the runtime costs of Modula-3's opaque types and methods, and show how link-time optimization could provide C++ which the benefits of opaques types at no additional runtime cost. Our optimization techniques are implemented in mld, a retargetable linker for the MIPS, SPARC, and Intel 486, mld links a machine-independent intermediate code that is suitable for link-time optimization and code generation. Linking intermediate code simplifies implementation of the optimizations and makes it possible to evaluate them on a wide range of architectures. mld's optimizations are effective: they reduce the total number of instructions executed by up to 14% and convert as many as 79% of indirect calls to direct calls.Keywords
This publication has 16 references indexed in Scilit:
- Optimizing dynamically-dispatched calls with run-time type feedback1994
- Link-time optimization of address calculation on a 64-bit architecture1994
- Engineering a simple, efficient code-generator generatorACM Letters on Programming Languages and Systems, 1992
- Experience with a software-defined machine architectureACM Transactions on Programming Languages and Systems, 1992
- BURGACM SIGPLAN Notices, 1992
- Making pure object-oriented languages practicalACM SIGPLAN Notices, 1991
- Procedure merging with instruction caches1991
- A portable global optimizer and linkerACM SIGPLAN Notices, 1988
- Self: The power of simplicityACM SIGPLAN Notices, 1987
- Static grouping of small objects to enhance performance of a paged virtual memoryACM Transactions on Computer Systems, 1984