Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1356058.1356064acmconferencesArticle/Chapter ViewAbstractPublication PagescgoConference Proceedingsconference-collections
research-article

Fast liveness checking for ssa-form programs

Published: 06 April 2008 Publication History

Abstract

Liveness analysis is an important analysis in optimizing compilers. Liveness information is used in several optimizations and is mandatory during the code-generation phase. Two drawbacks of conventional liveness analyses are that their computations are fairly expensive and their results are easily invalidated by program transformations. We present a method to check liveness of variables that overcomes both obstacles. The major advantage of the proposed method is that the analysis result survives all program transformations except for changes in the control-flow graph. For common program sizes our technique is faster and consumes less memory than conventional data-flow approaches. Thereby, we heavily make use of SSA-form properties, which allow us to completely circumvent data-flow equation solving. We evaluate the competitiveness of our approach in an industrial strength compiler. Our measurements use the integer part of the SPEC2000 benchmarks and investigate the liveness analysis used by the SSA destruction pass. We compare the net time spent in liveness computations of our implementation against the one provided by that compiler. The results show that in the vast majority of cases our algorithm, while providing the same quality of information, needs less time: an average speed-up of 16%.

References

[1]
Hassan Aït--Kaci, Robert Boyer, Patrick Lincoln, and Roger Nasr. Efficient Implementation of Lattice Operations. ACM Transactions on Programming Languages and Systems, 11(1):115---146, 1989.
[2]
Andrew W. Appel and Jens Palsberg. Modern Compiler Implementation in Java. Cambridge University Press, second edition, 2002.
[3]
Florent Bouchez, Alain Darte, Christophe Guillon, and Fabrice Rastello. Register Allocation: What does the NP-Completeness Proof of Chaitin et al. Really Prove? In The 19th International Workshop on Languages and Compilers for Parallel Computing (LCPC'06), November 2--4, 2006, New Orleans, Louisiana, LNCS. Springer Verlag, 2006.
[4]
Preston Briggs, Keith D.Cooper, Timothy J. Harvey, and L. Taylor Simpson. Practical Improvements to the Construction and Destruction of Static Single Assignment Form. Software: Practice and Experience, 28(8):859---881, July 1998.
[5]
Preston Briggs and Linda Torczon. An Efficient Representation for Sparse Sets. ACM Letters on Programming Languages and Systems, 2(1--4):59---69, 1993.
[6]
Philip Brisk, Foad Dabiri, Jamie Macbeth, and Majid Sarrafzadeh. Polynomial Time Graph Coloring Register Allocation. In 14th International Workshop on Logic and Synthesis. ACM Press, 2005.
[7]
Zoran Budimli, Keith D. Cooper, Timothy J. Harvey, Ken Kennedy, Timothy S. Oberg, and Steven W. Reeves. Fast Copy Coalescing and Live--Range Identification. In Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation, pages 25---32. ACM Press, 2002.
[8]
Keith D. Cooper, Timothy J. Harvey, and Ken Kennedy. Iterative Data--Flow Analysis, Revisited. Technical Report TR04--100, Rice University, 2002.
[9]
Keith D. Cooper and Linda Torczon. Engineering a Compiler. Morgan Kaufmann, 2004.
[10]
Marco Cornero, Roberto Costa, Ricardo Fernandez Pascual, Andrea Ornstein, and Erven Rohou. An Experimental Environment Validating the Suitability of CLI as an Effective Deployment Format for Embedded Systems. In International Conference on High Performance Embedded Architectures & Compilers, HiPEAC 2008, To be published in Lecture Notes In Computer Science, 2008.
[11]
R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and F. K. Zadek. Efficiently Computing Static Single Assignment Form and the Control Dependence Graph. ACM Transactions on Programming Languages and Systems, 13(4):451--490, October 1991.
[12]
B. Dupont de Dinechin, F. de Ferri, C. Guillon, and A. Stoutchinin. Code Generator Optimizations for the ST120 DSP--MCU Core. In CASES '00: Proceedings of the 2000 international conference on Compilers, architecture, and synthesis for embedded systems, pages 93---102, New York, NY, USA, 2008. ACM.
[13]
M. Gerlek, M. Wolfe, and E. Stoltz. A Reference Chain Approach for Live Variables. Technical Report CSE 94--029, Oregon Graduate Institute of Science & Technology, 1994.
[14]
Sebastian Hack, Daniel Grund, and Gerhard Goos. Register Allocation for Programs in SSA form. In Andreas Zeller and Alan Mycroft, editors, Compiler Construction 2006, volume 3923. Springer, March 2006.
[15]
Paul Havlak. Nesting of Reducible and Irreducible Loops. ACM Transactions on Programming Languages and Systems, 19(4):557---567, 997.
[16]
M. S. Hecht and J. D. Ullman. Characterizations of Reducible Flow Graphs. J. ACM, 21(3):367---375, 1974.
[17]
Allen Leung and Lal George. Static Single Assignment Form for Machine Code. In PLDI '99: Proceedings of the ACM SIGPLAN 1999 Conference on Programming Language Design and Implementation, pages 204---214, New York, NY, USA, 1999. ACM Press.
[18]
Fernando Magno Quintao Pereira and Jens Palsberg. Register Allocation via Coloring of Chordal Graphs. In Proceedings of APLAS'05, volume 3780 of LNCS, pages 315---329. Springer, November 2005.
[19]
G. Ramalingam. On Loops, Dominators, and Dominance Frontier. In PLDI '00: Proceedings of the ACM SIGPLAN 2000 Conference on Programming Language Design and Implementation, pages 233---241, New York, NY, USA, 2000. ACM Press.
[20]
Jeremy Singer. Static Program Analysis Based on Virtual Register Renaming. Technical Report UCAM-CL-TR-660, University of Cambridge, Computer Laboratory, February 2006.
[21]
Vugranam C. Sreedhar, Roy Dz--Ching Ju, David M. Gillies, and Vatsa Santhanam. Translating Out of Static Single Assignment Form. In SAS '99: Proceedings of the 6th International Symposium on Static Analysis, pages 194---210, London, UK, 1999. Springer--Verlag.
[22]
Robert Tarjan. Depth--First Search and Linear Graph Algorithms. SIAM Journal on Computing, 1(2):146--160, 1972.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
CGO '08: Proceedings of the 6th annual IEEE/ACM international symposium on Code generation and optimization
April 2008
235 pages
ISBN:9781595939784
DOI:10.1145/1356058
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 06 April 2008

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. compilers
  2. dominance
  3. jit-compilation
  4. liveness analysis
  5. ssa form

Qualifiers

  • Research-article

Conference

CGO '08

Acceptance Rates

CGO '08 Paper Acceptance Rate 21 of 66 submissions, 32%;
Overall Acceptance Rate 312 of 1,061 submissions, 29%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)16
  • Downloads (Last 6 weeks)5
