TY - GEN
T1 - Static analysis of energy consumption for LLVM IR programs
AU - Grech, Neville
AU - Georgiou, Kyriakos
AU - Pallister, James
AU - Kerrison, Steve
AU - Morse, Jeremy C M
AU - Eder, Kerstin I
PY - 2015/6/1
Y1 - 2015/6/1
N2 - 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.
AB - 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.
KW - Energy estimation
KW - Software analysis
UR - http://arxiv.org/abs/1405.4565
UR - https://www.scopus.com/pages/publications/84959563018
U2 - 10.1145/2764967.2764974
DO - 10.1145/2764967.2764974
M3 - Conference Contribution (Conference Proceeding)
SN - 9781450335935
SP - 12
EP - 21
BT - Proceedings of the 18th International Workshop on Software and Compilers for Embedded Systems (SCOPES '15)
PB - Association for Computing Machinery
T2 - 18th International Workshop on Software and Compilers for Embedded Systems, SCOPES 2015
Y2 - 1 June 2015 through 3 June 2015
ER -