This paper describes the design and implementation of a new backend for the Standard ML of New Jersey (SML/NJ) system that is based on the LLVM compiler infrastructure. We first describe the history and design of the current backend, which is based on the MLRisc framework. While MLRisc has many similarities to LLVM, it provides a lower-level, policy-agnostic, approach to code generation that enables customization of the code generator for non-standard runtime models (i.e., register pinning, calling conventions, etc.). In particular, SML/NJ uses a stackless runtime model based on continuation-passing style with heap-allocated continuation closures. This feature, and others, pose challenges to building a backend using LLVM. We describe these challenges and how we address them in our backend.
CITATION STYLE
Farvardin, K., & Reppy, J. (2020). A New Backend for Standard ML of New Jersey. In ACM International Conference Proceeding Series (pp. 55–66). Association for Computing Machinery. https://doi.org/10.1145/3462172.3462191
Mendeley helps you to discover research relevant for your work.