CoSense: Compiler Optimizations using Sensor Technical Specifications

Pei Mu, Nikos Mavrogeorgis, Chris Vasiladiotis, Vasileios Tsoutsouras, Orestis Kaparounakis, Phillip Stanley-Marbell, Antonio Barbalace

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

Abstract / Description of output

Embedded systems are ubiquitous, but in order to maximize their lifetime on batteries there is a need for faster code execution – i.e., higher energy efficiency, and for reduced memory usage. The large number of sensors integrated into embedded systems gives us the opportunity to exploit sensors’ technical specifications, like a sensor’s value range, to guide compiler optimizations for faster code execution, small binaries, etc. We design and implement such an idea in COSENSE, a novel compiler (extension) based on the LLVM infrastructure, using an existing domain-specific language (DSL), NEWTON, to describe the bounds of and relations between physical quantities measured by sensors. COSENSE utilizes previously unexploited physical information correlated to program variables to drive code optimizations. COSENSE computes value ranges of variables and proceeds to overload functions, compress variable types, substitute code with constants and simplify the condition statements. We evaluated COSENSE using several microbenchmarks and two real-world applications on various platforms and CPUs. For microbenchmarks, COSENSE achieves 1.18× geomean speedup in execution time and 12.35% reduction on average in binary code size with 4.66% compilation time overhead on x86, and 1.23× geomean speedup in execution time and 10.95% reduction on average in binary code size with 5.67% compilation time overhead on ARM. For real-world applications, COSENSE achieves 1.70× and 1.50× speedup in execution time, 12.96% and 0.60% binary code reduction, 9.69% and 30.43% lower energy consumption, with a 26.58% and 24.01% compilation time overhead, respectively.
Original languageEnglish
Title of host publicationProceedings of the 33rd ACM SIGPLAN International Conference on Compiler Construction (CC '24), March 2--3, 2024, Edinburgh, UK
PublisherAssociation for Computing Machinery
Pages73-85
Number of pages13
ISBN (Electronic)9798400705076
DOIs
Publication statusPublished - 20 Feb 2024
EventACM SIGPLAN 2024 International Conference on Compiler Construction - Edinburgh, United Kingdom
Duration: 2 Mar 20243 Mar 2024
Conference number: 33
https://conf.researchr.org/home/CC-2024

Conference

ConferenceACM SIGPLAN 2024 International Conference on Compiler Construction
Abbreviated titleCC '24
Country/TerritoryUnited Kingdom
CityEdinburgh
Period2/03/243/03/24
Internet address

Fingerprint

Dive into the research topics of 'CoSense: Compiler Optimizations using Sensor Technical Specifications'. Together they form a unique fingerprint.

Cite this