Abstract
This paper presents an efficient algorithm for classifying generalized induction variables and more complicated flow-sensitive loop-variant variables that have arbitrary conditional update patterns along multiple paths in a loop nest. Variables are recognized and translated into closed-form functions, such as linear, polynomial, geometric, wrap-around, periodic, and mixer functions. The remaining flow-sensitive variables (those that have no closed forms) are bounded by tight bounding functions on their value sequences by bounds derived from our extensions of the Chains of Recurrences (CR#) algebra. The classification algorithm has a linear worst-case execution time in the size of the SSA region of a loop nest. Classification coverage and performance results for the SPEC2000 benchmarks are given and compared to other methods.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Aho, A., Sethi, R., Ullman, J.: Compilers: Principles, Techniques and Tools. Addison-Wesley Publishing Company, Reading (1985)
Allen, R., Kennedy, K.: Optimizing Compilers for Modern Architectures. Morgan Kaufmann, San Francisco (2002)
Andrade, D., Arenaz, M., Fraguela, B., no, J.T., Doallo, R.: Automated and accurate cache behavior analysis for codes with irregular access patterns. In: Concurrency and Computation: Practice and Experience (to appear, 2007)
Bachmann, O.: Chains of Recurrences. PhD thesis, Kent State University, College of Arts and Sciences (1996)
Berlin, D., Edelsohn, D., Pop, S.: High-level loop optimizations for GCC. In: Proceedings of the 2004 GCC Developers’ Summit, pp. 37–54 (2004)
Birch, J., van Engelen, R., Gallivan, K., Shou, Y.: An empirical evaluation of chains of recurrences for array dependence testing. In: PACT 2006: Proceedings of the 15th international conference on Parallel architectures and compilation techniques, pp. 295–304. ACM Press, New York (2006)
Blume, W., Doallo, R., Eigenmann, R., Grout, J., Hoeflinger, J., Lawrence, T., Lee, J., Padua, D., Paek, Y., Pottenger, B., Rauchwerger, L., Tu, P.: Advanced program restructuring for high-performance computers with Polaris. IEEE Computer 29(12), 78–82 (1996)
Franke, B., O’Boyle, M.: Array recovery and high-level transformations for dsp applications. ACM Transactions on Embedded Computing Systems (TECS) 2(2), 132–162 (2003)
Gerlek, M., Stolz, E., Wolfe, M.: Beyond induction variables: Detecting and classifying sequences using a demand-driven SSA form. ACM Transactions on Programming Languages and Systems (TOPLAS) 17(1), 85–122 (1995)
Gupta, R.: A fresh look at optimizing array bound checking. SIGPLAN Not. 25(6), 272–282 (1990)
Haghighat, M.R., Polychronopoulos, C.D.: Symbolic analysis for parallelizing compilers. ACM Transactions on Programming Languages and Systems 18(4), 477–518 (1996)
Muchnick, S.: Advanced Compiler Design and Implementation. Morgan Kaufmann, San Fransisco (1997)
Pottenger, W., Eigenmann, R.: Parallelization in the presence of generalized induction and reduction variables. Technical report, 1396, Univ. of Illinois at Urbana Champaign, Center for Supercomputing Research & Development (1995)
Shou, Y., van Engelen, R., Birch, J.: Flow-sensitive loop-variant variable classification in linear time. Technical report, TR-071005, Computer Science Dept., Florida State University (2007)
Shou, Y., van Engelen, R., Birch, J., Gallivan, K.: Toward efficient flow-sensitive induction variable analysis and dependence testing for loop optimization. In: Proceedings of the ACM SouthEast Conference, pp. 1–6 (2006)
Tarjan, R.: Depth first search and linear graph algorithms. SIAM Journal of Computing 1(2), 146–160 (1972)
van Engelen, R.: Symbolic evaluation of chains of recurrences for loop optimization. Technical report, TR-000102, Computer Science Dept., Florida State University (2000)
van Engelen, R.: Efficient symbolic analysis for optimizing compilers. In: Wilhelm, R. (ed.) CC 2001. LNCS, vol. 2027, pp. 118–132. Springer, Heidelberg (2001)
van Engelen, R.: The CR# algebra and its application in loop analysis and optimization. Technical report, TR-041223, Computer Science Dept., Florida State University (2004)
van Engelen, R., Birch, J., Shou, Y., Walsh, B., Gallivan, K.: A unified framework for nonlinear dependence testing and symbolic analysis. In: Proceedings of the ACM International Conference on Supercomputing (ICS), pp. 106–115 (2004)
van Engelen, R., Gallivan, K.: An efficient algorithm for pointer-to-array access conversion for compiling and optimizing DSP applications. In: Proceedings of the International Workshop on Innovative Architectures for Future Generation High-Performance Processors and Systems (IWIA) 2001, Maui, Hawaii, pp. 80–89 (2001)
Wolfe, M.: Beyond induction variables. In: ACM SIGPLAN 1992 Conf. on Programming Language Design and Implementation, San Fransisco, CA, pp. 162–174 (1992)
Wolfe, M.: High Performance Compilers for Parallel Computers. Addison-Wesley, Redwood City (1996)
Wu, P., Cohen, A., Hoeflinger, J., Padua, D.: Monotonic evolution: An alternative to induction variable substitution for dependence analysis. In: Proceedings of the ACM International Conference on Supercomputing (ICS), pp. 78–91 (2001)
Zima, E.: Recurrent relations and speed-up of computations using computer algebra systems. In: Fitch, J. (ed.) DISCO 1992. LNCS, vol. 721, pp. 152–161. Springer, Heidelberg (1993)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Shou, Y., van Engelen, R., Birch, J. (2008). Flow-Sensitive Loop-Variant Variable Classification in Linear Time. In: Adve, V., Garzarán, M.J., Petersen, P. (eds) Languages and Compilers for Parallel Computing. LCPC 2007. Lecture Notes in Computer Science, vol 5234. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-85261-2_22
Download citation
DOI: https://doi.org/10.1007/978-3-540-85261-2_22
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-85260-5
Online ISBN: 978-3-540-85261-2
eBook Packages: Computer ScienceComputer Science (R0)