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

Semantic reasoning about the sea of nodes

Published: 24 February 2018 Publication History

Abstract

The Sea of Nodes intermediate representation was introduced by Cliff Click in the mid 90s as an enhanced Static Single Assignment (SSA) form. It improves on the initial SSA form by relaxing the total order on instructions in basic blocks into explicit data and control dependencies. This makes programs more flexible to optimize. This graph-based representation is now used in many industrial-strength compilers, such as HotSpot or Graal. While the SSA form is now well understood from a semantic perspective -- even formally verified optimizing compilers use it in their middle-end -- very few semantic studies have been conducted about the Sea of Nodes.
This paper presents a simple but rigorous formal semantics for a Sea of Nodes form. It comprises a denotational component to express data computation, and an operational component to express control flow. We then prove a fundamental, dominance-based semantic property on Sea of Nodes programs which determines the regions of the graph where the values of nodes are preserved. Finally, we apply our results to prove the semantic correctness of a redundant zero-check elimination optimization. All the necessary semantic properties have been mechanically verified in the Coq proof assistant.

References

[1]
G. Barthe, D. Demange, and D. Pichardie. 2014. Formal Verification of an SSA-Based Middle-End for CompCert. ACM TOPLAS 36, 1 (2014), 1-35.
[2]
J.O. Blech, S. Glesner, J. Leitner, and S. Mülling. 2005. Optimizing Code Generation from SSA Form: A Comparison Between Two Formal Correctness Proofs in Isabelle/HOL. In Proc. of COCV'05 (ENTCS). Elsevier, 33-51.
[3]
M. Braun, S. Buchwald, S. Hack, R. Leißa, C. Mallon, and A. Zwinkau. 2013. Simple and Efficient Construction of Static Single Assignment Form. In Proc. of CC'13 (LNCS), Vol. 7791. Springer, 102-122.
[4]
M. Braun, S. Buchwald, and A. Zwinkau. 2011. Firm--A Graph-Based Intermediate Representation. Technical Report 35. Karlsruhe Institute of Technology. http://digbib.ubka.uni-karlsruhe.de/volltexte/1000025470
[5]
S. Buchwald, D. Lohner, and S. Ullrich. 2016. Verified Construction of Static Single Assignment Form. In Proc. of CC'16. ACM, 67-76.
[6]
C. Click. 1995. Global Code Motion / Global Value Numbering. In Proc. of PLDI'95. 246-257.
[7]
C. Click and K. D. Cooper. 1995. Combining Analyses, Combining Optimizations. ACM TOPLAS 17, 2 (1995), 181-196.
[8]
C. Click and M. Paleczny. 1995. A Simple Graph-Based Intermediate Representation. In Proc. of IR'95. 35-49.
[9]
R. Cytron, J. Ferrante, B.K. Rosen, M.N. Wegman, and F.K. Zadeck. 1991. Efficiently computing static single assignment form and the control dependence graph. ACM TOPLAS 13, 4 (1991), 451-490.
[10]
D. Demange and Y. Fernandez de Retana. 2016. Mechanizing Conventional SSA for a Verified Destruction with Coalescing. In Proc. of CC'16 (CC 2016). 77-87.
[11]
D. Demange, L. Stefanesco, and D. Pichardie. 2015. Verifying Fast and Sparse SSA-based Optimizations in Coq. In Proc. of CC'15 (LNCS), Vol. 9031. 233-252.
[12]
G. Duboscq, T. Würthinger, L. Stadler, C. Wimmer, D. Simon, and H. Mössenböck. 2013. An Intermediate Representation for Speculative Optimizations in a Dynamic Compiler. In Proc. of VMIL'13. ACM, 1-10.
[13]
B. Dupont de Dinechin. 2014. Using the SSA-Form in a Code Generator. In Proc. of CC'14 (LNCS), Vol. 8409. Springer, 1-17.
[14]
HotSpot 1999. Homepage of the project. http://openjdk.java.net/groups/hotspot.
[15]
N. Johnson and A. Mycroft. 2003. Combined Code Motion and Register Allocation Using the Value State Dependence Graph. In Proc. of CC'03 (CC 2003). Springer-Verlag, 1-16.
[16]
M. Kawahito, H. Komatsu, and T. Nakatani. 2000. Effective Null Pointer Check Elimination Utilizing Hardware Trap. In Proc. of ASPLOS'00. 139-149.
[17]
X. Leroy. 2009. A Formally Verified Compiler Back-end. JAR 43, 4 (2009), 363-446.
[18]
Nilcheck elimination in Go 2017. Source code. https://github.com/golang/go/blob/release-branch.go1.9/src/cmd/compile/internal/ssa/nilcheck.go.
[19]
B. K. Rosen, M. N. Wegman, and F. Kenneth Zadeck. 1988. Global Value Numbers and Redundant Computations. In Proc. of POPL'88. 12-27.
[20]
The Go programming language 2012. Homepage of the project. https://golang.org/.
[21]
The SSA Book 2015. Latest release. http://ssabook.gforge.inria.fr/latest/book.pdf.
[22]
J. Zhao. 2013. Formalizing an SSA-based compiler for verified advanced program transformations. Ph.D. Dissertation. University of Pennsylvania. Advisor(s) Zdancewic, Steve.
[23]
J. Zhao, S. Nagarakatte, M. Martin, and S. Zdancewic. 2013. Formal verification of SSA-based optimizations for LLVM. In Proc. of PLDI'13. ACM, 175-186.
[24]
J. Zhao, S. Zdancewic, S. Nagarakatte, and M. Martin. 2012. Formalizing the LLVM Intermediate Representation for Verified Program Transformation. In Proc. of POPL'12. ACM, 427-440.

