Static analysis of energy consumption for LLVM IR programs

Neville Grech, Kyriakos Georgiou, James Pallister, Steve Kerrison, Jeremy C M Morse, Kerstin I Eder

Research output: Chapter in Book/Report/Conference proceedingConference Contribution (Conference Proceeding)

23 Citations (Scopus)
203 Downloads (Pure)

Abstract

Energy models can be constructed by characterizing the energy consumed when executing each instruction in a processor's instruction set. This can be used to determine how much energy is required to execute a sequence of assembly instructions, without the need to instrument or measure hardware.

However, statically analyzing low-level program structures is hard, and the gap between the high-level program structure and the low-level energy models needs to be bridged. We have developed techniques for performing a static analysis on the intermediate compiler representations of a program. Specifically, we target LLVM IR, a representation used by modern compilers, including Clang. Using these techniques we can automatically infer an estimate of the energy consumed when running a function under different platforms and compilers.

One of the challenges in doing so is that of determining the energy cost of executing LLVM IR program segments, for which we have developed two different approaches. When this information is used in conjunction with our analysis, we are able to infer energy formulae that characterize the energy consumption for a particular program. This approach can be applied to any languages targeting the LLVM toolchain, including C and XC or architectures such as ARM Cortex-M or XMOS xCORE, with a focus towards embedded platforms. Our techniques are validated on these platforms by comparing the static analysis results to the physical measurements taken from the hardware. Static energy consumption estimation enables energy-aware software development by providing instant feedback to the developer, without requiring simulations or hardware knowledge.
Original languageEnglish
Title of host publicationProceedings of the 18th International Workshop on Software and Compilers for Embedded Systems (SCOPES '15)
PublisherAssociation for Computing Machinery (ACM)
Pages12-21
Number of pages9
ISBN (Print)9781450335935
DOIs
Publication statusPublished - 1 Jun 2015
Event18th International Workshop on Software and Compilers for Embedded Systems, SCOPES 2015 - St. Goar, Germany
Duration: 1 Jun 20153 Jun 2015

Conference

Conference18th International Workshop on Software and Compilers for Embedded Systems, SCOPES 2015
CountryGermany
CitySt. Goar
Period1/06/153/06/15

Keywords

  • Energy estimation
  • Software analysis

Fingerprint Dive into the research topics of 'Static analysis of energy consumption for LLVM IR programs'. Together they form a unique fingerprint.

  • Projects

    (ENTRA) Whole-System ENergy TRAnsparency

    Eder, K. I.

    1/10/121/01/16

    Project: Research

    Cite this

    Grech, N., Georgiou, K., Pallister, J., Kerrison, S., Morse, J. C. M., & Eder, K. I. (2015). Static analysis of energy consumption for LLVM IR programs. In Proceedings of the 18th International Workshop on Software and Compilers for Embedded Systems (SCOPES '15) (pp. 12-21). Association for Computing Machinery (ACM). https://doi.org/10.1145/2764967.2764974