Fast Dynamic Translation Using LLVM On Multi-Core Hosts
Abstract
In the development of embedded systems, Instruction-Set Simulators (ISS) plays an important role. When using an ISS, simulation speed is a significant issue. In this paper, we present experiments and comparison between several dynamic translation techniques. In addition to an existing technique which serves as a reference, we have developed a new on-the-fly translation technique using the LLVM open-source compiler infrastructure to enhance simulation speed. This dynamic translation technique translates hot basic blocks of the target instruction set into LLVM bitcode, then compiles LLVM bitcode into host binary code using the LLVM Just-In-Time (JIT) compiler. As the translation time using LLVM increases to the detriment of the overall simulation speed, we also present a mixed mode, where only the frequently executed chunks of code are compiled. This translation technique was then extended to support larger translation units compared to the previous, Finally the paper ends with presentation of an orthogonal solution to dispatch dynamic translation to a translation server to take advantage of multi-processor hosts.