| Optimizing subroutines with optional parameters in F90 via function cloning |
| Full text |
Pdf
(1.18 MB)
|
| Source
|
ACM SIGPLAN Notices
archive
Volume 41 , Issue 8 (August 2006)
table of contents
COLUMN: Technical correspondence
table of contents
Pages: 21 - 28
Year of Publication: 2006
ISSN:0362-1340
|
|
Author
|
|
| Publisher |
|
| Bibliometrics |
Downloads (6 Weeks): 0, Downloads (12 Months): 23, Citation Count: 0
|
|
|
ABSTRACT
Optional parameters are a feature of Fortran90. The objective of this feature is to allow the F90 programmer to declare a subroutine using a number of arguments and specify a subset of these parameters as optional, which in turn, allows the programmer to omit any of these optional parameters during invocation of the subroutine. The body of such a subroutine uses an F90 intrinsic function called present(), to test whether an optional parameter has meaningful values at run-time. The optional parameter can be written/read if and only if present() returns a true value. In this work, we describe a mechanism by which such subroutines which use optional parameters can be efficiently optimized using function cloning or specialization. Function Cloning is a well-known optimization technique that creates multiple copies of a function f(), in order to exploit better optimization opportunities. We will show how cloning/specialization can be utilized such that all calls to present() can be totally eliminated in the body of such subroutines. Cloning will also result in optimization opportunities not exploitable in the original source.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
A Methodology for Procedure Cloning, K. D. Cooper, M. W. Hall, K. Kennedy, Computer Languages, pages 105--117, 1993.
|
| |
2
|
HP Fortran 90 Programmer's Reference, Jan, 1997.
|
| |
3
|
Probabilistic Procedure Cloning for High-Performance Systems, S. Benker, E. Mehofer, B. Scholz, In Proc. Of Symposium on Computer Architecture and High Performance Computing, October 2000.
|
 |
4
|
C. Chambers , D. Ungar, Customization: optimizing compiler technology for SELF, a dynamically-typed object-oriented programming language, Proceedings of the ACM SIGPLAN 1989 Conference on Programming language design and implementation, p.146-160, June 19-23, 1989, Portland, Oregon, United States
|
| |
5
|
Using Path-Spectra to direct Function Cloning, T. Way and L. Pollock, In Workshop on Profile and Feedback Directed Compilation at International Conference on Parallel Architectures and Compilation Techniques, pages 40--47, 1998.
|
| |
6
|
The Costs and Benefits of Cloning in a Lazy Functional Language, Karl-Philip Faxen, Trends in Functional Programming, Volume 2, 2001.
|
 |
7
|
Andrew Ayers , Richard Schooler , Robert Gottlieb, Aggressive inlining, Proceedings of the ACM SIGPLAN 1997 conference on Programming language design and implementation, p.134-145, June 16-18, 1997, Las Vegas, Nevada, United States
|
| |
8
|
Customization in C++, Doug Lea, Proceedings of Usenix C++ 1990.
|
|