Write a Blog >>
GPCE 2019
Sun 20 - Fri 25 October 2019 Athens, Greece
co-located with SPLASH 2019
Mon 21 Oct 2019 14:00 - 14:30 at Ground floor conference room - Meta Chair(s): Shigeru Chiba

We propose a novel approach for compiling MATLAB and similar languages that are characterized by multi-dimensional arrays with dynamic shapes and element types. We stage an evaluator for a subset of the MATLAB language using the Lightweight Modular Staging (LMS) framework to produce a compiler that generates C code. But the first Futamura projection alone does not lead to efficient code: we need to refine the rigid stage distinction based on inferred type and shape information to remove costly runtime checks.

To this end, we introduce a stage-polymorphic data structure, that we refer to as metacontainer, to represent MATLAB tensors and their type and shape information. We use metacontainers to efficiently ``inject'', in a high-level intermediate representation (IR) of a MATLAB program, constructs for inferring shape and type information.

Once type and shape information are inferred, metacontainers are also used as the primary abstraction for lowering the computation, performing type, shape and ISA specialization. Our prototype MATLAB compiler MGen produces static C code that supports all primitive types, heavily overloaded operators, many other dynamic aspects of the language, and explicit vectorization for SIMD architectures.

Mon 21 Oct
Times are displayed in time zone: (GMT+03:00) Beirut change

14:00 - 15:30: GPCE 2019 - Meta at Ground floor conference room
Chair(s): Shigeru ChibaGraduate School of Information Science and Technology, The University of Tokyo
gpce-2019-papers14:00 - 14:30
Alen StojanovETH Zurich, Tiark RompfPurdue University, Markus PüschelETH Zürich
gpce-2019-papers14:30 - 15:00
Lucas KramerUniversity of Minnesota, Ted KaminskiUniversity of Minnesota, Eric Van WykUniversity of Minnesota, USA
DOI Pre-print
gpce-2019-papers15:00 - 15:20
Amir ShaikhhaUniversity of Oxford