Static analysis of energy consumption for LLVM IR programs
arXiv:1405.4565 · doi:10.1145/2764967.2764974
Abstract
Energy models can be constructed by characterizing the energy consumed by 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, using different compilers. One of the challenges in doing so is that of determining an 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, without requiring hardware knowledge.
References in corpus (2)
Cited by in corpus (10)
- Energy Transparency for Deeply Embedded Programs
- ENTRA: Whole-Systems Energy Transparency
- Data dependent energy modelling for worst case energy consumption analysis
- Inferring Parametric Energy Consumption Functions at Different Software Levels: ISA vs. LLVM IR
- Less is More: Exploiting the Standard Compiler Optimization Levels for Better Performance and Energy Consumption
- On the limitations of analysing worst-case dynamic energy of processing
- On the Value and Limits of Multi-level Energy Consumption Static Analysis for Deeply Embedded Single and Multi-threaded Programs
- Modeling and visualizing networked multi-core embedded software energy consumption
- S4oC: A Self-optimizing, Self-adapting Secure System-on-Chip Design Framework to Tackle Unknown Threats -- A Network Theoretic, Learning Approach
- Design Methodology for Energy Efficient Unmanned Aerial Vehicles