Abstract
Runtime code generation that uses the values of one or more variables to generate specialized code is called value-specific optimization. Typically, value-specific optimization focuses on variables that are modified much less frequently than they are referenced; we call these glacial variables. In current systems that use runtime code generation, glacial variables are identified by programmer directives. Next, we describe glacial variable analysis, the first data-flow analysis for automatically identifying glacial variables. We introduce the term staging analysis to describe analyses that divide a program into stages or use the stage structure of a program. Glacial variable analysis is an interprocedural staging analysis that identifies the relative modification and reference frequencies for each variable and expression. Later, several experiments are given to characterize a set of benchmark programs with respect to their stage structure, and we show how often value-specific optimization might be applied. Finally, we explain how staging analysis relates to runtime code generation, briefly describe glacial variable analysis and present some initial results.
Article PDF
Similar content being viewed by others
Avoid common mistakes on your manuscript.
REFERENCES
C. Consel and O. Danvy, Tutorial notes on partial evaluation, Conf. Record of the 20th Ann. ACM SIGPLAN-SIGACT Symp. on Principles of Progr. Lang., Charleston, South Carolina, pp. 493–501 (January 1993).
M. W. Hall, Managing Interprocedural Optimization, Ph.D. Thesis, Department of Computer Science, Rice University (1991).
D. Keppel, S. J. Eggers, and R. R. Henry, Evaluating runtime-compiled value-specific optimizations, Technical Report UWCSE 93-11-02, Department of Computer Science and Engineering, University of Washington (November 1993).
D. Keppel, Runtime Code Generation, Ph.D. Thesis, Department of Computer Science and Engineering, University of Washington (1996).
J. Auslander, M. Philipose, C. Chambers, S. J. Eggers, and B. N. Bershad, Fast, effective dynamic compilation, Proc. ACM SIGPLAN’ 96 Conf. Progr. Lang. Design and Implementation, pp. 149–159 ( see Ref. 25.)
C. Consel and F. Noël, A general approach to runtime specialization and its application to C, Conf. Record of POPL’ 96: 23rd ACM SIGPLAN-SIGACT Symp. on Principles of Progr. Lang., St. Petersburg, Florida, pp. 145–156 (January 1996).
D. R. Engler, Vcode: A retargetable, extensible, very fast dynamic code generation system, Proc. ACM SIGPLAN’ 96 Conf. on Progr. Lang. Design and Implementation, pp. 160–170 (see Ref. 25).
P. Lee and M. Leone, Optimizing ML with runtime code generation, Proc. ACM SIGPLAN’ 96 Conf. Progr. Lang. Design and Implementation, pp. 137–148 ( see Ref. 25).
N. D. Jones, C. K. Comard, and P. Sestoft, Partial Evaluation and Automatic Program Generation, Englewood Cliffs, New Jersey, Prentice-Hall (1993).
R. Glück and J. Jørgensen, Efficcient multi-level generating extensions for program specialization, Technical Report D-229, DIKU, Department of Computer Science, University of Copenhagen (1995).
A. P. Ershov, Mixed computation: The potential applications and problems for study, Theoret. Comput. Sci. 18:41–67 (1982).
U. Jørring and W. L. Scherlis, Compilers and staging transformations, Conf. Record of the Thirteenth Ann. ACM Symp. on Principles of Progr. Lang, St. Petersburg Beach, Florida, pp. 86–96 (January 1986).
U. Hölzle and D. Ungar, Optimizing dynamically-dispatched calls with runtime type feedback, Proc. ACM SIGPLAN’ 94 Conf. Progr. Lang. Design and Implementation, pp. 326–336 (June 1994).
C. Chambers, The design and implementation of the SELF compiler, an optimizing compiler for object-oriented programming languages, Ph. D. Thesis, Department of Computer Science, Stanford University, 1992.
M. W. Hall and K. Kennedy, Efficient call graph analysis, ACM Letters on Progr. Lang. Syst. 1(3):227–242 (September 1992).
P. Havlak, Nesting of reducible and irreducible loops, ACM Trans. Progr. Lang. Syst. 19(4):557–567 (July 1997).
M. Wolfe, High-Performance Compilers for Parallel Computing, Reading, Massachusetts: Addison-Wesley (1996).
R. A. Ballance, A. B. Maccabe, and K. J. Ottenstein, The program dependence web: A representation supporting control, data, and demand-driven interpretation of imperative languages, Proc. ACM SIGPLAN’ 90 Conf. Progr. Lang. Design and Implementation, pp. 257–271 (June 1990).
P. Havlak, Construction of thinned gated single-assignment form. In U. Banerjee, D. Gelernter, A. Nicolau, and D. A. Padua, (eds.), Languages and Compilers for Parallel Computing Proc. sixth Int’l. Workshop, Berlin, Germany: Springer-Verlag, Portmand, Oregon, pp. 477–499 (August 1993).
M. N. Wegman and F. Z. Zadeck, Constant propagation with conditional branches, ACM Trans. Progr. Lang. Syst. 13(2):181–210 ( April 1991).
T. Autrey, Demand-driven interprocedural constant propagation: Implementation and evaluation. Technical Report OGI-CSE-96-008, Department of Computer Science and Engineering, Oregon Graduate Institute (1996).
R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and F. F. Zadeck, Efficiently computing static single assignment form and the control dependence graph, ACM Trans. Progr. Lang. Syst. 13(4):451–490 (October 1991).
L. Rauchweger, N. M. Amato, and D. A. Padua, Runtime methods for parallelizing partially parallel loops, Proc. ACM Conf. Supercomputing, pp. 137–146, Barcelona, Spain (July 1995). ACM SIGARCH.
T. B. Knoblock and E. Ruf, Data specialization, Proc. ACM SIGPLAN’ 96 Conf. Progr. Lang. Design and Implementation, pp. 215–225.
ACM Sigplan, Proc. ACM SIGPLAN’ 96 Conf. Progr. Lang. Design and Implementation, Philadelphia, Pennsylvania (May 1996).
Rights and permissions
About this article
Cite this article
Autrey, T., Wolfe, M. Initial Results for Glacial Variable Analysis. International Journal of Parallel Programming 26, 43–64 (1998). https://doi.org/10.1023/A:1018739006820
Issue Date:
DOI: https://doi.org/10.1023/A:1018739006820