Efficient Code Generation in a Region-based Dynamic Binary Translator

Tom Spink, Harry Wagstaff, Björn Franke, Nigel Topham

Research output: Chapter in Book/Report/Conference proceedingConference contribution


Region-based JIT compilation operates on translation units comprising multiple basic blocks and, possibly cyclic or conditional, control flow between these. It promises to reconcile aggressive code optimisation and low compilation latency in performance-critical dynamic binary translators. Whilst various region selection schemes and isolated code optimisation techniques have been investigated it remains unclear how to best exploit such regions for efficient code generation. Complex interactions with indirect branch tables and translation caches can have adverse effects on performance if not considered carefully. In this paper we present a complete code generation strategy for a region-based dynamic binary translator, which exploits branch type and control flow profiling information to improve code quality for the common case. We demonstrate that using our code generation strategy a competitive region-based dynamic compiler can be built on top of the LLVM JIT compilation framework. For the ARM-V5T target ISA and SPEC CPU 2006 benchmarks we achieve execution rates of, on average, 867 MIPS and up to 1323 MIPS on a standard X86 host machine, outperforming state-of-the-art QEMU-ARM by delivering a speedup of 264%.
Original languageEnglish
Title of host publicationLCTES '14: Proceedings of the 2014 SIGPLAN/SIGBED conference on Languages, compilers and tools for embedded systems
Place of PublicationNew York, NY, USA
PublisherACM siggraph
Number of pages10
ISBN (Print)978-1-4503-2877-7
Publication statusPublished - Jun 2014


Dive into the research topics of 'Efficient Code Generation in a Region-based Dynamic Binary Translator'. Together they form a unique fingerprint.

Cite this