Recently, mobile computing and embedded devices equipped with high performance computing components such as multicore processor and GPU are becoming popular. In order to speedup user programs by making full use of the...
详细信息
ISBN:
(纸本)9781538620878
Recently, mobile computing and embedded devices equipped with high performance computing components such as multicore processor and GPU are becoming popular. In order to speedup user programs by making full use of these computing components, it is necessary to optimize the program according to the runtime environment on various types of devices. Binary code optimization is one promising solution. Especially, in order to optimize arm-native program code for various target devices, using the LLVM compiler infrastructure for binary code optimization is considered quite useful. To realize this, we want to use various optimization modules of LLVM compiler, but they perform their processings on LLVM-IR (Intermediate Representation). Thus, we need to develop a frontend for LLVM that translates arm machine code to LLVM-IR. In this paper, we make preliminary discussions on the arm-to-LLVM-IR translation. The translated IR codes should match the optimization process of LLVM. However, what form of IR code is desired is unclear, so we aim at generating the IR code equivalent to the compiler-generated IR code. We discuss a code translation method by comparing with the IR codes generated by Clang from C source codes. Preliminary evaluation results show that our translation method can generate the IR codes equivalent to the one generated from C source program code.
暂无评论