Developer and User-Transparent Compiler Optimization for Interactive Applications

Paschalis Mpeis, Pavlos Petoumenos, Kim Hazelwood, Hugh Leather

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

Abstract

Traditional offline optimization frameworks rely on representative hardware, software, and inputs to compare different optimization decisions on. With application-specific optimization for mobile systems though, the idea of a representative testbench is unrealistic while creating offline inputs is non-trivial. Online approaches partially overcome these problems but they might expose users to suboptimal or even erroneously optimized code. As a result, our mobile code is poorly optimized and this results in wasted performance, wasted energy, and user frustration.

In this paper, we introduce a novel compiler optimization approach designed for mobile applications. It requires no developer effort, it tunes applications for the user’s device and usage patterns, and has no negative impact on the user experience. It is based on a lightweight capture and replay mechanism. In its online stage, it captures the state accessed by any targeted code region. By repurposing existing OS capabilities, it keeps the overhead low. In its offline stage, it replays the code region but under different optimization decisions to enable sound comparisons of different optimizations under realistic conditions. Coupled with a search heuristic for the compiler optimization space, it allows us to discover optimization decisions that improve performance without testing these decisions directly on the user.

We implemented a prototype system in Android based on LLVM combined with a genetic search engine. We evaluated it on both benchmarks and real Android applications. Online captures are infrequent and each one introduces an overhead of less than 15ms on average. For this negligible effect on user experience, we achieve speedups of 44% on average over the Android compiler and 35% over LLVM -O3.
Original languageEnglish
Title of host publicationProceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation (PLDI '21)
PublisherAssociation for Computing Machinery (ACM)
Pages268-281
Number of pages14
ISBN (Electronic)9781450383912
DOIs
Publication statusPublished - 19 Jun 2021
Event42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation - Online
Duration: 20 Jun 202126 Jun 2021
https://pldi21.sigplan.org/

Conference

Conference42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation
Abbreviated titlePLDI 2021
Period20/06/2126/06/21
Internet address

Keywords

  • iterative compilation
  • capture
  • replay
  • interactive

Fingerprint

Dive into the research topics of 'Developer and User-Transparent Compiler Optimization for Interactive Applications'. Together they form a unique fingerprint.

Cite this