Title
Generate and offshore: type-safe and modular code generation for low-level optimization
Abstract
We present the Asuna system which supports implicitly heterogeneous multi-stage programming based on MetaOCaml, a multi-stage extension of OCaml. Our system allows programmers to write code generators in a high-level language, and generated code can be translated to a program in low-level languages such as C and LLVM. The high-level code generators can make use of all the features of MetaOCaml such as algebraic data types and higher-order functions while the generated code may include low-level CPU instructions such as vector (SIMD) operations. One can write programs in a modular and type-safe programming style and can directly represent low-level optimizations. Asuna is a multi-target system, that means a single code generator can generate code in C and LLVM, without changing the generator. The translation by Asuna preserves typing and all generated code is guaranteed to be well typed and well scoped. In this paper, we explain the practical aspect of Asuna, using examples taken from high-performance computing.
Year
DOI
Venue
2015
10.1145/2808091.2808096
FHPC@ICFP
Keywords
Field
DocType
Code Generation,Multi-stage programming,Type safety,Low-level optimization,High-performance computing
Dead code elimination,Unreachable code,Code bloat,Programming language,Loop-invariant code motion,Computer science,Source code,Parallel computing,Code generation,Theoretical computer science,Redundant code,Dead code
Conference
Citations 
PageRank 
References 
1
0.35
12
Authors
3
Name
Order
Citations
PageRank
Naoki Takashima110.35
Hiroki Sakamoto210.35
Yukiyoshi Kameyama317117.29