ABSTRACT
This paper describes MIL, a "monadic intermediate language" that is designed for use in optimizing compilers for strict, strongly typed functional languages. By using a notation that exposes the construction and use of closures and algebraic datatype values, for example, the MIL optimizer is able to detect and eliminate many unnecessary uses of these structures prior to code generation. One feature that distinguishes MIL from other intermediate languages in this area is the use of a typed, parameterized notion for basic blocks. This both enables new optimization techniques, such as the ability to create specialized versions of basic blocks, and leads to a new approach for implementing changes in data representation.
- Andrew W. Appel. 1992. Compiling with Continuations. Cambridge University Press, New York, NY, USA. Google ScholarDigital Library
- Justin Bailey. 2012. Using Dataflow Optimization Techniques with a Monadic Intermediate Language. Master's thesis. Department of Computer Science, Portland State University, Portland, OR.Google ScholarCross Ref
- Adam Chlipala. 2015. An Optimizing Compiler for a Purely Functional Web-application Language. In Proceedings of the 20th ACM SIGPLAN International Conference on Functional Programming (ICFP 2015). ACM, New York, NY, USA. Google ScholarDigital Library
- Iavor S. Diatchki, Mark P. Jones, and Rebekah Leslie. 2005. High-level views on low-level representations. In Proceedings of the 10th ACM SIGPLAN International Conference on Functional Programming, ICFP 2005, Tallinn, Estonia, September 26-28, 2005. ACM, 168--179. Google ScholarDigital Library
- Matthew Fluet and Stephen Weeks. 2001. Contification Using Dominators. In Proceedings of the Sixth ACM SIGPLAN International Conference on Functional Programming (ICFP '01). ACM, New York, NY, USA, 2--13. Google ScholarDigital Library
- Thomas Johnsson. 1985. Lambda Lifting: Transforming Programs to Recursive Equations. In Proceedings of the IFIP conference on Functional Programming Languages and Computer Architecture (Lecture Notes in Computer Science, 201). Springer-Verlag, 190--203. Google ScholarDigital Library
- Mark P. Jones. 1994. Dictionary-free Overloading by Partial Evaluation. In ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM '94).Google Scholar
- Andrew Kennedy. 2007. Compiling with Continuations, Continued. In Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming (ICFP '07). ACM, New York, NY, USA, 177--190. Google ScholarDigital Library
- Chris Lattner. 2002. LLVM: An Infrastructure for Multi-Stage Optimization. Master's thesis. Computer Science Dept., University of Illinois at Urbana-Champaign, Urbana, IL.Google Scholar
- LLVM 2018. The LLVM Compiler Infrastructure. http://llvm.org.Google Scholar
- Luke Maurer, Zena Ariola, Paul Downen, and Simon Peyton Jones. 2017. Compiling without continuations. In ACM Conference on Programming Languages Design and Implementation (PLDI'17). ACM, 482--494. Google ScholarDigital Library
- E. Moggi. 1989. Computational Lambda-calculus and Monads. In Proceedings of the Fourth Annual Symposium on Logic in Computer Science. IEEE Press, Piscataway, NJ, USA, 14--23. Google ScholarDigital Library
- Alan Mycroft. 1984. Polymorphic Type Schemes and Recursive Definitions. In Proceedings of the 6th Colloquium on International Symposium on Programming. Springer-Verlag, London, UK, UK, 217--228. Google ScholarDigital Library
- Simon Peyton Jones (Ed.). 2003. Haskell 98 Language and Libraries -- The Revised Report. Cambridge University Press.Google Scholar
- The Hasp Project. 2010. The Habit Programming Language: The Revised Preliminary Report. http://github.com/habit-lang/language-report.Google Scholar
- Philip Wadler. 1990. Comprehending Monads. In Proceedings of the 1990 ACM Conference on LISP and Functional Programming (LFP '90). 61--78. Google ScholarDigital Library
- Stephen Weeks. 2006. Whole-program Compilation in MLton. In Proceedings of the 2006 Workshop on ML (ML '06). ACM, New York, NY, USA. Google ScholarDigital Library
Recommendations
Implementing typed intermediate languages
Recent advances in compiler technology have demonstrated the benefits of using strongly typed intermediate languages to compile richly typed source languages (e.g., ML). A type-preserving compiler can use types to guide advanced optimizations and to ...
Implementing typed intermediate languages
ICFP '98: Proceedings of the third ACM SIGPLAN international conference on Functional programmingRecent advances in compiler technology have demonstrated the benefits of using strongly typed intermediate languages to compile richly typed source languages (e.g., ML). A type-preserving compiler can use types to guide advanced optimizations and to ...
A functional intermediate form for diverse source languages
CASCON '96: Proceedings of the 1996 conference of the Centre for Advanced Studies on Collaborative researchThis paper describes the use of WatIF, a simple compiler intermediate form based on the λ-calculus, for writing compiler front-ends for a wide range of programming languages. Somewhat similar intermediate forms have been previously used for single-...
Comments