Cited By

View all
  • (2024)Hyperblock Scheduling for Verified High-Level SynthesisProceedings of the ACM on Programming Languages10.1145/36564558:PLDI(1929-1953)Online publication date: 20-Jun-2024
  • (2024)Compiling with Abstract InterpretationProceedings of the ACM on Programming Languages10.1145/36563928:PLDI(368-393)Online publication date: 20-Jun-2024
  • (2024)Translation Validation for JIT Compiler in the V8 JavaScript EngineProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3639189(1-12)Online publication date: 20-May-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
CC 2018: Proceedings of the 27th International Conference on Compiler Construction
February 2018
206 pages
ISBN:9781450356442
DOI:10.1145/3178372
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 the author(s) 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

In-Cooperation

  • IEEE-CS: Computer Society

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 24 February 2018

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Intermediate Representation
  2. SSA
  3. Sea of Nodes
  4. Semantics
  5. Verified Compilation

Qualifiers

  • Research-article

Conference

CGO '18

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)43
  • Downloads (Last 6 weeks)3
Reflects downloads up to 18 Aug 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Hyperblock Scheduling for Verified High-Level SynthesisProceedings of the ACM on Programming Languages10.1145/36564558:PLDI(1929-1953)Online publication date: 20-Jun-2024
  • (2024)Compiling with Abstract InterpretationProceedings of the ACM on Programming Languages10.1145/36563928:PLDI(368-393)Online publication date: 20-Jun-2024
  • (2024)Translation Validation for JIT Compiler in the V8 JavaScript EngineProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3639189(1-12)Online publication date: 20-May-2024
  • (2024)GraalSP: Polyglot, efficient, and robust machine learning-based static profilerJournal of Systems and Software10.1016/j.jss.2024.112058213(112058)Online publication date: Jul-2024
  • (2023)Verifying Term Graph Optimizations using Isabelle/HOLProceedings of the 12th ACM SIGPLAN International Conference on Certified Programs and Proofs10.1145/3573105.3575673(320-333)Online publication date: 11-Jan-2023
  • (2023)SSA Translation Is an Abstract InterpretationProceedings of the ACM on Programming Languages10.1145/35712587:POPL(1895-1924)Online publication date: 11-Jan-2023
  • (2023)Differential Testing of a Verification Framework for Compiler Optimizations (Case Study)2023 IEEE/ACM 11th International Conference on Formal Methods in Software Engineering (FormaliSE)10.1109/FormaliSE58978.2023.00015(66-75)Online publication date: May-2023
  • (2022)Weaving Synchronous Reactions into the Fabric of SSA-form CompilersACM Transactions on Architecture and Code Optimization10.1145/350670619:2(1-25)Online publication date: 8-Mar-2022
  • (2021)Verified Lustre Normalization with Node SubsamplingACM Transactions on Embedded Computing Systems10.1145/347704120:5s(1-25)Online publication date: 22-Sep-2021
  • (2021)Visualizing JIT Compiler GraphsGraph Drawing and Network Visualization10.1007/978-3-030-92931-2_10(138-146)Online publication date: 23-Dec-2021
  • 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