Reflects downloads up to 09 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2021)SSA Form and Code GenerationSSA-based Compiler Design10.1007/978-3-030-80515-9_18(243-256)Online publication date: 12-Jun-2021
  • (2020)Liquid resource typesProceedings of the ACM on Programming Languages10.1145/34089884:ICFP(1-29)Online publication date: 3-Aug-2020
  • (2020)Liquid information flow controlProceedings of the ACM on Programming Languages10.1145/34089874:ICFP(1-30)Online publication date: 3-Aug-2020
  • (2020)Effect handlers, evidentlyProceedings of the ACM on Programming Languages10.1145/34089814:ICFP(1-29)Online publication date: 3-Aug-2020
  • (2020)Duplo: a framework for OCaml post-link optimisationProceedings of the ACM on Programming Languages10.1145/34089804:ICFP(1-29)Online publication date: 3-Aug-2020
  • (2020)A Fast Verified Liveness Analysis in SSA FormAutomated Reasoning10.1007/978-3-030-51054-1_19(324-340)Online publication date: 24-Jun-2020
  • (2017)Static optimization in PHP 7Proceedings of the 26th International Conference on Compiler Construction10.1145/3033019.3033026(65-75)Online publication date: 5-Feb-2017
  • (2016)Sparse representation of implicit flows with applications to side-channel detectionProceedings of the 25th International Conference on Compiler Construction10.1145/2892208.2892230(110-120)Online publication date: 17-Mar-2016
  • (2016)Mechanizing conventional SSA for a verified destruction with coalescingProceedings of the 25th International Conference on Compiler Construction10.1145/2892208.2892222(77-87)Online publication date: 17-Mar-2016
  • (2014)Single Assignment Compiler, Single Assignment ArchitectureProceedings of Annual IEEE/ACM International Symposium on Code Generation and Optimization10.1145/2581122.2544158(196-207)Online publication date: 15-Feb-2014
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media