1. A Retargetable MATLAB-to-C Compiler Exploiting Custom Instructions and Data Parallelism
- Author
-
Francky Catthoor, Christakis Lezos, Grigoris Dimitroulakos, Karthick Parashar, Konstantinos Masselos, Ioannis Latifis, and Hans Cappelle
- Subjects
Speedup ,Assembly language ,Intrinsic function ,Computer science ,Data parallelism ,0211 other engineering and technologies ,020207 software engineering ,02 engineering and technology ,Parallel computing ,computer.software_genre ,Instruction set ,Hardware and Architecture ,0202 electrical engineering, electronic engineering, information engineering ,x86 ,Code generation ,Compiler ,computer ,Software ,021106 design practice & management ,computer.programming_language - Abstract
This article presents a MATLAB-to-C compiler that exploits custom instructions present in state-of-the-art processor architectures and supports semi-automatic vectorization. A parameterized processor model is used to describe the target instruction set architecture to achieve user-friendly retargetability. Custom instructions are represented via specialized intrinsic functions in the generated code, which can then be used as input to any C/C++ compiler supporting the target processor. In addition, the compiler supports the generation of data parallel/vectorized code through the introduction of data packing/unpacking statements. The compiler has been used for code generation targeting ARM and x86 architectures for several benchmarks. The vectorized code generated by the compiler achieves an average speedup of 4.1× and 2.7× for packed fixed and floating point data, respectively, compared to scalarized code for ARM architecture and an average speedup of 3.1× and 1.5× for packed fixed and floating point data, respectively, for x86 architecture. Implementing data parallel instructions directly in the assembly code would have required a lot of design effort, and it would not been sustainable across evolving platform variants. Thus, the compiler can be employed to efficiently speed up critical sections of the target application. The compiler is therefore potentially employable to raise the design abstraction and reduce development time for both embedded and general-purpose applications.
- Published
- 2020
- Full Text
- View/download PDF